Search Results

Search found 22641 results on 906 pages for 'case'.

Page 14/906 | < Previous Page | 10 11 12 13 14 15 16 17 18 19 20 21  | Next Page >

  • How to format a string to camel case in XSLT?

    - by DBA_Alex
    I'm trying to format strings in XSLT that needs to be in camel case to be used appropriately for the application I'm working with. For example: this_text would become ThisText this_long_text would become ThisLongText Is it possible to also set this up where I can send an input to the format so I do not have to recreate the format multiple times?

    Read the article

  • Simplify CASE in VB.net code

    - by StealthRT
    Hey all, i am looking here to see if anyone would have a better way to acomplish this task below in less code. Select Case mainMenu.theNumOpened Case 1 Me.Text = "NBMsg1" Me.SetDesktopLocation(My.Computer.Screen.WorkingArea.Width - 302, 5) Case 2 Me.Text = "NBMsg2" Dim hwnd As IntPtr = FindWindow(vbNullString, "NBMsg1") SetWindowPos(hwnd, 0, My.Computer.Screen.WorkingArea.Width - 302, Me.Height + 10, 0, 0, 1) Me.SetDesktopLocation(My.Computer.Screen.WorkingArea.Width - 302, 5) Case 3 Me.Text = "NBMsg3" Dim hwnd As IntPtr = FindWindow(vbNullString, "NBMsg2") SetWindowPos(hwnd, 0, My.Computer.Screen.WorkingArea.Width - 302, Me.Height + 10, 0, 0, 1) hwnd = FindWindow(vbNullString, "NBMsg1") SetWindowPos(hwnd, 0, My.Computer.Screen.WorkingArea.Width - 302, (Me.Height * 2) + 15, 0, 0, 1) Me.SetDesktopLocation(My.Computer.Screen.WorkingArea.Width - 302, 5) Case 4 Me.Text = "NBMsg4" Dim hwnd As IntPtr = FindWindow(vbNullString, "NBMsg3") SetWindowPos(hwnd, 0, My.Computer.Screen.WorkingArea.Width - 302, Me.Height + 10, 0, 0, 1) hwnd = FindWindow(vbNullString, "NBMsg2") SetWindowPos(hwnd, 0, My.Computer.Screen.WorkingArea.Width - 302, (Me.Height * 2) + 15, 0, 0, 1) hwnd = FindWindow(vbNullString, "NBMsg1") SetWindowPos(hwnd, 0, My.Computer.Screen.WorkingArea.Width - 302, (Me.Height * 3) + 20, 0, 0, 1) Me.SetDesktopLocation(My.Computer.Screen.WorkingArea.Width - 302, 5) Case 5 Me.Text = "NBMsg5" Dim hwnd As IntPtr = FindWindow(vbNullString, "NBMsg4") SetWindowPos(hwnd, 0, My.Computer.Screen.WorkingArea.Width - 302, Me.Height + 10, 0, 0, 1) hwnd = FindWindow(vbNullString, "NBMsg3") SetWindowPos(hwnd, 0, My.Computer.Screen.WorkingArea.Width - 302, (Me.Height * 2) + 15, 0, 0, 1) hwnd = FindWindow(vbNullString, "NBMsg2") SetWindowPos(hwnd, 0, My.Computer.Screen.WorkingArea.Width - 302, (Me.Height * 3) + 20, 0, 0, 1) hwnd = FindWindow(vbNullString, "NBMsg1") SetWindowPos(hwnd, 0, My.Computer.Screen.WorkingArea.Width - 302, (Me.Height * 4) + 25, 0, 0, 1) Me.SetDesktopLocation(My.Computer.Screen.WorkingArea.Width - 302, 5) Case 6 Me.Text = "NBMsg6" Dim hwnd As IntPtr = FindWindow(vbNullString, "NBMsg5") SetWindowPos(hwnd, 0, My.Computer.Screen.WorkingArea.Width - 302, Me.Height + 10, 0, 0, 1) hwnd = FindWindow(vbNullString, "NBMsg4") SetWindowPos(hwnd, 0, My.Computer.Screen.WorkingArea.Width - 302, (Me.Height * 2) + 15, 0, 0, 1) hwnd = FindWindow(vbNullString, "NBMsg3") SetWindowPos(hwnd, 0, My.Computer.Screen.WorkingArea.Width - 302, (Me.Height * 3) + 20, 0, 0, 1) hwnd = FindWindow(vbNullString, "NBMsg2") SetWindowPos(hwnd, 0, My.Computer.Screen.WorkingArea.Width - 302, (Me.Height * 4) + 25, 0, 0, 1) hwnd = FindWindow(vbNullString, "NBMsg1") SetWindowPos(hwnd, 0, My.Computer.Screen.WorkingArea.Width - 302, (Me.Height * 5) + 30, 0, 0, 1) Me.SetDesktopLocation(My.Computer.Screen.WorkingArea.Width - 302, 5) Case Else Me.Close() Me.Dispose() End Select What it does is pass to it now many windows are currently already opened. So if one then of course it goes to case 1. If there are 2 opened then it moves the oldest down and puts the newest on top. etc etc. I have set it so that a max of 6 boxes can only be opened at one time. If anyone knows how i could also "slide" them down (kinda like an effect of jQuery) then that would also be, well awesome to know! :o) Any help/suggestions would be great! :o) David

    Read the article

  • UISearch bar case sensitive off ? ? ?

    - by Flodev03
    hi all, in a table view i have set a UISearchBar set the delegate and add the protocol. When user tap a word everything is ok exept that the search of "tennis" and "Tennis" is not the same. How can i make the search bar a non case sensitive UISearchBar, i have search a lot please help it would be great thanks to all here is my code where i think evrything happens : thanks to all !!!! - (void)searchBar:(UISearchBar *)searchBar textDidChange:(NSString *)searchText { [tableData removeAllObjects];// remove all data that belongs to previous search if([searchText isEqualToString:@""]||searchText==nil){ [myTableView reloadData]; return; } NSInteger counter = 0; for(NSString *name in dataSource) { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc]init]; NSRange r = [name rangeOfString:searchText]; if(r.location != NSNotFound) [tableData addObject:name]; counter++; [pool release]; } [myTableView reloadData]; }

    Read the article

  • check for null date in CASE statement, where have I gone wrong?

    - by James.Elsey
    Hello, My source table looks like this Id StartDate 1 (null) 2 12/12/2009 3 10/10/2009 I want to create a select statement, that selects the above, but also has an additional column to display a varchar if the date is not null such as : Id StartDate StartDateStatus 1 (null) Awaiting 2 12/12/2009 Approved 3 10/10/2009 Approved I have the following in my select, but it doesn't seem to be working. All of the statuses are set to Approved even though the dates have some nulls select id, StartDate, CASE StartDate WHEN null THEN 'Awaiting' ELSE 'Approved' END AS StartDateStatus FROM myTable The results of my query look like : Id StartDate StartDateStatus 1 (null) Approved 2 12/12/2009 Approved 3 10/10/2009 Approved 4 (null) Approved 5 (null) Approved StartDate is a smalldatetime, is there some exception to how this should be treated? Thanks

    Read the article

  • Why can't I define a case-insensitve Dictionary in C#?

    - by Edward Tanguay
    This WPF code: using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Windows; using System.Windows.Controls; using System.Windows.Data; using System.Windows.Documents; using System.Windows.Input; using System.Windows.Media; using System.Windows.Media.Imaging; using System.Windows.Navigation; using System.Windows.Shapes; namespace TestDict28342343 { public partial class Window1 : Window { public Window1() { InitializeComponent(); Dictionary<string, string> variableNamesAndValues = new Dictionary<string, string>(StringComparison.InvariantCultureIgnoreCase); } } } gives me the error: The best overloaded method match for 'System.Collections.Generic.Dictionary.Dictionary(System.Collections.Generic.IDictionary)' has some invalid arguments Yet I find this code example everywhere such as here and here. How can I define a Dictionary whose keys are case-insensitve?

    Read the article

  • What is the initiating actor for the usecase shown here

    - by Illep
    I am new to drawing use case and writing use case descriptions. I have an Actor called User , an abstract usecase called Work Type and another use case called Manager. The usecase Manager has a generalized relationship with the Work Type use case. I'm now writing the use case description for Manager use case. And what is the initiating Actor for this use case. Is it the Actor User ? or doesn't it have an initiating Actor ? Note: I only want to know the initiating Actor for the use case Manager

    Read the article

  • Insert text depending on time of day and day of week.

    - by ploughansen
    I'm trying to piece together a php script to output different text depending on what day it is and the time of day. Example: On weekdays (mon-fri), I would like to output text according to the following periods of time (24H, server time, UTC): 00:00-08:00: "Lorem ipsum" 08:00-13:00: "dolor sit amet" 13:00-15:00: "Pellentesque habitant" 15:00-15:30: "dolor sit amet" 15:30-24:00: "Lorem ipsum" On weekends (sat-sun), I would like to output the following text in this time period: 00:00-24:00 "Lorem ipsum" Can anyone help with a php script to do that? I've already gotten some help over at the css-tricks forum. They supplied this code: <?php $date = strtotime("now"); $hour = date("H", $date); switch($hour) { case 00: case 01: case 02: case 03: case 04: case 05: case 06: case 07: case 08: $dets = array("img" => "image1.png", "txt" => "Lorem ipsum"); break; case 09: case 10: case 11: case 12: case 13: $dets = array("img" => "image2.png", "txt" => "dolor sit amet"); break; case 14: case 15: case 16: $dets = array("img" => "image3.png", "txt" => "Pellentesque habitant"); break; case 17: case 18: case 19: case 20: case 21: case 22: case 23: case 24: $dets = array("img" => "image1.png", "txt" => "Lorem ipsum"); break; } echo "<img src='$dets[img]' alt='$dets[txt]' />"; ?> But it works for all days, and only in full hours. I want to be able to specify per half-hour and on a day to day basis. Still a php-noob so I'm hoping someone can help me.

    Read the article

  • anti-static foam under a motherboard?

    - by user29734
    I am modding out a custom built case/system. I have my motherboard mounted on a metal tray, (Dell did this) has been working great. Not I am modding the case to hold everything and how I want to mount the motherboard on the tray I have a slight gap between the wall of the case and the motherboard/tray. Can I put a piece of thin anti-static foam/packaging in between the tray and the case? That is safe right?

    Read the article

  • VS2003 : c# case switch statement...

    - by dotnet-practitioner
    For ScoreOption, I expect to get the following input "A", "B", and T_(state) for example T_NY so.. how can I write case switch statement for third option T_(state) switch(ScoreOption.ToUpper().Trim()) { case "A": .... break; case "B": .... break; case T_???? .... break; } I might as well write if-else statement??

    Read the article

  • PHP Coding styles return; in switch/case

    - by ArneRie
    Hi , we're trying to implement new coding style guidelines for our team, the php codesniffer is printing an warning on switch case statements when no "break" is found like: switch ($foo) { case 1: return 1; case 2: return 2; default: return 3; } is there any good reason to use : switch ($foo) { case 1: return 1; break; } ?? the break is never reached ?

    Read the article

  • c# switch statement - variable "case"?

    - by dotnet-practitioner
    For ScoreOption, I expect to get the following input "A", "B", and T_(state) for example T_NY so.. how can I write case switch statement for third option T_(state) switch(ScoreOption.ToUpper().Trim()) { case "A": .... break; case "B": .... break; case T_???? .... break; } I might as well write if-else statement??

    Read the article

  • PHP ingore case sensitivity when comparing array values

    - by dan.codes
    I have to modify some code in a application I am working on that is using the array_diff($array1,$array2) method. The problem I am having is it is case sensitive and I need to have it return the correct value if the array values match even if the case is different. I don't want to change the case to lowercase because I need the value returned to keep its case. I'm a little confused as the best method to do this.

    Read the article

  • Cygwin environment variable case

    - by Michael
    For some reason on one pc, when variable names are going from batch file to Cygwin environment, they are capitalizing. On other the case stay intact. @set aa=bb %BASH% --login -c "set" so the output in one case will show AA=bb in other case aa=bb How to control the case of the exported variables?

    Read the article

  • OpenOffice - make autocorrect keep the original letter case

    - by houbysoft
    I use OpenOffice to write in about 5 languages, using the US keyboard only. I therefore make extensive use of the autocorrect feature to add accents and the like automatically. The problem is that OpenOffice insists on ignoring the letter case I use, and instead it always uses that which I used when setting up the autocorrect. For example, now when I type, in French, "D'apres", it gets converted to "d’après" instead of "D’après". Is there a way to tell OpenOffice not to change the letter case?

    Read the article

  • Mounting case-sensitive shared folder in VirtualBox

    - by rhettg
    I have an OSX host with a ubuntu VM trying to mount a shared folder. I'm using the options: sudo mount -t vboxsf -o uid=1000,gid=100 pg ~/pg-host The folder mounts fine, however it appears that the mounted directory is case-insensitive, even though my OSX drive is formatted case-sensitive. Are there any options to control this behavior ?

    Read the article

  • Need theoretical help, how to comprehend an if-else dependency net

    - by macbie
    I am going to face a following issue: I'm writing a program that manages some properties, some of them are general and some are specific. Each property is a pair of key and value, and for example: if it is given a general property and other specific property with exactly the same key and value has been existed before then the general property will swap the specific one in the register. If there are two the same general properties - both will remain in the register. And so on; it is like a net of dependencies. In my case I can handle with it intuitively and foresee all cases, but only because the system is not too vast. What if it would? I have met such problems a few times in many different programs and languages (i.e working with C semaphores) and my question is: How to approach this kind of problem? Is this connected with finite state machine, graph theory or something similar? How to be sure that I have considered the whole system and each possible case? Could you recommend some resources (books, sites) to learn from?

    Read the article

  • Visual Studio Code Metrics and the Maintainability index of switch case

    - by pee2002
    Hi there! As a person who loves to follow the best practices, If i run code metrics (right click on project name in solution explorer and select "Calculate Code Metrics" - Visual Studio 2010) on: public static string GetFormFactor(int number) { string formFactor = string.Empty; switch (number) { case 1: formFactor = "Other"; break; case 2: formFactor = "SIP"; break; case 3: formFactor = "DIP"; break; case 4: formFactor = "ZIP"; break; case 5: formFactor = "SOJ"; break; } return formFactor; } It Gives me a Maintainability index of 61 (of course this is insignificant if you have only this, but if you use an utility like class whos philosophy is doing stuff like that, your utility class will have the maintainability index much worst..) Whats the solution for this?

    Read the article

  • C# switch: case not falling through to other cases limitation

    - by Mike Fielden
    This question is kind of an add-on to this question In C#, a switch case cannot fall through to other cases, this causes a compilation error. In this case I am just adding some number to the month total for the selected month and each subsequent month thereafter. (simple example, not meant to be real) switch (month) { case 0: add something to month totals case 1: add something to month totals case 2: add something to month totals default: break; } Is there a logical alternative to this in C# without having to write out a ton of if statements? if (month <= 0) add something to month if (month <= 1) add something to month if (month <= 2) add something to month .... etc

    Read the article

  • Why would you want a case sensitive database?

    - by Khorkrak
    What are some reasons for choosing a case sensitive collation over a case insensitive one? I can see perhaps a modest performance gain for the DB engine in doing string comparisons. Is that it? If your data is set to all lower or uppercase then case sensitive could be reasonable but it's a disaster if you store mixed case data and then try to query it. You have then apply a lower() function on the column so that it'll match the corresponding lower case string literal. This prevents index usage in every dbms. So wondering why anyone would use such an option.

    Read the article

  • Strange behaviour of switch case with boolean value

    - by Nikhil Agrawal
    My question is not about how to solve this error(I already solved it) but why is this error with boolean value. My function is private string NumberToString(int number, bool flag) { string str; switch(flag) { case true: str = number.ToString("00"); break; case false: str = number.ToString("0000"); break; } return str; } Error is Use of unassigned local variable 'str'. Bool can only take true or false. So it will populate str in either case. Then why this error? Moreover this error is gone if along with true and false case I add a default case, but still what can a bool hold apart from true and false? Why this strange behaviour with bool variable?

    Read the article

  • Case insensitive string compare in LINQ-to-SQL

    - by BlueMonkMN
    I've read that it's unwise to use ToUpper and ToLower to perform case-insensitive string comparisons, but I see no alternative when it comes to LINQ-to-SQL. The ignoreCase and CompareOptions arguments of String.Compare are ignored by LINQ-to-SQL (if you're using a case-sensitive database, you get a case-sensitive comparison even if you ask for a case-insensitive comparison). Is ToLower or ToUpper the best option here? Is one better than the other? I thought I read somewhere that ToUpper was better, but I don't know if that applies here. (I'm doing a lot of code reviews and everyone is using ToLower.) Dim s = From row In context.Table Where String.Compare(row.Name, "test", StringComparison.InvariantCultureIgnoreCase) = 0 This translates to an SQL query that simply compares row.Name with "test" and will not return "Test" and "TEST" on a case-sensitive database.

    Read the article

  • Using "CASE" in Where clause to choose various column harm the performance

    - by zivgabo
    I have query which needs to be dynamic on some of the columns, meaning I get a parameter and according its value I decide which column to fetch in my Where clause. I've implemented this request using "CASE" expression: (CASE @isArrivalTime WHEN 1 THEN ArrivalTime ELSE PickedupTime END) >= DATEADD(mi, -@TZOffsetInMins, @sTime) AND (CASE @isArrivalTime WHEN 1 THEN ArrivalTime ELSE PickedupTime END) < DATEADD(mi, -@TZOffsetInMins, @fTime) If @isArrivalTime = 1 then chose ArrivalTime column else chose PickedupTime column. I have a clustered index on ArrivalTime and nonclustered index on PickedupTime. I've noticed that when I'm using this query (with @isArrivalTime = 1), my performance is a lot worse comparing to only using ArrivalTime. Maybe the query optimizer can't use\choose the index properly in this way? I compared the execution plans an noticed that when I'm using the CASE 32% of the time is being wasted on the index scan, but when I didn't use the CASE(just usedArrivalTime`) only 3% were wasted on this index scan. Anyone know the reason for this?

    Read the article

  • creating object according to the switch case value

    - by vincent
    hello, i have the following switch case: switch (appModel.currentPage){ case "Programma": case "Winkelwagen": case "Films": case "Contact": if (page){ removeChild(page); } //here i would like to create a new object page that has the type of the switch. i mean this: var page: getDefinitionByName(appModel.currentPage+"Page"); this doesnt work thou but it should be something like: "FilmsPage or ContactPage or ...". addChild(page); break; Does anyone know how to do this?

    Read the article

< Previous Page | 10 11 12 13 14 15 16 17 18 19 20 21  | Next Page >