小编The*_*Doc的帖子

Sublime Text Editor片段以删除括号

默认情况下,Sublime能够在突出显示的文本中添加括号,方括号(卷曲和正方形),撇号和引号。我已经尝试过了,但是似乎找不到一种将其删除的方法。我想做的是突出显示一些用括号括起来的文本,并将其删除。是否有使用片段实现此目的的好方法?

我怀疑这可以通过使用allFollowingCharacter和allPrecedingCharacter来完成,但是当它们使用XML而不是当前的JSON时,似乎这些可能来自Sublime的先前版本...?

任何帮助,将不胜感激!

sublimetext3 sublimetext-snippet

3
推荐指数
1
解决办法
1510
查看次数

映射的Vuex函数“不是函数”,但仍会加载

当我在挂接的挂接中调用映射的Vuex操作时,该操作有效,但是在控制台中收到“ TypeError:xxx is not function”错误。

这是该组件的整个脚本部分:

<script>
import SideNav from '@/components/SideNav.vue'
import ActionBar from '@/components/ActionBar.vue'
import Summaries from '@/components/Summaries.vue'
import { mapState, mapActions } from 'vuex'

export default {
  components: { SideNav, ActionBar, Summaries },
  computed: {
    ...mapState(['dataLoading']),
    ...mapActions(['init'])
  }, 
  mounted() {
    this.init();
  }
}
</script>
Run Code Online (Sandbox Code Playgroud)

vue.js vue-component vuex

3
推荐指数
1
解决办法
799
查看次数

MVVM 可编辑组合框绑定

这是我的问题...我有一个服务器列表,每个服务器都有一个 ID 和 ServerName。我希望能够从 ComboBox 中选择一个服务器并就地编辑它,然后让它的 ID 可用于稍后通过 SQL 更新。所以假设这是数据:(ID=1, Name="Server1"), (ID=2, Name="Server2"), (ID=3, Name="Server3")。如果我从 ComboBox 中选择 Server3,我想将其编辑为“Server4”,然后使用 SQL 查询上传它(我知道如何执行此部分)。我正在使用 MVVM,所以所有的值都是我的 ViewModel 的属性。

目前,当 ComboBox 中的文本字段被修改时,SelectedServer 立即变为 null,大概是因为它不再是它识别的值。我可以使用一些关于如何让它做我想做的事情的指导。

<ComboBox Grid.Column="1" x:Name="serverNameUpdateBox" HorizontalAlignment="Stretch" Height="23" VerticalAlignment="Center" IsEditable="True"
                          ItemsSource="{Binding Path=DataContext.SelectedProjectServers, ElementName=main}"
                          DisplayMemberPath="ServerName"
                          SelectedValue="{Binding SelectedServer}"
                          SelectedValuePath="ServerName"
                          Text="{Binding SelectedServer.ServerName, UpdateSourceTrigger=LostFocus}"
                          />
Run Code Online (Sandbox Code Playgroud)

和 ViewModel 相关的代码:

namespace ViewModel
{
    public class ViewModel : INotifyPropertyChanged
    {
        public ViewModel()
        {
            SelectedProjectServers = new List<Server>();
            SelectedServer = new Server();


            private Server _selectedServer;

            public Server SelectedServer
            {
                get { return _selectedServer; …
Run Code Online (Sandbox Code Playgroud)

c# wpf xaml combobox mvvm

2
推荐指数
1
解决办法
1895
查看次数

SQL 选择两列相等但第三列不同的行

我很确定我遇到的问题是我不太确定如何清楚地提出我的问题,所以我无法搜索答案。但这里...

我得到的数据如下所示(此处简化):

ID    |  MailboxID   | Connection |  EmailID
0001  |  M0001       | 1          |  9999
0002  |  M0001       | 2          |  9999
0003  |  M0002       | 1          |  9998
0004  |  M0002       | 2          |  9998
0005  |  M0002       | 2          |  9997
0006  |  M0003       | 1          |  9996
Run Code Online (Sandbox Code Playgroud)

ID是主键,因此在表中是唯一的。MailboxID 指示存储邮件的邮箱。Connection 告诉我邮箱存在于哪个内部连接(基本上是任务 ID),而 EmailID 是电子邮件的唯一标识符。

我需要返回 MailboxID 和 EmailID 相等但连接不同的所有 ID。在上面的示例中,我想要返回这些行:ID 0001-0002、0003-0004。有人可以帮忙吗?

t-sql sql-server email filtering sql-server-2012

2
推荐指数
1
解决办法
6012
查看次数