问题列表 - 第31712页

Hiding and Showing TabPages in tabControl

I am trying to show or hide tabpages as per user choice. If user selects gender male then form for male in a tabpage "male" should be displayed and if user selects female then similar next form should be displayed in next tab "female"

I tried using

tabControl1.TabPages.Remove(...)
Run Code Online (Sandbox Code Playgroud)

and

tabControl1.TabPages.Add(...)
Run Code Online (Sandbox Code Playgroud)

It adds and removes the tabpages but doing so will loose my controls on tabpages too... i can't see them back. what's the problem here?

vb.net tabcontrol tabpage

35
推荐指数
4
解决办法
13万
查看次数

How to write from n-th row to a file using perl

I have a source text in a file and looking for a code that would take the second (or n-th - in general) row from this file and print to a seperate file.

Any idea how to do this?

perl

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

interface inheritance without hiding

If I write class, then all ok

class C
{
    protected int _attr;
    int attr { get { return _attr; } }
}

class CWithSet : C
{
    int attr { set { _attr = value; } }
}
Run Code Online (Sandbox Code Playgroud)

But, if I write interface

interface I
{
    int attr { get; }
}

interface IWithSet : I
{
    int attr { set; }
}
Run Code Online (Sandbox Code Playgroud)

then I have warring: "'IWithSet.attr' hides inherited member 'I.attr'. Use the new keyword if hiding was …

c#

4
推荐指数
1
解决办法
2819
查看次数

数据库分层如何工作?

我可以在互联网上找到的唯一很好的参考是这个白皮书,它解释了数据库分层是什么,但没有解释它是如何工作的:

数据库分层背后的概念是多种(旧的和新的)数据库技术的无缝共存,以最好地解决业务问题。

但是,它是如何实施的?它是如何工作的?

任何与此相关的链接也会有所帮助。谢谢。

mysql database architecture oracle database-design

0
推荐指数
1
解决办法
503
查看次数

Frameworks are 'red' in Xcode

I downloaded a project developed by Apple employees ( who taught course at Stanford on iPhone application development). Strangely , the frameworks are red.

http://img.skitch.com/20100730-kcjun96mp2pxnpg7w3x6njw57.jpg

I tried to locate coreGraphics.framework and UIKit.framework to add them again but i couldnt find them either.

Taimur

iphone xcode iphone-sdk-3.0

31
推荐指数
4
解决办法
4万
查看次数

How to make a method generic when "type 'T' must be a reference type"?

Possible Duplicate:
Why do I get “error: … must be a reference type” in my C# generic method?

I have 2 Repository methods that are almost identical:

public IList<Fund> GetFundsByName(int pageSize, string searchExpression)
{
    return _session.CreateCriteria<Fund>()
        .AddNameSearchCriteria<Fund>(searchExpression)
        .AddOrder<Fund>(f => f.Name, Order.Asc)
        .SetMaxResults(pageSize).List<Fund>();
}

public IList<Company> GetCompaniesByName(int pageSize, string searchExpression)
{
    return _session.CreateCriteria<Company>()
        .AddNameSearchCriteria<Company>(searchExpression)
        .AddOrder<Company>(f => f.Name, Order.Asc)
        .SetMaxResults(pageSize).List<Company>();
}
Run Code Online (Sandbox Code Playgroud)

The only difference is that the first one's _session.CreateCriteria is of type Fund and the second one is company

I was …

c# generics nhibernate

78
推荐指数
2
解决办法
5万
查看次数

Deploying a WAR file gives me a 404 Status Code on Tomcat?

I am fairly new to Tomcat. I just managed to build a project and exported it as a WAR file. I tried manually copying a WAR file to the Tomcat folder then restarting. It created the folder structure and everything but I get a 404 Status code when I try to reach the application. I tried deploying it through the Tomcat Admin panel but I'm seeing the same behavior. Am I doing anything fundamentally wrong?

java deployment tomcat

29
推荐指数
6
解决办法
5万
查看次数

string.Format of a timer?

I've a time ticker event, I want to write it to a label in format ( hours:minutes:seconds 00:00:00 ) it does not print the 0 values! it shows like ::1 when starts to count... what to do? Solved, thanks for all replies

private void timer_Tick(object sender, EventArgs e)
        {
            seconds++;
            if(seconds == 59)
            {
                minutes++;
                seconds = 0;
            }
            if(minutes == 59)
            {
                hours++;
                minutes = 0;
            }

            this.label1.Text = string.Format("{0:##}:{1:##}:{2:##}", hours, minutes, seconds);
        }
Run Code Online (Sandbox Code Playgroud)

c#

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

Calculating the angle between two lines without having to calculate the slope? (Java)

I have two Lines: L1 and L2. I want to calculate the angle between the two lines. L1 has points: {(x1, y1), (x2, y2)} and L2 has points: {(x3, y3), (x4, y4)}.

How can I calculate the angle formed between these two lines, without having to calculate the slopes? The problem I am currently having is that sometimes I have horizontal lines (lines along the x-axis) and the following formula fails (divide by zero exception):

arctan((m1 - m2) / …
Run Code Online (Sandbox Code Playgroud)

java math geometry trigonometry coordinates

33
推荐指数
5
解决办法
6万
查看次数

How to destroy cookies on page refresh

Hello I need to destroy javascript cookies on a page refresh. I need to set a new bunch of cookies on every page load which help me render the web page based on user options. Is there a method to destroy cookies on a page refresh??

javascript cookies refresh

5
推荐指数
1
解决办法
1万
查看次数