null

Reading an ESRI shapefile from a zip-file during Runtime in Java - DataStoreFinder.getDataStore(connectParameters) returns null

核能气质少年 提交于 2019-12-21 09:06:13
问题 We are building a service for uploading zip-files containing an ESRI-shapefile. The service should be able to read the shapefile and do stuff with its content. So I've built a class that unzips the zip-file to temporary folder (subfolder of System.getProperty("java.io.tmpdir")). Another class calls the unzip method from the Unzip-class and it then tries to read the unpacked shapefile using Geotools. It uses the Geotools DataStoreFinder.getDataStore(Map params) method to create a datastore

When does Core Data Nullify rule update relations?

限于喜欢 提交于 2019-12-21 08:27:07
问题 What I have and want: I have a one-to-many relationship A <--->> B (the to-many part is ordered). When deleting A all B's with a relation to A should be deleted as well, so the deletion rule for A's relation to B is set to cascade -> Works fine When deleting B only the relationship back to A should be cleared, so the deletion rule for B's relation to A is set to nullify -> Doesn't work (only after a delay) Description of the problem: So I have the exact same problem as stated in this question

When does Core Data Nullify rule update relations?

坚强是说给别人听的谎言 提交于 2019-12-21 08:27:05
问题 What I have and want: I have a one-to-many relationship A <--->> B (the to-many part is ordered). When deleting A all B's with a relation to A should be deleted as well, so the deletion rule for A's relation to B is set to cascade -> Works fine When deleting B only the relationship back to A should be cleared, so the deletion rule for B's relation to A is set to nullify -> Doesn't work (only after a delay) Description of the problem: So I have the exact same problem as stated in this question

How can I write to the NUL device under Windows from node.js?

梦想的初衷 提交于 2019-12-21 07:55:46
问题 This is bugging me for several days now. I know about the standard stream redirection to the NUL device, but this isn't the case. node.js uses CreateFileW under its fs native/libuv bindings. Unfortunately using something like: require('fs').writeFileSync('NUL', 'foo') creates a NUL file into the cwd that has 3 bytes. I tried writing to the \Device\Null, but since I'm pretty much a *nix head where everything is a file, I failed to actually find a working path for \Device\Null. Such as \\.

Why can't nullables be declared const?

孤街醉人 提交于 2019-12-21 07:34:09
问题 [TestClass] public class MsProjectIntegration { const int? projectID = null; // The type 'int?' cannot be declared const // ... } Why can't I have a const int? ? Edit: The reason I wanted a nullable int as a const is because I'm just using it for loading some sample data from a database. If it's null I was just going to initialize sample data at runtime. It's a really quick test project and obviously I could use 0 or -1 but int? just felt like the right data structure for what I wanted to do.

unable to pass null to execute(); method of AsyncTask in android 4.0

好久不见. 提交于 2019-12-21 07:25:14
问题 i am trying to pass null value to execute(); method of AsyncTask in android 4.0 it show error "The method execute(Integer[]) is ambiguous for the type" but same code is work fine with android 2.2 Code is : public class AllianceAnalysisDemoActivity extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); new AsynPageLoader().execute(null); } public class

How do I retain NULL values when using SSIS to import from flat file in SQL Server 2005

天大地大妈咪最大 提交于 2019-12-21 07:15:14
问题 I've exported records to a flat file delimited by "|" and it seems that when I import those records into a new database , SQL Server treats the NULL values as empty fields. IMy queries worked properly when the records/fields were NULL and so I want to either find a way to retain the NULL values in the data or convert the blank fields to NULL values. I'm assuming the former would be easier, but I don't know how to do that. Any help would be appreciated. 回答1: In your destination connection in

Null or empty check for a string variable

这一生的挚爱 提交于 2019-12-21 06:55:26
问题 if((isnull(@value,''))='') I want to know whether the above piece of code works in checking if the variable is null or empty. 回答1: Yes, that code does exactly that. You can also use: if (@value is null or @value = '') Edit: With the added information that @value is an int value, you need instead: if (@value is null) An int value can never contain the value '' . 回答2: Use This way is Better if LEN(ISNULL(@Value,''))=0 This check the field is empty or NULL 回答3: Yes, you could also use COALESCE(

Objective-C: Why check nil before respondsToSelector:?

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-21 06:47:37
问题 I've seen code like: if (delegate != nil && [delegate respondsToSelector:@selector(doSomething)]) ... But, sending a message to nil just returns nil (which evaluates to NO ), so why not just do: if ([delegate respondsToSelector:@selector(doSomething)]) ... Is the former faster if delegate == nil ? Either way, I prefer the latter cause it's less code. And, less is better than more . Every Unix pro knows that. 回答1: objc_msgSend, the function used to send dynamic messages in Objective-C

Does Java allow nullable types?

核能气质少年 提交于 2019-12-21 06:46:52
问题 In C# I can a variable to allow nulls with the question mark. I want to have a true/false/null result. I want to have it set to null by default. The boolean will be set to true/false by a test result, but sometimes the test is not run and a boolean is default to false in java, so 3rd option to test against would be nice. c# example: bool? bPassed = null; Does java have anything similar to this? 回答1: No. Instead, you can use the boxed Boolean class (which is an ordinary class rather a