5 in a 1 to 10 range
-
adgonz wrote:
I think I could rank this with 5
That is because VB's scale starts at 5 ;P
xacc.ide - now with TabsToSpaces support
IronScheme - 1.0 beta 2 - out now!
((lambda (x) `((lambda (x) ,x) ',x)) '`((lambda (x) ,x) ',x))so one couldn't do any better in VB? :)
-
so one couldn't do any better in VB? :)
C#:
string[] codes = { "bad", "good" };
int rating = Array.IndexOf(codes, "bad") * 5; // use 5 star systemNow do the VB one! :)
xacc.ide - now with TabsToSpaces support
IronScheme - 1.0 beta 2 - out now!
((lambda (x) `((lambda (x) ,x) ',x)) '`((lambda (x) ,x) ',x))modified on Wednesday, April 15, 2009 11:05 AM
-
C#:
string[] codes = { "bad", "good" };
int rating = Array.IndexOf(codes, "bad") * 5; // use 5 star systemNow do the VB one! :)
xacc.ide - now with TabsToSpaces support
IronScheme - 1.0 beta 2 - out now!
((lambda (x) `((lambda (x) ,x) ',x)) '`((lambda (x) ,x) ',x))modified on Wednesday, April 15, 2009 11:05 AM
-
C#:
string[] codes = { "bad", "good" };
int rating = Array.IndexOf(codes, "bad") * 5; // use 5 star systemNow do the VB one! :)
xacc.ide - now with TabsToSpaces support
IronScheme - 1.0 beta 2 - out now!
((lambda (x) `((lambda (x) ,x) ',x)) '`((lambda (x) ,x) ',x))modified on Wednesday, April 15, 2009 11:05 AM
I wouldn't know where to start, except for tossing out all those fancy brackets and semi-colons... :)
-
C#:
string[] codes = { "bad", "good" };
int rating = Array.IndexOf(codes, "bad") * 5; // use 5 star systemNow do the VB one! :)
xacc.ide - now with TabsToSpaces support
IronScheme - 1.0 beta 2 - out now!
((lambda (x) `((lambda (x) ,x) ',x)) '`((lambda (x) ,x) ',x))modified on Wednesday, April 15, 2009 11:05 AM
Leppie, I think you need to step away from the computer and get some rest.
-
Um, the Array.IndexOf method looks a little off. Shouldn't it be
Array.IndexOf(codes, "bad")
? -
If the worst horror you could find in my company is ranked 10 and a moderate horror is ranked 1, I think I could rank this with 5:
Dim key As String key= "N" key= "linatipedi=" + "'" + key+ "'" Dim rR As DataRow() = t.Select(key) If rR.Length() = 0 Then i = 0 Else Try For Each r In rR i += 1 Next r Catch If i = 0 Then Return True Else Return False End If End Try End If If i = 0 Then Return True Else Return False End If
Oh, come on... Even VB can do this in one line plus exception handling...
Try
Return t.Select("linatipedi='N'").Length = 0 // *resists urge to type two ='s*
Catch
Return False
End TryMan, if this is a 5, I'd really hate to see a 10... Translation: Post one of the 10's! Heheh
-
Yeah, now fixed, my brain needs rest now! :sigh:
xacc.ide - now with TabsToSpaces support
IronScheme - 1.0 beta 2 - out now!
((lambda (x) `((lambda (x) ,x) ',x)) '`((lambda (x) ,x) ',x))leppie wrote:
Yeah, now fixed, my brain needs rest now!
...too much VB code for that one
-
Oh, come on... Even VB can do this in one line plus exception handling...
Try
Return t.Select("linatipedi='N'").Length = 0 // *resists urge to type two ='s*
Catch
Return False
End TryMan, if this is a 5, I'd really hate to see a 10... Translation: Post one of the 10's! Heheh
-
C#:
string[] codes = { "bad", "good" };
int rating = Array.IndexOf(codes, "bad") * 5; // use 5 star systemNow do the VB one! :)
xacc.ide - now with TabsToSpaces support
IronScheme - 1.0 beta 2 - out now!
((lambda (x) `((lambda (x) ,x) ',x)) '`((lambda (x) ,x) ',x))modified on Wednesday, April 15, 2009 11:05 AM
-
Oh, come on... Even VB can do this in one line plus exception handling...
Try
Return t.Select("linatipedi='N'").Length = 0 // *resists urge to type two ='s*
Catch
Return False
End TryMan, if this is a 5, I'd really hate to see a 10... Translation: Post one of the 10's! Heheh
Ian Shlasko wrote:
// *resists urge to type two ='s*
'Couldn't resist the temptation to use C++-style comments though.
-
Ian Shlasko wrote:
// *resists urge to type two ='s*
'Couldn't resist the temptation to use C++-style comments though.
Ack! I totally missed that... Well, shows how much I've tried to get away from VB.
-
C#:
string[] codes = { "bad", "good" };
int rating = Array.IndexOf(codes, "bad") * 5; // use 5 star systemNow do the VB one! :)
xacc.ide - now with TabsToSpaces support
IronScheme - 1.0 beta 2 - out now!
((lambda (x) `((lambda (x) ,x) ',x)) '`((lambda (x) ,x) ',x))modified on Wednesday, April 15, 2009 11:05 AM