半城柳色半声笛

文章 评论 浏览 26

半城柳色半声笛 2024-12-26 09:21:35

我只是在这里推测,但如果有人实现基于 CLR 的聚合函数,顺序可能会很重要。我之前在 C# 中实现了一个聚合函数,我有这样的感觉,根据聚合实际执行的操作,分组的顺序可能会影响它。

我对聚合 CLR 函数如何与引擎交互了解不够,无法真正说出更多内容:/

I am only speculating here, but it might be possible that if someone implements CLR based aggregate functions, that the order would matter. I've implemented a aggregate function before in C# and I have this feeling that depending on what the aggregation is actually doing, that there may be a chance that the order of the group by may effect it.

I don't know enough about how aggregate CLR functions interact with the engine to really say anything more than that :/

SQL GROUP BY 字段在所有情况下都是可交换的吗?

半城柳色半声笛 2024-12-26 06:57:44

创建 UITextField 的子类并重写下面给出的方法,

/*< Place holder position >*/
- (CGRect)textRectForBounds:(CGRect)bounds {

    bounds.size.width = bounds.size.width - 20.0f;
    return bounds;
}

/*< Text Posiotion >*/
- (CGRect)editingRectForBounds:(CGRect)bounds {

    bounds.size.width = bounds.size.width - 20.0f;
    return bounds;
}

干杯!

Create a subclass of UITextField and override the methods given below,

/*< Place holder position >*/
- (CGRect)textRectForBounds:(CGRect)bounds {

    bounds.size.width = bounds.size.width - 20.0f;
    return bounds;
}

/*< Text Posiotion >*/
- (CGRect)editingRectForBounds:(CGRect)bounds {

    bounds.size.width = bounds.size.width - 20.0f;
    return bounds;
}

Cheers !!!

UITextField 文本与清除按钮重叠

半城柳色半声笛 2024-12-26 06:07:27

如何让 Android 中的应用程序\服务即使用户破坏了它也能运行?

如果“distroied”是指用户通过“设置”应用程序强制停止应用程序,则从 Android 3.1 开始,您的应用程序将不会再次运行,直到用户手动启动您的 Activity(例如,通过主屏幕启动器)。

如果“distroied”意味着用户使用“任务杀手”杀死了应用程序,那么您的应用程序将不会再次运行,直到用户手动启动您的活动(例如,通过主屏幕启动器),至少通过Android 2.1。

即使用户关闭应用程序,我也需要一个类能够工作,我该怎么做?

重新设计您的应用程序,使其不再“即使用户关闭该应用程序,也需要一个类能够工作”。用户可以控制他们的手机,而你却不能。

how to make an application\service in android run even if the user distroied it?

If by "distroied" you mean the user force-stopped the application through the Settings application, your application will not run again until the user manually launches an activity of yours (e.g., through the home screen launcher), starting in Android 3.1.

If by "distroied" you mean the user killed the application using a "task killer", your application will not run again until the user manually launches an activity of yours (e.g., through the home screen launcher), at least through Android 2.1.

I need that one class will work even if the user will close tha application how can I do that?

Redesign your application to not "need that one class will work even if the user will close tha application". Users are in control of their phones -- you are not.

即使用户破坏了android中的应用程序,如何使该应用程序运行?

半城柳色半声笛 2024-12-26 02:22:11

完成向导后,在“设计”视图的底部,您应该会看到“列组”窗格。右键单击月份列组并选择组属性。

在出现的窗口中,您可以选择排序部分,您可以在其中更改或添加用于排序该组的字段。在您的情况下,您可能需要使用公式(fx 按钮),例如

 =SWITCH(Fields!Month_Achieved.Value = "January", 1,
         Fields!Month_Achieved.Value = "February", 2,
         Fields!Month_Achieved.Value = "March", 3,
 .
 .
 .
         Fields!Month_Achieved.Value = "December", 12)

This is if you 实际上从数据集中返回月份名称而不是月份的日期时间值。

After you complete the wizard, in the bottom of the Design view, you should see a pane for Column Groups. Right click on the month column group and select Group Properties.

In the resulting window you can select the Sorting section, where you can change or add the fields by which this group will be sorted. In your case, you might need to use a formula (the fx button) such as

 =SWITCH(Fields!Month_Achieved.Value = "January", 1,
         Fields!Month_Achieved.Value = "February", 2,
         Fields!Month_Achieved.Value = "March", 3,
 .
 .
 .
         Fields!Month_Achieved.Value = "December", 12)

This is if you are actually returning the Month names from your dataset and not a DateTime value for the month.

SSRS 2008 矩阵 - 如何对这个简单的数据集进行排序?

半城柳色半声笛 2024-12-25 20:36:15

Mobile SDK 可以帮助登录、oAuth 以及与 SFDC 对象进行通信。您需要像任何其他 iOS 应用程序一样实现推送通知服务。

要从 Salesforce 发布任何事件的通知,您可以使用 Urban Airship 或 Streaming API。

http://wiki.developerforce.com/page/Push_Notifications_for_Salesforce_Mobile_Apps_with_Urban_Airship

Mobile SDK can help in login, oAuth and to communicate with the SFDC objects. You need to implement Push Notification Services as any other iOS application does.

To post the notificaitons for any events from Salesforce you can use Urban Airship or Streaming API.

http://wiki.developerforce.com/page/Push_Notifications_for_Salesforce_Mobile_Apps_with_Urban_Airship

Salesforce mobilesdk iOS 带推送功能?

半城柳色半声笛 2024-12-25 20:20:38

这个问题有点难以理解,但我假设您想要使用 getImageData 和 putImageData 执行以下操作:

// save the entire canvas (in this example, its 500 x 500) to be restored later
image = context.getImageData(0, 0, 500, 500);

function draw() {
   context.clearRect(0, 0, canvas.width, canvas.height); // clear entire canvas
   context.putImageData(image, 0, 0); // restore entire canvas saved previously
   /** Now, draw other stuff on top of the canvas **/
}

The question is a little hard to understand, but I'm assuming what you want to do is the following using getImageData and putImageData:

// save the entire canvas (in this example, its 500 x 500) to be restored later
image = context.getImageData(0, 0, 500, 500);

function draw() {
   context.clearRect(0, 0, canvas.width, canvas.height); // clear entire canvas
   context.putImageData(image, 0, 0); // restore entire canvas saved previously
   /** Now, draw other stuff on top of the canvas **/
}

HTML5 中的橡皮筋

半城柳色半声笛 2024-12-25 13:26:57

您可以通过在 Parent 表单中将所需属性设置为公共属性来访问它们。不确定为什么您需要该按钮,如果您希望为单击执行某些操作,那么您应该将逻辑封装到单独的方法中,然后由它们进行调用。

如果您需要传递的详细信息较少,则为新表单创建接受这些值的构造函数

ChildForm child = new ChildForm([label1], [label2])

ChildForm child = new ChildForm([parent form reference]) // so you could access require components

You can access the required properties by setting them as public properties in your Parent form. Not sure as why you would want the button, if you want some thing to be executed for the click then you should encapsulate the logic into separate methods and them make the call.

If you have fewer details to pass then make constructors for the new form which would accept those values

ChildForm child = new ChildForm([label1], [label2])

or

ChildForm child = new ChildForm([parent form reference]) // so you could access require components

如何从一个 Windows 窗体控件访问另一个 Windows 窗体控件?

半城柳色半声笛 2024-12-25 12:37:24

像这样的事情:

    ' A Start date an end Date to test with
    Dim StartingDate As DateTime = DateTime.Now
    Dim TargetEndDate As DateTime = DateTime.Now.AddYears(1).AddDays(5).AddMinutes(45)

    ' Get the difference between the two dates, and Create a new Date containing just the total days
    Dim DifferenceBetweenDates As TimeSpan = TargetEndDate.Subtract(StartingDate)
    Dim DiffFromSystemDate As New DateTime(0, 0, DifferenceBetweenDates.TotalDays)

    ' Get the number of years, months and days left
    Dim NumberOfYears As Integer = DiffFromSystemDate.Year - 1
    Dim NumberOfMonths As Integer = DiffFromSystemDate.Month - 1
    Dim NumberOfDays As Integer = StartingDate.Day - DateTime.DaysInMonth(StartingDate.Year, StartingDate.Month)

    ' Build up the result string
    Dim Result As String = String.Format("{0} YEAR, {1} MONTHS, {3} DAYS LEFT", NumberOfYears, NumberOfMonths, NumberOfDays)
  1. 我还没有编译它
  2. 它还没有完全工作(闰年和一年中的几天)

请参阅重复中的 JonSkeets 帖子以获得更好的方法

Something like this:

    ' A Start date an end Date to test with
    Dim StartingDate As DateTime = DateTime.Now
    Dim TargetEndDate As DateTime = DateTime.Now.AddYears(1).AddDays(5).AddMinutes(45)

    ' Get the difference between the two dates, and Create a new Date containing just the total days
    Dim DifferenceBetweenDates As TimeSpan = TargetEndDate.Subtract(StartingDate)
    Dim DiffFromSystemDate As New DateTime(0, 0, DifferenceBetweenDates.TotalDays)

    ' Get the number of years, months and days left
    Dim NumberOfYears As Integer = DiffFromSystemDate.Year - 1
    Dim NumberOfMonths As Integer = DiffFromSystemDate.Month - 1
    Dim NumberOfDays As Integer = StartingDate.Day - DateTime.DaysInMonth(StartingDate.Year, StartingDate.Month)

    ' Build up the result string
    Dim Result As String = String.Format("{0} YEAR, {1} MONTHS, {3} DAYS LEFT", NumberOfYears, NumberOfMonths, NumberOfDays)
  1. I haven't compiled it yet
  2. It doesn't fully work (leap years, and days of the year)

Please see JonSkeets post in the duplicate for a better way of doing this

Vb.net 中两个日期之间的差异(0 年、0 个月、还剩 0 天)

半城柳色半声笛 2024-12-25 09:20:29

你有很多代码。我将进行更深入的研究,但要点是,当渲染器的数据属性发生变化时,您不会更改组件。因此,渲染器如何知道何时更改其显示的值?

因此,第一个评论是,在 List 组件的初始渲染期间通常会创建单个渲染器。看到创作完成两次火灾并不罕见。

第二条评论是,对于任何初始化代码来说,creationComplete 通常都是一个可怕的地方。阅读 Spark 或 <一个href="http://livedocs.adobe.com/flex/3/html/help.html?content=ascomponents_advanced_2.html" rel="nofollow">光环。如果您想访问组件的子组件,则预初始化事件更好,或者初始化事件更好。

第三,您需要研究并阅读渲染回收。要点是,当您滚动列表时,每个渲染器都会被重复使用。数据发生变化。它不会被再次创建。 List 组件只是传入新数据并期望渲染器知道要做什么。您的“creationComplete”代码很可能需要移至 dataChange 事件处理程序。

第四,您应该利用 Flex 组件生命周期。看起来您的渲染和调整大小显示方法应该移至 updateDisplayList() 中,该方法应该处理子组件的大小调整和定位。

重新编写渲染器将花费相当多的时间;所以我半途放弃了。但是,请仔细阅读我提供的一些链接,尝试一下,如果遇到问题再回来。

You have a lot of code. I'll take a more in depth look, but the gist is that you are not changing your component when the data property of your renderer changes. As such, how will the renderer know when to change the values it displays?

So, first comment is that a single renderer is often created during the List component's initial rendering. This is not unusual to see a creationComplete fire twice.

Second comment is that creationComplete is often a horrible place for any initializing code. Read up on the Flex Component LifeCycle for Spark or Halo. The pre-initialize event is better, or the the initialze event if you want to access a component's children.

Third, you need to research and read about render recycling. The gist is that as you scroll through the list, each renderer is re-used. The data changes. It is not created again. The List component just passes in new data and expects the renderer to know what to do. Your 'creationComplete' code will most likely need to move to a dataChange event handler.

Fourth you should make use of the Flex Component LifeCycle. It looks like your render and resize display methods should move into updateDisplayList() which is supposed to handle sizing and positioning of the components children.

It's going to take quite a bit of time to re-write your renderer; so I gave up half way through. But, read through some of the links I provided, give a crack at it and come back if you have problems.

s:UIComponent 列表未通过自定义 ItemRenderer 很好地呈现

半城柳色半声笛 2024-12-25 06:25:10

这个问题是多余的。

如何忽略二进制序列化的事件类成员?

您在类中错过了 [Serialized] 属性,并且由于事件不可序列化,您需要将其标记为委托事件的 [field: NonSerialized]

This question is redundant.

How to ignore Event class member for binary serialization?

You missed [Serializable] attribute in your class and also because event is not serialable you need to mark it as [field: NonSerialized] to your delegate event.

我不知道为什么我的类无法序列化

半城柳色半声笛 2024-12-25 03:29:19

为父级提供某种类名或 id,然后使用它:

$('#s1').parent('.parent').toggle(false);

Give the parent some sort of classname or an id, and use that:

$('#s1').parent('.parent').toggle(false);

切换顶部父级
使用jquery从子元素

半城柳色半声笛 2024-12-25 02:27:56

就我而言,只需将此行添加到deploy.rb 文件中

set :scm, :git

In my case it was a matter of adding this line into deploy.rb file

set :scm, :git

Capistrano 不会创建版本

半城柳色半声笛 2024-12-24 22:48:20

我想说,由于问题中缺乏输入数据,移植需要 2-3 个月的时间。当然,如果这意味着同时学习 Obj-C,那将是一场艰苦的战斗。

OpenGL 在每个运行时都是相同的,因此移植应该很简单,甚至可以在本机应用程序的上下文中运行 JS。

Apple 并不关心你向 App Store 提交的内容,只要它有效即可。

I'd say it takes 2-3 months to port, with the lack of input data in the question. Of course if this means learning Obj-C simultaneously it will be some uphill battle.

OpenGL is all the same in every run-time, so porting should be straightforward, or even running JS in the context of a native app.

Apple doesnt care what you submit to App Store as long as it works.

将 WebGL 游戏移植到 iPhone 的原生 OpenGL?

半城柳色半声笛 2024-12-24 20:42:13

如果您只有一个应用程序使用 SQL Server,那么使用 SSRS 托管报告还有什么意义?

是的。

我认为只有当您要托管由多个单独的应用程序使用的报告时,SSRS 才有意义。

我可以想到针对单个应用程序进行 SSRS 部署的两个用例(尽管我确信还有更多):

  • 如果您有复杂的报告要求。需要大量 CPU 周期来构建的计算成本较高的报告(瓶颈:客户的 Celeron)、需要大量数据来构建的简单报告(瓶颈:客户的 ADSL)或介于两者之间的任何报告都属于此类。在功能强大的服务器上进行所有处理,然后将结果返回给客户端是有意义的。

  • 如果您希望轻松管理独立于应用程序版本的报告。我帮助维护一个应用程序,该应用程序在每个版本中都分发了应用程序和报告。因为新版本通常是一件大事,所以我们尽可能避免它们。这意味着,如果应用程序不需要维护,我们可以在发布之间间隔 3 个月。这意味着对报告的小修复不会尽快推送给客户。新报告也是如此(客户喜欢新报告)。如果一切都通过 SSRS 控制,我们可以根据需要添加/编辑/删除报告。

后一种用例需要随时访问 SSRS 才有意义,它可能最适合多租户应用程序。

Is there any point in using SSRS to host your reports if you are only going to have one application using your SQL Server?

Yes.

I would have thought SSRS makes sense only if you are going to host reports that are going to be consumed by several separate applications.

I can think of two use cases for SSRS deployments for single applications (although I'm sure there are more):

  • If you have complex reporting requirements. Computationally expensive reports that require lots of CPU cycles to construct (bottleneck: Client's Celeron), simple reports that require lots of data to build (bottleneck: Client's ADSL), or anything in between will fall in to this category. It makes sense to do all the processing on powerful servers, and then render the result back to the client.

  • If you want easy management of reports separate to application releases. I help maintain an application which has both the application and reports distributed in each release. Because new releases are typically a big deal, we avoid them where possible. This means that if there's no maintenance required in the application, we can go 3 months between releases. This means small fixes to reports aren't pushed out to clients as fast as possible. Same goes for new reports (clients love new reports). If everything was controlled via SSRS, we could add/edit/remove reports as required.

The latter use case requires readily available access to SSRS to make sense, it's probably best suited to multi-tenant applications.

SQL Server Reporting Services 具有单个离散应用程序?

半城柳色半声笛 2024-12-24 18:09:48

奇怪的是你不能创建 10000 个元素的长数组。我相信你的问题不是数组长度而是特定数组元素的值。无论如何,如果您需要更大的数组,请使用列表。具体来说是java.util.LinkedList。

It is strange that you cannot create 10000 elements long array. I believe that your problem is not the array length but the value of particular array element. Anyway if you need bigger arrays use Lists instead. Specifically java.util.LinkedList.

Java中如何处理大数组

更多

推荐作者

α

文章 0 评论 0

メ斷腸人バ

文章 0 评论 0

人间不值得

文章 0 评论 0

往事风中埋

文章 0 评论 0

别理我

文章 0 评论 0

    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文