Hello,
I have a combobox bound to a bindingsource. The user must be able to set a null value as selected value. How can I achieve that without making the combobox unbound?
I'm trying to create a IVsTextViewAdpater with the IVsEditorAdaptersFactoryService but when I call CreateVsTextViewAdapter it throws an object null reference:
var editorFactory = componentModel.GetService<IVsEditorAdaptersFactoryService>();
var serviceProvider = (Microsoft.VisualStudio.OLE.Interop.IServiceProvider)this;
var view = editorFactory.CreateVsTextViewAdapter(serviceProvider);
'this' is a Microsoft.VisualStudio.Shell.Package implementation.
Any ideas?
Under JBoss 4.0.1SP1, I have a servlet that makes multiple, concurrent calls to web services that are running under the same instance. I'm using request.getServerName() (on HttpServletRequest) to construct the endpoint URL. This normally works fine, but every once in a while returns null.
I hadn't seen this before running the web service requests in parallel, and so I guessed that sharing the HttpServletRequest among threads won't always work or something.
Any ideas on fixing this?
I have a problem with Flex module. I want to access url variables by this.loaderInfo.url, i call a function in createionComplete handler of module and sometimes it works and sometimes it doesn't. (Can't access... null). Any suggestions?
In reference to this question that I just asked, http://stackoverflow.com/questions/2451579/sql-select-all-when-filter-value-is-empty, it appears that for some reason, an empty text box's value is not being fed to SQL Server as NULL, as it ought to be. Any ideas on how to fix this?
Hi
I have a large index, on which Highlighter.Net works fine, but FastVectorHighlighter returns null as a Best Fragment on Some documents.
the searcher works fine. It is just the highlighter. The field has been indexed in the same manner for all documents, so I fail to understand Why it highlights some documents but not all.
Using Lucene.Net 2.9.2, built from trunk rev942061
Hello
I built a webusercontrol in asp.net which contains a databound dropdown.
When I directly put this control into a webform it runs well.
But if I try to add this control as childcontrol to another control at runtime
Childcontrol childcontrol = new Childcontrol ();
maincontrol.controls.add(childcontrol)
, the dropdown of the childcontrol is not instatiated (is null) so that I run in an exception by trying to bind the data to the dropdown.
I am trying to test ForegroundDispatch (http://developer.android.com/resources/samples/ApiDemos/src/com/example/android/apis/nfc/ForegroundDispatch.html) in emulator API 10 (Android 2.3.3).
When i call NfcAdapter.getDefaultAdapter(this), i get null. Why is this so?
Code:
public class ForegroundDispatch extends Activity {
private NfcAdapter mAdapter;
private PendingIntent mPendingIntent;
private IntentFilter[] mFilters;
private String[][] mTechLists;
private TextView mText;
private int mCount = 0;
@Override
public void onCreate(Bundle savedState) {
super.onCreate(savedState);
setContentView(R.layout.foreground_dispatch);
mText = (TextView) findViewById(R.id.text);
mText.setText("Scan a tag");
mAdapter = NfcAdapter.getDefaultAdapter(this);
// Create a generic PendingIntent that will be deliver to this activity. The NFC stack
// will fill in the intent with the details of the discovered tag before delivering to
// this activity.
mPendingIntent = PendingIntent.getActivity(this, 0,
new Intent(this, getClass()).addFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP), 0);
// Setup an intent filter for all MIME based dispatches
IntentFilter ndef = new IntentFilter(NfcAdapter.ACTION_NDEF_DISCOVERED);
try {
ndef.addDataType("*/*");
} catch (MalformedMimeTypeException e) {
throw new RuntimeException("fail", e);
}
mFilters = new IntentFilter[] {
ndef,
};
// Setup a tech list for all NfcF tags
mTechLists = new String[][] { new String[] { NfcF.class.getName() } };
}
@Override
public void onResume() {
super.onResume();
mAdapter.enableForegroundDispatch(this, mPendingIntent, mFilters, mTechLists); //CRASHES HERE BECAUSE mAdapter IS NULL
}
@Override
public void onNewIntent(Intent intent) {
Log.i("Foreground dispatch", "Discovered tag with intent: " + intent);
mText.setText("Discovered tag " + ++mCount + " with intent: " + intent);
}
@Override
public void onPause() {
super.onPause();
mAdapter.disableForegroundDispatch(this);
}
}
My manifest:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.neka.znacka"
android:versionCode="1"
android:versionName="1.0">
<uses-sdk android:minSdkVersion="10" />
<uses-permission android:name="android.permission.NFC"></uses-permission>
<uses-feature android:name="android.hardware.nfc" android:required="true" />
<application android:icon="@drawable/icon" android:label="@string/app_name">
<activity android:name=".Uvodna"
android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name="Simulator">
</activity>
</application>
Any ideas?
i use such code
_dataContext.Invoice.Include("Projects").Where(i => i.Paid == true).GroupBy(i => i.Projects.Id).OrderBy(grouping => grouping.Max(i => i.Projects.Id)).Take(3);
but object Projects is null, but another code is working
_dataContext.Invoice.Include("Projects").OrderBy(i => i.DateCreated).ToList();
what the problem?
I have a situation where I have to print out a NULL character if there is no action in a part of my program. Take for example the code below:
char x = '\0';
...
printf("@%c@\n", x);
I want it to print this:
@@
but it prints out
@ @
Whats the correct way not to have the \0 character printed out a space as above?
I have following code snippet:
class ABC{
public:
int a;
void print(){cout<<"hello"<<endl;}
};
int main(){
ABC *ptr = NULL:
ptr->print();
return 0;
}
It runs successfully. Can someone explain it?
Hello guys,
I have a session created which is null when called from an ajax call on Safari.
header.php
session_start();
$_SESSION['test'] = 'this is my session';
mypage.php
session_start();
echo $_SESSION['test']; <-- NOT WORKING ON SAFARI
Thanks
I am trying to come up with a validation for a nullable property, like int?
Example
[RangeValidator(0, RangeBoundaryType.Inclusive, 1, RangeBoundaryType.Inclusive)]
int? Age { get; set; }
However if I set Age to null validation fails because it doesn't fall in the range, I know I need an [ValidatorComposition(CompositionType.Or)] as well, but what else should I use?
How i can check if user has input null/empty string in classic-asp? Right now i am doing this.
If Request.Form("productId") == "" Then
'my code here
End If
But its not working.
Can any one please let me know the best way to use IF statement in mysql query to show if the "email" field is NULL then it should show as "no email"...
Postcode Telephone Email
----------------------------------------------------------
BS20 0QN 1275373088 no email
BS20 0QN 1275373088 no email
PO9 4HG 023 92474208 [email protected]
SO43 7DS 07801 715200 [email protected]
----------------------------------------------------------
Our code relies on checking the Context.User.Identity value in the Global.asax Application_AuthenticateRequest(...) method to retrieve some information about the logged in user. This works fine in classic mode but when I flip IIS to use the Integrated Pipeline "Context.User" comes back as null, but only intermittently. Any ideas why?
I have < authentication mode="Windows" and only Windows Auth enabled in the Virtual Directory.
I have questions that may or may not have a question_group
if all the questions do not have a question_group and if I use default if empty like this:
question_group defaultQuestion = new question_group {question_group_id = Guid.Empty};
questions.Select(x => x.question_group).DefaultIfEmpty(defaultQuestion).Distinct();
shouldn't I get an IEnumerable<question_group> containing only the default question_group that I defined? I get null.... what am I missing here?
I have two fields and I need to generate an attribute, using Microsoft Enterprise Library validation, so that either or has to have a value, but both can not be null at the same time.
I'm trying to open names.nsf in code. The piece of code has been working for a while but suddenly, I'm getting null. Any idea why? I don't seem to be getting any errors and I don't know how to work out what's wrong.
I can open the database from the Notes client on the same machine.
I need to keep the focus on the text input when the user moves to the next input without putting something in the previous one. In short, if it is null (left blank) or not valid, how do I keep the focus on that input until the conditions are satisfied?
I have browsed thru other postings on S/O, but I can't find a solution that works for me.
I have a datareader that might return a null value, and if so, I want to value to equal blank
txtMiddleName.Text = rdrGetUserInfo.GetString(1) ?? "";
The string above does not work.
When I walk thru the code, the code jumps to my error trapping block;
Any ideas?
I am using spring mvc in which i convert the arraylist into json string. I have one object 1) results.
My output from spring looks like this:
{
"data":"[{\"userName\":\"test1\",\"firstName\":\"test\",\"lastName\":\"user\"}, {\"userName\":\"test2\",\"firstName\":\"test1\",\"lastName\":\"user1\"}]",
}
I get output as null when i do '$.parseJSON' with this output. When i tried testing only with data object it works fine
Any help would be great.
One of the customers are facing difficulty while logging into our webiste, whenever the user types the first character in UserName text box on the sign in page, he gets below JavaScript error message.
Unable to get value of property 'keyCode': object is null or undefined
We do check for event.keyCode to validate the userName textbox , so as soon as the user types the first character we send the event.keyCode for validation which is failing.
The browser is internet Explorer 9 and we are not able to reproduce the problem in our workstation which has I9
I have added three methods with parameters:
public static void doSomething(Object obj) {
System.out.println("Object called");
}
public static void doSomething(char[] obj) {
System.out.println("Array called");
}
public static void doSomething(Integer obj) {
System.out.println("Array called");
}
When I am calling doSomething(null) , then compiler throws error as ambiguous methods. So Is the issue because Integer and char[] methods or Integer and Object methods?
I'm trying to convert a game I made (WindowsFormApplication) to an ASP Page.
My Problem is that I have a lot "private" variables in my WindowFormApplication and those variables are important for the game. But when after I Declare all my variables (in my Page_Load), they turn null no matter what I do(click a button, refresh the page).
Is there anyway to save my variables between buttons (other than Session, because I'd have to create like 6 more sessions)