|
Why would you want to display an image with that resolution on a form
|
|
|
|
|
100" TV?
Chuck Norris has the greatest Poker-Face of all time. He won the 1983 World Series of Poker, despite holding only a Joker, a Get out of Jail Free Monopoloy card, a 2 of clubs, 7 of spades and a green #4 card from the game UNO. In the movie "The Matrix", Chuck Norris is the Matrix. If you pay close attention in the green "falling code" scenes, you can make out the faint texture of his beard. Chuck Norris actually owns IBM. It was an extremely hostile takeover.
|
|
|
|
|
You mean with first simple resolution? How i can to convert resolution from hard to simple without loading picture to c# studio?
|
|
|
|
|
Get a better CPU and add some more RAM, upgrade the video card, etc.
Chuck Norris has the greatest Poker-Face of all time. He won the 1983 World Series of Poker, despite holding only a Joker, a Get out of Jail Free Monopoloy card, a 2 of clubs, 7 of spades and a green #4 card from the game UNO. In the movie "The Matrix", Chuck Norris is the Matrix. If you pay close attention in the green "falling code" scenes, you can make out the faint texture of his beard. Chuck Norris actually owns IBM. It was an extremely hostile takeover.
|
|
|
|
|
Hi
I have a piece of code that retrieves Oracle connection information and places it in a list box.
string ProviderName = "Oracle.DataAccess.Client";
DbProviderFactory factory = DbProviderFactories.GetFactory(ProviderName);
if (factory.CanCreateDataSourceEnumerator)
{
DbDataSourceEnumerator dsenum = factory.CreateDataSourceEnumerator();
DataTable dt = dsenum.GetDataSources();
foreach (DataRow dtvar in dt.Rows)
{
listBox1.Items.Add((dtvar.ItemArray[0].ToString() + " : " +
dtvar.ItemArray[1].ToString() + " : " +
dtvar.ItemArray[2].ToString() + " : " +
dtvar.ItemArray[3].ToString() + " : " +
dtvar.ItemArray[4].ToString()));
}
}
else
{
MessageBox.Show("Enum not provided by provider");
}
This works on one machine which adds lines like "DB1 : MYMACHINE : db1.domain.local : TCP : 1521"
but on another machine (with the same TNSNAMES.ora) gives "DB1 : : db1.domain.local : :"
i.e. the host name, protocol and port are not being retrieved.
Both machines have the same Oracle client (10g) and the same Oracle.DataAccess.dll (2.111.6.20)
Any ideas what could be different between the machines or what is causing the problem?
|
|
|
|
|
Few questions:
- is the ...\NETWORK\ADMIN\TNSNAMES.ORA-file identical in both machines
- is the ...\NETWORK\ADMIN\SQLNET.ORA-file identical in both machines
- is TNS_ADMIN defined in environment variables identically in both machines (or not defined at all)
- is TNS_ADMIN defined in registry (HKEY_LOCAL_MACHINE\Software\Oracle\HomeName) identically in both machines (or not defined at all)
- can you successfully connect to the db. If not what is the ORA-error
Mika
|
|
|
|
|
Hi
Thanks for the help.
The TNSNAMES.ORA file is identical on both machines and we copied the working one to the other machine with no effect.
The SQLNET.ORA is also identical.
Both machines are missing a TNS_ADMIN environment variable and both machines are missing the registry entry for TNS_ADMIN.
Both machines can connect to DB using c# normally.
As a correction in my question, the working machine is using Oracle 11 client whilst the non-working machine is Oracle 10g client.
Thanks
|
|
|
|
|
If I have understood correctly, Oracle 10g client reports TNS-entries differently than version 11. If the connection is established without errors, do you still want to resolve protocol and port to the list?
|
|
|
|
|
Hi all, I'm having a hard time getting my head around this() and base() , hoping someone can help.
Let's say I have classB which inherits classA both have a constructor and an overloaded constructor.
class classA
{
public classA()
{
}
public classA(int i)
{
}
}
class classB
{
public classB()
{
}
public classB(int i)
{
}
}
How do I get the overloaded constructor of classB to first call the default constructor of classB and then the similar overloaded constructor of the base class, classA ? I seem to be able to have it call either the default constructor of classB OR the overloaded constructor of classA by declaring the overloaded constructor of classB as
public classB(int i) : this()
or
public classB(int i) : base(i)
but how do I get it to call both?
|
|
|
|
|
First of all the proper way to inherit is :
public ClassB:ClassA
{
}
Secondly, when you are instianting ClassB it calls the parent constructor first and then instiante the derived class. For instance
ClassB cb = new ClassB()---> it calls the Parent no value(default constructor) first and then
public classB()
{
}
Thirdly, ClassB cb = new Classb(2)-->it calls the Parent value constructor in ur case is
public classA(int i)
{
} and then the dervied class constructor
public classB(int i)
{
//some code
}
hope it may help
|
|
|
|
|
Are you sure about that second case? As far as I understand (and can reproduce), if you instantiate ClassB cb = new ClassB(2) it calls the default constructor of ClassA first and then the overloaded constructor of ClassB . It never calls the overloaded constructor of ClassA as you say.
This is of course if you don't specify for the constructors whether they should be calling other constructors. If I wanted the overloaded constructor of ClassB to first call the overloaded constructor of ClassA as opposed to the default constructor of ClassA, I would have had to specify it as:
public ClassB(int i) : base(i)
{
}
Am I missing something?
|
|
|
|
|
Try the following:
class classA
{
public classA() : this(0)
{
}
public classA(int i)
{
}
}
class classB : classA
{
public classB() : base()
{
}
public classB(int i) : base(i)
{
}
} With this, calling the classB constructors will result in the appropriate classA constructors being called. If however, you want to explicitly perform some code in response to the constructors, I would create an OnInit method, and call it from public classA(int i) . This means that all of the paths through to it will be handled.
|
|
|
|
|
Pete O'Hanlon wrote: public classB() : base()
{
//some code
}
I think the call to base() is not needed here. When classB is instantiated, parameterless constructor of base class will be called.
|
|
|
|
|
Thanks, but this won't exactly do what I'm looking for. I'm looking for a way to have an instantiation of ClassB cb = new ClassB(1) make a call to both constructors of ClassB as well as the default constructor of ClassA.
The way you suggest would result in an instantiation as above to only call the overloaded constructors of both classes, but not the default onstructor of ClassA.
Not to worry though. The more I think about it, the more I realise that I'm trying to use OOP in a way it's not meant to be used. I've found another way to achieve what I want anyway.
Also, I think your suggestion of an OnInit method makes better sense as well.
Thanks again.
|
|
|
|
|
but how do I get it to call both?
You don't, cause you can only have on base instance, so you can't call two constructors. You'll have to put the code from both base class constructors into two protected methods and call each from the respective base class constructor, and call both from the derived class constructor.
|
|
|
|
|
Makes sense. I realised afterwards that this is really what OOP is all about. Thanks for the response.
|
|
|
|
|
class classB : classA
{
public classB() : this(5)
{
}
public classB(int i) : base("laser")
{
}
}
calling classB() will run both
betonglasermur.FeedDwarf(pur_is, 17);
ProcessStartupInfo.AintNotCreateNoWindow = (false && !true) != (true || false) ? false == true ? true : false : (true != false && false);
Morgonen är tröttmans mecka
|
|
|
|
|
Huh? You've got me nicely confused here. Are you being serious?
|
|
|
|
|
|
hadad wrote: how can I use the FileIOPermission class
I know many programmers come lately don't seem to believe that they need to read the documentation but one can actually find out how to use the FileIOPermission class by reading the documentation[^]
led mike
|
|
|
|
|
I really don't get it...
Do people just type in random words and hope it will work?
Or copy code off the web and jam it into their code and hope it works?
WTF?
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Mark Salsbery wrote: Do people just type in random words and hope it will work?
Or copy code off the web and jam it into their code and hope it works?
Yes
Mark Salsbery wrote: WTF?
I'm pretty sure this was the impetus behind the invention of the Filet-O-Fish
led mike
|
|
|
|
|
class PleaseWork
{
public void getPermission ()
{
MyComputer.GetBinnaryPermission (directory);
}
}
|
|
|
|
|
If I start typing "binnary" with two "n"s I'm going to scream.
It's like getting a stupid song stuck in my head...
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
yes !
stupid melody that you hear when you weak up in the morning.
BinnaryWriter
..nice class we shoud ask Microsoft to bring us a 'Binnary' Namespace
|
|
|
|