如何设置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
2023-05-08 08:05

满意答案

您希望e.getSource()是输入的数字,但您得到的是导致事件发生的TextField 。 您无法使用<TextFieldTextField与数字进行比较。

由于您直接在TextField上注册ActionListener ,因此您无需检查事件的来源。 你知道它将是TextField

你想要做的是:

在事件的情况下( actionPerformed()仅在TextField中发生操作时被调用),如果按下的键是Enter ,则从TextField获取数字并检查其值。


You expect e.getSource() to be the number entered, but what you get is the TextField which caused the event to happen. You can't compare a TextField to a number using < or such.

Since you register the ActionListener directly on the TextField, you don't have to check the source of the event. You know it will be the TextField.

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 was Enter, get the number from the TextField and check its value.

相关问答

更多

对text.flash类型的值进行隐式强制:TextField为不相关的Int(Implicit Coercion of a value of a type of text.flash:TextField to an unrelated Int)

很高兴有关于此错误的更多详细信息。 喜欢哪条线实际上抛出了这个错误。 然而即使没有它,也很少有东西看起来很奇怪。 var playerName:int; // And few lines below playerName = txtPlayer; // Few more lines below var txtPlayer:TextField = new TextField(); 看起来你将playerName声明为int,因此你想存储数值,但是txtPlayer是一个TextField。 所以通...

限制textField中的字符和字符长度(_:shouldChangeCharactersInRange:replacementString :)(Limiting characters and character length in textField(_:shouldChangeCharactersInRange:replacementString:))

尝试这个: func textField(textField: UITextField, shouldChangeCharactersInRange range: NSRange, replacementString string: String) -> Bool { if textField == usernameField, let text = textField.text { let newLength = text.characters.count + strin...

如何将JTextField输入转换为int以进行验证?(How can I convert JTextField input into int for validation?)

在解析之前,您可以尝试检查 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 ...

TextField输入无效(TextField input not working)

一个问题似乎是您已将selectable属性设置为false 。 当type为TextFieldType.DYNAMIC时,这是有意义的。 但是,当type为TextFieldType.INPUT时,它会出现问题。 禁用文本选择时,不显示任何光标。 我仍然能够编辑文本。 但是,由于光标不可见,我无法更改它的位置,文本会添加到任何现有文本的前面。 One problem appears to be that you have set the selectable property to false....

来自textfield的Java int(Java int from textfield)

我在互联网上看到人们使用了事件,但我不确定在这种情况下是否必须使用它。 TextField默认包含空字符串。 如果您不使用某种事件或听众对text属性,则不会获得用户可能输入该字段的值。 在这种情况下,我建议使用TextFormatter来简化事情: TextField tf1 = new TextField(); TextField tf2 = new TextField(); StringConverter<Integer> converter = new IntegerStringConv...

将小数输入转换为int时出错(Error when converting fractional input to int)

问题是input()函数返回一个字符串对象: >>> n = input("n = ") n = 4.5 >>> x >>> '4.5' >>> type(n) <class 'str'> 正如文档所述,当你没有将表示所谓的整数文字的字符串实例传递给Pythons int()函数时,你将得到一个ValueError 。 >>> int(n) Traceback (most recent call last): ValueError: invalid literal for int() with...

将Textfield输入转换为int然后限制该值(Taking a Textfield input converting to an int and then limiting the value)

您希望e.getSource()是输入的数字,但您得到的是导致事件发生的TextField 。 您无法使用<或TextField将TextField与数字进行比较。 由于您直接在TextField上注册ActionListener ,因此您无需检查事件的来源。 你知道它将是TextField 。 你想要做的是: 在事件的情况下( actionPerformed()仅在TextField中发生操作时被调用),如果按下的键是Enter ,则从TextField获取数字并检查其值。 You expect...

arc4random使用textField的输入(arc4random using input from textField)

如果变量50正在工作,那么文本字段的文本显然有问题。 您的文本字段很可能是零。 尝试检查您的代码,看看是否有任何影响您的应用程序成为零。 如果下次发生类似情况,我会告诉你。 例如,您应该总是尝试调试代码,而不是直接将其发布到使用最少代码的堆栈溢出,请尝试自己解决问题! 例如,一种方法可以确定您建议您现在尝试的问题有什么问题,并将结果反馈给我,检查textfield是否为非零,如下所示: if (textfield) { NSLog (@"Text field is not nil! GOOD!...

从char转换为int(Converting from char to int)

是的,你试图将字符与不能工作的字符进行比较。 如何只使用字符? 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...

当输入不是连续的时,将字符串转换为int(Converting strings to ints when the input is not sequential)

无论出于何种原因,正则表达式都被那些文字字符弄得很困惑。 您可以使用这些数字的十六进制代码使其工作: function convertToEnglishDigit(input) { var numberMap = { '\u0660': '0', '\u0661': '1', '\u0662': '2', '\u0663': '3', '\u0664': '4', '\u0665': '5', '\u066...

相关文章

更多

魅族MX2去除smartbar教程

  首先确认一点,魅族Smartbar的推出,是敢于创新,大胆向前的做法。在软件兼容的情况下,Smar ...

: study:GraphicsExample 类型值的隐式强制指令的目标是非相关类型 mx.core:IVisualElement。

: study:GraphicsExample 类型值的隐式强制指令的目标是非相关类型 mx.core ...

How to set up Solr on Ubuntu 10.04 (or whatever)

How to set up Solr on Ubuntu 10.04 (or whatever) | ...

java中list、set和map 的区别(转)

List按对象进入的顺序保存对象,不做排序或编辑操作。Set对每个对象只接受一次,并使用自己内部的排序 ...

Flex 4 的问题

4中的&lt;s: &lt;fx: &lt;mx:是指什么?

OSGi 中为什么还有Eclipse Extension point的方式?

各位Java高手们,咨询大家一个问题 我现在学习OSGi的问题,看了两个资料:OSGi实战和OSGi ...

13年7月memory point

IOS/android美术资源压缩相关工具使用,shell编写; 美术资源地图压缩方案; IAP支付o ...

Extjs 怎样将grid的record转换成Json串,然后post到下个画面?

在Extjs中怎样将grid的一个record的数据转换成Json字符串传递给下一个jsp文件?然后下 ...

最新问答

更多

您如何使用git diff文件,并将其应用于同一存储库的副本的本地分支?(How do you take a git diff file, and apply it to a local branch that is a copy of the same repository?)

将diff文件复制到存储库的根目录,然后执行以下操作: git apply yourcoworkers.diff 有关apply命令的更多信息, apply 见其手册页 。 顺便说一下:一个更好的方法是通过文件交换整个提交文件是发送者上的命令git format-patch ,然后在接收器上加上git am ,因为它也传送作者信息和提交信息。 如果修补程序应用程序失败,并且生成diff的提交实际上在您的备份中,则可以使用尝试在更改中合并的apply程序的-3选项。 它还适用于Unix管道,如下

将长浮点值剪切为2个小数点并复制到字符数组(Cut Long Float Value to 2 decimal points and copy to Character Array)

尝试将第二行更改为snprintf(buf1, sizeof buf1, "%.2f", balance1); 。 另外,为什么要声明用该特定表达式分配缓冲区的存储量? EDIT @LưuVĩnhPhúc在下面的评论中提到我的原始答案中的格式说明符将舍入而不是截断,因此根据如何在不使用C舍入的情况下截断小数,您可以执行以下操作: float balance = 200.56866; int tmp = balance1 * 100; float balance1 = tmp / 100.0; c

OctoberCMS侧边栏不呈现(OctoberCMS Sidebar not rendering)

这是简单的解决方案 在你需要写的控制器中 BackendMenu::setContext('Archetypics.Team', 'website', 'team'); 请参阅https://octobercms.com/docs/backend/controllers-views-ajax#navigation-context BackendMenu::setContext('Author.Plugin name', 'Menu code', 'Sub menu code'); 你需要在r

页面加载后对象是否有资格进行垃圾回收?(Are objects eligible for garbage collection after the page loads?)

每当发出请求时ASP都会创建一个新的Page对象,并且一旦它将响应发送回用户就不会保留对该Page对象的引用,因此只要你找不到某种方法来保持生命自己引用该Page对象后,一旦发送响应, Page和只能通过该页面访问的所有对象才有资格进行垃圾回收。 ASP creates a new Page object whenever a request is made, and it does not hold onto the reference to that Page object once it

codeigniter中的语言不能按预期工作(language in codeigniter doesn' t work as expected)

要在生产服务器中调试这个,你可以临时放 error_reporting(E_ALL); 并查看有哪些其他错误阻止正确的重定向。 您还应该检查生产服务器发送的响应标头。 它是否具有“缓存”,是否需要重新验证标头等 to debug this in production server, you can temporary put error_reporting(E_ALL); and see what other errors are there that prevents the proper

在计算机拍照在哪里进入

打开娥的电脑.在下面找到视频设备点击进去就可以了...

使用cin.get()从c ++中的输入流中丢弃不需要的字符(Using cin.get() to discard unwanted characters from the input stream in c++)

你是对的。 第一次输入后,换行符将保留在输入缓冲区中。 第一次读取后尝试插入: cin.ignore(); // to ignore the newline character 或者更好的是: //discards all input in the standard input stream up to and including the first newline. cin.ignore(numeric_limits::max(), '\n'); 您必须为#inc

No for循环将在for循环中运行。(No for loop will run inside for loop. Testing for primes)

for (int k = 0; k > 10; k++) { System.out.println(k); } k不大于10,所以循环将永远不会执行。 我想要什么是k<10 ,不是吗? for (int k = 0; k < 10; k++) { System.out.println(k); } for (int k = 0; k > 10; k++) { System.out.println(k); } k is not greater than 10, so loop

单页应用程序:页面重新加载(Single Page Application: page reload)

优点是不注销会避免惹恼用户,以至于他们会想要杀死你:-)。 说真的,如果每次刷新页面时应用程序都会将我注销(或者在新选项卡中打开一个链接),我再也不会使用该应用程序了。 好吧,不要这样做。 确保身份验证令牌存储在刷新后的某个位置,即不在某些JS变量中,而是存储在cookie或本地存储中。 The advantage is that not logging off will avoid pissing off your users so much that they'll want to kill

在循环中选择具有相似模式的列名称(Selecting Column Name With Similar Pattern in a Loop)

EXECUTE IMMEDIATE 'SELECT '||field_val_temp ||' FROM tableb WHERE function_id = :func_val AND rec_key = :rec_key' INTO field_val USING 'STDCUSAC' , yu.rec_key; 和, EXECUTE IMMEDIATE 'UPDATE tablec SET field_val_'||i||' = :field_val' USI