如何设置myapp.herokuapp.com mx记录指向mx.sendgrid.net?(How to set myapp.herokuapp.com mx record to point to mx.sendgrid.net?)
我试图让我的邮件交换器记录指向sendgrid,但我似乎无法在heroku上找到该选项。 有谁知道这个设置的位置?
I am trying to get my mail exchanger record to point to sendgrid, but I cannot seem to find the option on heroku. Does anyone know where this setting is located?
原文:https://stackoverflow.com/questions/20871914
最满意答案
您希望
e.getSource()
是输入的数字,但您得到的是导致事件发生的TextField
。 您无法使用<
或TextField
将TextField
与数字进行比较。由于您直接在
TextField
上注册ActionListener
,因此您无需检查事件的来源。 你知道它将是TextField
。你想要做的是:
在事件的情况下(
actionPerformed()
仅在TextField中发生操作时被调用),如果按下的键是Enter
,则从TextField
获取数字并检查其值。You expect
e.getSource()
to be the number entered, but what you get is theTextField
which caused the event to happen. You can't compare aTextField
to a number using<
or such.Since you register the
ActionListener
directly on theTextField
, you don't have to check the source of the event. You know it will be theTextField
.What you want to do is :
In the case of an event (the
actionPerformed()
only gets called when an action happened in the TextField), if the key pressed wasEnter
, get the number from theTextField
and check its value.
相关问答
更多-
很高兴有关于此错误的更多详细信息。 喜欢哪条线实际上抛出了这个错误。 然而即使没有它,也很少有东西看起来很奇怪。 var playerName:int; // And few lines below playerName = txtPlayer; // Few more lines below var txtPlayer:TextField = new TextField(); 看起来你将playerName声明为int,因此你想存储数值,但是txtPlayer是一个TextField。 所以通过play ...
-
尝试这个: func textField(textField: UITextField, shouldChangeCharactersInRange range: NSRange, replacementString string: String) -> Bool { if textField == usernameField, let text = textField.text { let newLength = text.characters.count + string.cha ...
-
如何将JTextField输入转换为int以进行验证?(How can I convert JTextField input into int for validation?)[2023-05-05]
在解析之前,您可以尝试检查 if(contactnumber.trim().length() == 0) { } 此外,您可能希望使用long,因为int将无法存储10位数的联系号码。 Before parsing you may try to check if(contactnumber.trim().length() == 0) { } Also you may want to use long as int won't be able to store 10 digit contact numbe ... -
TextField输入无效(TextField input not working)[2023-02-16]
一个问题似乎是您已将selectable属性设置为false 。 当type为TextFieldType.DYNAMIC时,这是有意义的。 但是,当type为TextFieldType.INPUT时,它会出现问题。 禁用文本选择时,不显示任何光标。 我仍然能够编辑文本。 但是,由于光标不可见,我无法更改它的位置,文本会添加到任何现有文本的前面。 One problem appears to be that you have set the selectable property to false. This ... -
来自textfield的Java int(Java int from textfield)[2021-12-20]
我在互联网上看到人们使用了事件,但我不确定在这种情况下是否必须使用它。 TextField默认包含空字符串。 如果您不使用某种事件或听众对text属性,则不会获得用户可能输入该字段的值。 在这种情况下,我建议使用TextFormatter来简化事情: TextField tf1 = new TextField(); TextField tf2 = new TextField(); StringConverterconverter = new IntegerStringConverter ... -
问题是input()函数返回一个字符串对象: >>> n = input("n = ") n = 4.5 >>> x >>> '4.5' >>> type(n)
正如文档所述,当你没有将表示所谓的整数文字的字符串实例传递给Pythons int()函数时,你将得到一个ValueError 。 >>> int(n) Traceback (most recent call last): ValueError: invalid literal for int() with base ... -
将Textfield输入转换为int然后限制该值(Taking a Textfield input converting to an int and then limiting the value)[2022-11-25]
您希望e.getSource()是输入的数字,但您得到的是导致事件发生的TextField 。 您无法使用<或TextField将TextField与数字进行比较。 由于您直接在TextField上注册ActionListener ,因此您无需检查事件的来源。 你知道它将是TextField 。 你想要做的是: 在事件的情况下( actionPerformed()仅在TextField中发生操作时被调用),如果按下的键是Enter ,则从TextField获取数字并检查其值。 You expect e.ge ... -
如果变量50正在工作,那么文本字段的文本显然有问题。 您的文本字段很可能是零。 尝试检查您的代码,看看是否有任何影响您的应用程序成为零。 如果下次发生类似情况,我会告诉你。 例如,您应该总是尝试调试代码,而不是直接将其发布到使用最少代码的堆栈溢出,请尝试自己解决问题! 例如,一种方法可以确定您建议您现在尝试的问题有什么问题,并将结果反馈给我,检查textfield是否为非零,如下所示: if (textfield) { NSLog (@"Text field is not nil! GOOD!"); ...
-
从char转换为int(Converting from char to int)[2022-04-20]
是的,你试图将字符与不能工作的字符进行比较。 如何只使用字符? public static boolean bs(char key,String N){ 并打电话 bs('5', '25789'); Yes, you are trying to compare chars with ints which wont work. How about only using chars? public static boolean bs(char key,String N){ and call bs('5', ... -
无论出于何种原因,正则表达式都被那些文字字符弄得很困惑。 您可以使用这些数字的十六进制代码使其工作: function convertToEnglishDigit(input) { var numberMap = { '\u0660': '0', '\u0661': '1', '\u0662': '2', '\u0663': '3', '\u0664': '4', '\u0665': '5', '\u0666': ' ...