internal

How to read file names from Internal storage in Android

大兔子大兔子 提交于 2019-12-11 04:27:31
问题 I want to read the file names from the default internal storage folder of my app but even if there are some files I get a List of size 0 I use the following to read the file names File dirFiles = Settings.this.getFilesDir(); File list[] = dirFiles.listFiles(); for( int i=0; i< list.length; i++) { myList.add( list[i].getName() ); } What I am doing wrong here? is the path I get correct? or it needs to have a "/" at the end of it? /data/data/com.compfrind.contacts/files 回答1: Try this way private

Swift - internally implement public protocol

别等时光非礼了梦想. 提交于 2019-12-11 04:27:08
问题 Let say I've a protocol that I need to make public. Additionally I've a class that implements this protocol, but in a way that I want to keep internal. So I'd like to do something like: public protocol CustomDelegate { func didLoad() } public class Foo { public var delegate: CustomDelegate? var internalDelegate: CustomDelegate? ... } public class Bar { var foo: Foo init() { self.foo = Foo() self.foo.internalDelegate = self } } extension Bar: CustomDelegate { func didLoad() { print("bar has

java.sql.SQLException: Fail to convert to internal

房东的猫 提交于 2019-12-10 16:48:43
ava.lang.Thread.run(Thread.java:745) Caused by: java.sql.SQLException: Fail to convert to internal representation at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:113) at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:147) at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:209) at oracle.jdbc.driver.CharCommonAccessor.getByte(CharCommonAccessor.java:209) at oracle.jdbc.driver.OracleResultSetImpl.getByte(OracleResultSetImpl.java:464) at com.alibaba.druid.pool.DruidPooledResultSet.getByte(DruidPooledResultSet.java:129) at org

InternalsVisibleTo causes CS0246 error: The Type or Namespace could not be found

旧街凉风 提交于 2019-12-10 09:05:41
问题 I am trying to enable one assembly to access another assembly's internal classes by adding [assembly:InternalsVisibleTo("assembly-name")] to the second assembly. However, this causes the following error: error CS0246: The type or namespace name 'InternalsVisibleTo' could not be found (are you missing a using directive or an assembly reference?) I am following the examples here: MSDN Reference What am I doing wrong? 回答1: Make sure you import System.Runtime.CompilerServices. Or use a fully

Android - Why my saved image is not appearing in the default gallery of my phone?

a 夏天 提交于 2019-12-10 06:29:21
问题 I am trying to save an image from my application to the default gallery of my phone. The code below works perfectly if I have a SD card on the phone. The image saved appears in the phone's gallery and everything, as expected: private Uri saveMediaEntry(File f, String title, String description, int orientation, Location loc) { ContentValues v = new ContentValues(); v.put(Images.Media.TITLE, title); v.put(Images.Media.DISPLAY_NAME, title); v.put(Images.Media.DESCRIPTION, description); v.put

Where is Android Emulator Internal Storage

♀尐吖头ヾ 提交于 2019-12-10 02:58:34
问题 I have an error due to the contents of a file stored in internal storage on my Android Emulator. (I wrote it to file). Is there a way I can view the internal storage used by my app in windows? I've searched through my whole project folder, sdk, workspace etc and cant find anything. I saw someone in another question say it was in the /data folder, but i dont know where to look for that either. Thanks 回答1: If you want to view the folder/file structure of the running emulator, you can do that

Why can't you name a function in Go “init”?

久未见 提交于 2019-12-10 01:23:37
问题 So, today while I was coding I found out that creating a function with the name init generated an error method init() not found , but when I renamed it to startup it all worked fine. Is the word "init" preserved for some internal operation in Go or am I'm missing something here? 回答1: Yes, the function init() is special. It is automatically executed when a package is loaded. Even the package main may contain one or more init() functions that are executed before the actual program begins: http:

How does windows console subsystem work?

帅比萌擦擦* 提交于 2019-12-10 00:32:52
问题 So how does console subsystem work ? I understand high level stuff such as windows automatically creates console window for programs and then gives handle to console window to which you can write and read with WriteConsole and ReadConsole, but how does window itself work ? does windows use GDI to draw characters into console ? or some hidden internal functions ? what happens behind the curtains ? 回答1: This question is too vague to really answer in a detailed fashion but I'll give it a shot.

VS Express 2013 for Web: How to use the internal VS server, not IIS express?

旧巷老猫 提交于 2019-12-08 16:51:38
问题 I switched to Visual Studio Express 2013 for Web, but I've just stumbeled into something. It's default settings are set so that it uses IIS Express as a default web server, and there isn't a button that could change that, as in VS Express 2012 for Web before. I was looking for that option in the settings and in the properties / property page for my project, but I can't find it. 回答1: It's been discontinued. The options are IIS Express or IIS. And that's for the full range of the product, not

How to override internal framework method in application (outside framework)

青春壹個敷衍的年華 提交于 2019-12-08 15:58:44
问题 Is there anyway to override internal framework method when subclassing in Swift? Ex. Superclass public class BarChartRenderer: ChartDataRendererBase { internal func drawDataSet(context context: CGContext, dataSet: BarChartDataSet, index: Int) { ... } } and I want to override this method to draw differently that dataSet (iOS-Charts) public class ESBarChartRenderer: BarChartRenderer { overide func drawDataSet(context context: CGContext, dataSet: BarChartDataSet, index: Int) { ... } } but when I