小编ast*_*ght的帖子

使用GetOleDbSchemaTable获取名为"Street"的表的列

我试图通过打开OleDbConnection来读取Access数据库中的表"Streets"的列名.我打电话给GetOleDbSchemaTable,但我似乎无法弄清楚如何进入我的专栏.

如果可能的话,我想使用.NET 3.5框架.

.net sql ms-access

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

如何将 System.Drawing.Image 旋转 x 度?

我需要将汽车图像旋转 X 度以指示行驶方向。现在我有这个工作代码可以在 GDI+ 表面上绘制图像。

int hdc = Display.hDC;
IntPtr p = new IntPtr(hdc);
graphics = Graphics.FromHdc(p);
newImage = Image.FromFile(carImage);
System.Drawing.Point ulCorner = new System.Drawing.Point(x - 25, y -15);

//graphics.RotateTransform(45); //tried this line, when i used it, it drew nothing.
graphics.DrawImage(newImage, ulCorner);
Run Code Online (Sandbox Code Playgroud)

如何旋转X度?

c# gdi+

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

数组元素类型不完整

我试图找出为什么我无法在Mac OSX上编译enlightenment e17窗口管理器包ejde.Make为我提供了以下输出(长线分为易读性):

libtool: compile:  gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I../.. -I. \
-I../.. -I../../src/bin -I../../src/lib \
-DPACKAGE_BIN_DIR=\"/usr/local/bin\" \
-DPACKAGE_LIB_DIR=\"/usr/local/lib\" \
-DPACKAGE_DATA_DIR=\"/usr/local/share/edje\" \
-I/usr/local/include/eina-1 -I/usr/local/include/eina-1/eina \
-I/usr/local/include/eet-1 -I/usr/local/include/evas-1 \
-I/usr/local/include/freetype2 -I/usr/local/include \
-I/usr/local/include/ecore-1 -I/usr/local/include/embryo-1 \
-I/usr/local/include/ecore-1 -I/usr/local/include/eina-1 \
-I/usr/local/include/eina-1/eina -I/usr/local/include/evas-1 \
-I/usr/local/include/eet-1 -I/usr/local/include/freetype2 \
-I/usr/local/include \
-g -O2 -MT edje_lua2.lo -MD -MP -MF .deps/edje_lua2.Tpo \
-c edje_lua2.c  -fno-common -DPIC -o

.libs/edje_lua2.o edje_lua2.c:183: error: array type has incomplete element type

edje_lua2.c:638: error: array type has incomplete element
type edje_lua2.c: In function '_elua_messagesend': …
Run Code Online (Sandbox Code Playgroud)

c lua

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

如果不使用using语句,是否会导致IDisposable内存泄漏?

如果不使用using语句,是否会导致IDisposable内存泄漏?
如果是这样,如果代码不多,有人可以提供一个内存泄漏示例吗?

c# idisposable

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

如何在虚拟机中挂载Azure数据磁盘

如何从Linux虚拟机挂载Azure数据磁盘?

我想可能是这样的

az vm disk attach-existing [virtualmachinename] [datadiskname]
Run Code Online (Sandbox Code Playgroud)

azure

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

查询中的 Cassandra 集群键 vs 多查询效率

in集群键上的运算符是否比多个等式查询更有效?

select * from table where primaryKey1 = 1 and primaryKey2 = 2 and clusterKey in (1,2) 
Run Code Online (Sandbox Code Playgroud)

与 2 个查询。

select * from table where primaryKey1 = 1 and primaryKey2 = 2 and clusterKey = 1 

select * from table where primaryKey1 = 1 and primaryKey2 = 2 and clusterKey = 2
Run Code Online (Sandbox Code Playgroud)

cassandra

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

在这个c#EF场景中我是否需要担心垃圾收集?

try
{
  using (MapDataContainer ent = new MapDataContainer()) //is an autogen'd EF object
  {
     //do some stuff, assume it throws an error
  }
}
catch(Exception ex) //catching outside using not sure if IDispose called
{
  //handle error
}
Run Code Online (Sandbox Code Playgroud)

通常我理解在EF对象上使用称为IDispose.所以假设它抛出一个异常......这是一个可能的内存泄漏情况吗?

c# memory-leaks exception-handling using

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

是否有一种灵活的方法可以将List <int?>转换为List <int>而无需循环?

有没有一个光滑的方式转为List<int?>非空的,List<int>没有循环?

c#

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

我的依赖属性有什么问题?

编译器和运行时不会抱怨绑定,但Setter永远不会在我的AutoCompleteTextBox中被命中.

<Controls:AutoCompleteTextBox   
    Items="{Binding Path=DropDownValues}"
    Width="200" 
    Grid.Column="1" 
    Height="30"
   Tag="{Binding}"
  />
Run Code Online (Sandbox Code Playgroud)

 public partial class AutoCompleteTextBox
    {
        public static readonly DependencyProperty ItemsProperty =
            DependencyProperty.Register(
                "Items",
                typeof(ItemCollection),
                typeof(AutoCompleteTextBox),
                new PropertyMetadata(default(ItemCollection), OnItemsPropertyChanged));


       public ItemCollection Items
       {
           get
           {
               return (ItemCollection)GetValue(ItemsProperty);
           }
           set
           {
               SetValue(ItemsProperty, value); //doesn't get hit
           }
       }


//This is how i'm cheating since my Items is always null
        private void CanvasName_Loaded(object sender, RoutedEventArgs e)
        {
            object obj = this.Tag;

            if (obj != null)
            {
                CjisQueryAutoCompleteData at = obj as CjisQueryAutoCompleteData;
                if …
Run Code Online (Sandbox Code Playgroud)

c# wpf xaml

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

WPF 路径数据创建孔

我正在尝试创建一个 X 符号。我画了两条重叠的粗线,但 WPF 删除了符号的交集 - 我想要一个实心的“X 符号”

在此处输入图片说明

 <Path x:Name="CheckIcon"  
      Width="{TemplateBinding Width, Converter={StaticResource mathConverter}, ConverterParameter=*2/3-20}" 
      Height="{TemplateBinding Height, Converter={StaticResource mathConverter}, ConverterParameter=*2/3-20}"  
      Margin="1,1,0,1.5" 
      Opacity="1" 
      Stretch="Fill" 
      Fill="Silver"
      Data="M 0,0 L.2,0 L 1,.8 L .8,1 L 0,.2 L .2, 0 M 1,0 L .8,0 L 0,.8 L .2,1 L 1,.2 L .8, 0"
    />
Run Code Online (Sandbox Code Playgroud)

c# wpf xaml

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

标签 统计

c# ×6

wpf ×2

xaml ×2

.net ×1

azure ×1

c ×1

cassandra ×1

exception-handling ×1

gdi+ ×1

idisposable ×1

lua ×1

memory-leaks ×1

ms-access ×1

sql ×1

using ×1