Search Results

Search found 23261 results on 931 pages for 'case sensitive'.

Page 5/931 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • C# Switch-case Loop for Datagridview cells

    - by Nail Yener
    Hi, I am working on a form with datagridview and webbrowser controls. I have three columns as URL, username and password in datagridview. What I want to do is to automate the login for some websites that I use frequently. For that reason I am not sure if this is the right approach but I created the below code. The problem is with the argument of switch. I will click the row on datagridview and then click the login_button so that the username and password info will be passed to the related fields on the webpage. Why I need a switch-case loop is because all the webpages have different element IDs for username and password fields. As I said, I am not sure if datagridview allows switch-case, I searched the net but couldn't find any samples. private void login_button_Click(object sender, EventArgs e) { switch (dataGridView1.Rows[e.RowIndex].Cells[e.ColumnIndex].Value.ToString()) { case "http://www.website1.com": webBrowser1.Document.GetElementById("username").InnerText = dataGridView1.Rows[3].Cells[3].Value.ToString(); webBrowser1.Document.GetElementById("password").InnerText = dataGridView1.Rows[3].Cells[4].Value.ToString(); return; case "http://www.website2.com": webBrowser1.Document.GetElementById("uname").InnerText = dataGridView1.Rows[4].Cells[3].Value.ToString(); webBrowser1.Document.GetElementById("pswd").InnerText = dataGridView1.Rows[4].Cells[4].Value.ToString(); return; } HtmlElementCollection elements = this.webBrowser1.Document.GetElementsByTagName("Form"); foreach (HtmlElement currentElement in elements) { currentElement.InvokeMember("Login"); } }

    Read the article

  • Help with MySQL Query using CASE statement

    - by hairdresser-101
    I am trying to group a number of customers together based on their "Head Office" or "Parent" location. THis works ok except for a flaw which I didn't forsee when I was developing my system... For customers that did not have a "Parent" (standalone business) I defaulted the parent_id to 0. Therefore, my data would look like this: id parent_id customer 1 0 CustName#1 2 4 CustName#2 - Melbourne 3 4 CustName#2 - Sydney 4 0 CustName#2 (Head Office) What I want to do is Group my results together so that I have one row for CustName#1 and one row for CustName#2 BUT my problem is that there is no parent record for parent_id=0 and these rows are being excluded when using an inner join. I've tried using a case statement but that is not working either (parents are still being ignored) Any help would be greatly appreciated. Here is my query (My CASE is basically trying to get the business_name from the customer table based on the parent_id EXCEPT when the parent_id = 0, THEN just use the customer_name that is listed in the job_summary table): SELECT js.month_of_year, (CASE js.parent_id WHEN 0 THEN js.customer_name ELSE c.business_name END) as customer, SUM(js.jobs), SUM(js.total_cost), sum(js.total_sell) FROM JOB_SUMMARY js INNER JOIN customer c on js.parent_id=c.id group by js.month_of_year, (CASE c.parent_id WHEN 0 THEN js.customer_name ELSE c.business_name END) ORDER BY `customer` ASC

    Read the article

  • dynamical binding or switch/case?

    - by kingkai
    A scene like this: I've different of objects do the similar operation as respective func() implements. There're 2 kinds of solution for func_manager() to call func() according to different objects Solution 1: Use virtual function character specified in c++. func_manager works differently accroding to different object point pass in. class Object{ virtual void func() = 0; } class Object_A : public Object{ void func() {}; } class Object_B : public Object{ void func() {}; } void func_manager(Object* a) { a->func(); } Solution 2: Use plain switch/case. func_manager works differently accroding to different type pass in typedef _type_t { TYPE_A, TYPE_B }type_t; void func_by_a() { // do as func() in Object_A } void func_by_b() { // do as func() in Object_A } void func_manager(type_t type) { switch(type){ case TYPE_A: func_by_a(); break; case TYPE_B: func_by_b(); default: break; } } My Question are 2: 1. at the view point of DESIGN PATTERN, which one is better? 2. at the view point of RUNTIME EFFCIENCE, which one is better? Especailly as the kinds of Object increases, may be up to 10-15 total, which one's overhead oversteps the other? I don't know how switch/case implements innerly, just a bunch of if/else? Thanks very much!

    Read the article

  • MySQL nested CASE error I need help with?

    - by AK
    What I am trying to do here is: IF the records in table todo as identified in $done have a value in the column recurinterval then THEN reset date_scheduled column ELSE just set status_id column to 6 for those records. This is the error I get from mysql_error() ... You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'CASE recurinterval != 0 AND recurinterval IS NOT NULL THEN SET date_sche' at line 2 How can I make this statement work? UPDATE todo CASE recurinterval != 0 AND recurinterval IS NOT NULL THEN SET date_scheduled = CASE recurunit WHEN 'DAY' THEN DATE_ADD(date_scheduled, INTERVAL recurinterval DAY) WHEN 'WEEK' THEN DATE_ADD(date_scheduled, INTERVAL recurinterval WEEK) WHEN 'MONTH' THEN DATE_ADD(date_scheduled, INTERVAL recurinterval MONTH) WHEN 'YEAR' THEN DATE_ADD(date_scheduled, INTERVAL recurinterval YEAR) END WHERE todo_id IN ($done) ELSE SET status_id = 6 WHERE todo_id IN ($done) END The following mySQL statement worked just fine before I revised like above. UPDATE todo SET date_scheduled = CASE recurunit WHEN 'DAY' THEN DATE_ADD(date_scheduled, INTERVAL recurinterval DAY) WHEN 'WEEK' THEN DATE_ADD(date_scheduled, INTERVAL recurinterval WEEK) WHEN 'MONTH' THEN DATE_ADD(date_scheduled, INTERVAL recurinterval MONTH) WHEN 'YEAR' THEN DATE_ADD(date_scheduled, INTERVAL recurinterval YEAR) END WHERE todo_id IN ($done) AND recurinterval != 0 AND recurinterval IS NOT NULL

    Read the article

  • Anonymous exposes sensitive bank emails

    - by martin.abrahams
    As expected for quite a while, emails purporting to reveal alleged naughtiness at a major bank have been released today. A bank spokesman says "We are confident that his extravagant assertions are untrue". The BBC report concludes…  “Firms are increasingly concerned about the prospect of disgruntled staff taking caches of sensitive e-mails with them when they leave, said Rami Habal, of security firm Proofpoint. "You can't do anything about people copying the content," he said. But firms can put measures in place, such as revoking encryption keys, which means stolen e-mails become unreadable, he added.” Actually, there is something you can do to guard against copying. While traditional encryption lets authorised recipients make unprotected copies long before you revoke the keys, Oracle IRM provides encryption AND guards against unprotected copies being made. Recipients can be authorised to save protected copies, and cut-and-paste within the scope of a protected workflow or email thread – but can be prevented from saving unprotected copies or pasting to unprotected files and emails.  The IRM audit trail would also help track down attempts to open the protected emails and documents by unauthorised individuals within or beyond your perimeter.

    Read the article

  • Delphi Typed Constants in Case Statements

    - by Andreas Rejbrand
    What is the most elegant (or least ugly) way of using typed constants in a case statement in Delphi? That is, assume for this question that you need to declare a typed constant as in const MY_CONST: cardinal = $12345678; ... Then the Delphi compiler will not accept case MyExpression of MY_CONST: { Do Something }; ... end; but you need to write case MyExpression of $12345678: { Do Something }; ... end; which is error-prone, hard to update, and not elegant. Is there any trick you can employ to make the compiler insert the value of the constant (preferably by checking the value of the constant under const in the source code, but maybe by looking-up the value at runtime)? We assume here that you will not alter the value of the "constant" at runtime.

    Read the article

  • Sql Server Where Case Then Is Null Else Is Not Null

    - by Fabio Montezuma
    I have a procedure which receive a bit variable called @FL_FINALIZADA. If it is null or false I want to restrict my select to show only the rows that contain null DT_FINALIZACAO values. Otherwise I want to show the rows containing not null DT_FINALIZACAO values. Something like this: SELECT * FROM ... WHERE ... AND (OPE.DT_FINALIZACAO = CASE WHEN (@FL_FINALIZADA <> 1) THEN NULL END OR OPE.DT_FINALIZACAO IS NOT NULL) In this case I receive the message: None of the result expressions in a CASE specification can be NULL. How can I achieve this? Thanks in advance.

    Read the article

  • Case insensitive expectations in Rhino Mocks

    - by user313886
    I'm using Rhino Mocks to expect a call. There is a single parameter which is a string. But I'm not bothered about the case of the string. I want the test to pass even if the case is wrong. So I'm doing the following: //expect log message to be called with a string parameter. //We want to ignore case when verifiyig so we use a constraint instead of a direct parameter Expect.Call(delegate { logger.LogMessage(null); }).Constraints(Is.Matching<string>(x => x.ToLower()=="f2")); It seems a bit log winded. Is there a more sensible way of doing this?

    Read the article

  • Multiple conditions with CASE statements

    - by Pavan Reddy
    I need to query some data. here is the query that i have constructed but which isn't workig fine for me. For this example I am using AdventureWorks database. SELECT * FROM [Purchasing].[Vendor] WHERE PurchasingWebServiceURL LIKE case // In this case I need all rows to be returned if @url is '' or 'ALL' or NULL when (@url IS null OR @url = '' OR @url = 'ALL') then ('''%'' AND PurchasingWebServiceURL IS NULL') //I need all records which are blank here including nulls when (@url = 'blank') then (''''' AND PurchasingWebServiceURL IS NULL' ) //n this condition I need all record which are not like a particular value when (@url = 'fail') then ('''%'' AND PurchasingWebServiceURL NOT LIKE ''%treyresearch%''' ) //Else Match the records which are `LIKE` the input value else '%' + @url + '%' end This is not working for me. How can I have multiple where condition clauses in the THEN of the the same CASE? How can I make this work?

    Read the article

  • Protecting sensitive entity data

    - by Andreas
    Hi, I'm looking for some advice on architecture for a client/server solution with some peculiarities. The client is a fairly thick one, leaving the server mostly to peristence, concurrency and infrastructure concerns. The server contains a number of entities which contain both sensitive and public information. Think for example that the entities are persons, assume that social security number and name are sensitive and age is publicly viewable. When starting the client, the user is presented with a number of entities, not disclosing any sensitive information. At any time the user can choose to log in and authenticate against the server, given the authentication is successful the user is granted access to the sensitive information. The client is hosting a domain model and I was thinking of implementing this as some kind of "lazy loading", making the first request instantiating the entities and later refreshing them with sensitive data. The entity getters would throw exceptions on sensitive information when they've not been disclosed, f.e.: class PersonImpl : PersonEntity { private bool undisclosed; public override string SocialSecurityNumber { get { if (undisclosed) throw new UndisclosedDataException(); return base.SocialSecurityNumber; } } } Another more friendly approach could be to have a value object indicating that the value is undisclosed. get { if (undisclosed) return undisclosedValue; return base.SocialSecurityNumber; } Some concerns: What if the user logs in and then out, the sensitive data has been loaded but must be disclosed once again. One could argue that this type of functionality belongs within the domain and not some infrastructural implementation(i.e. repository implementations). As always when dealing with a larger number of properties there's a risk that this type of functionality clutters the code Any insights or discussion is appreciated!

    Read the article

  • The Use-Case Driven Approach to Change Management

    - by Lauren Clark
    In the third entry of the series on OUM and PMI’s Pulse of the Profession, we took a look at the continued importance of change management and risk management. The topic of change management and OUM’s use-case driven approach has come up in few recent conversations. So I thought I would jot down a few thoughts on how the use-case driven approach aids a project team in managing the project’s scope. The use-case model is one of several tools in OUM that is used to establish and manage the project's scope.  Because a use-case model can be understood by both business and IT project team members, it can serve as a bridge for ongoing collaboration as well as a visual diagram that encapsulates all agreed-upon functionality. This makes it a vital artifact in identifying changes to the project’s scope. Here are some of the primary benefits of using the use-case model as part of the effort for establishing and managing project scope: The use-case model quickly communicates scope in a straightforward manner. All project stakeholders can have a common foundation for the decisions regarding architecture and design and how they relate to the project's objectives. Once agreed upon, the model can be put under change control and any updates to the model can then be quickly identified as potentially affecting the project’s scope.  Changes requested or discovered later in the project can be analyzed objectively for their impact on project's budget, resources and schedule. A modular foundation for the design of the software solution can be established in Elaboration.  This permits work to be divided up effectively and executed in so that the most important and riskiest use-cases can be tackled early in the project. The use-case model helps the team make informed decisions about implementation priorities, which allows effective allocation of limited project resources.  This is very helpful in not only managing scope, but in doing iterative and incremental planning which relies heavily on the ability to identify project priorities. Bottom line is that the use-case model gives the project team solid understanding of scope early in the project.  Combine this understanding with effective project management and communication and you have an effective tool for reducing the risk of overruns in budget and/or time due to out of control scope changes. Now that you’ve had a chance to read these thoughts on the use-case model and project scope, please let me know your feedback based on your experience.

    Read the article

  • Case statements in VHDL

    - by cheryl
    Hi, When programming in VHDL, can you use a variable in a case statement? This variable will modified by one of the cases i.e. case task is when 1 => when 2 => when number => is this OK?

    Read the article

  • MYSQL CASE WHEN PROBLEM

    - by user305270
    SELECT `profiles`.* FROM `profiles` INNER JOIN `friendships` ON `profiles`.id = `friendships`.(CASE WHEN friendships.profile_id = 1 THEN`friend_id` ELSE `profile_id` END) How can i make the inner join like profile.id = friendships.(here will select the one key that is needed) but it doesnt work. please help :P it cant be: `profiles`.id = (CASE WHEN friendships.profile_id = 1 THEN `friendships`.`friend_id` ELSE `friendships`.`profile_id` END)

    Read the article

  • Why do switch statements continue after case

    - by John W.
    After evaluating a case in a switch statement in Java (and I am sure other languages) the following case's are also evaluated unless a control statement like break, or return is used. I understand this is probably an implementation detail, but what is/are the reasons for having this functionality happen? Thanks!

    Read the article

  • Use hash or case-statement [Ruby]

    - by user94154
    Generally which is better to use?: case n when 'foo' result = 'bar' when 'peanut butter' result = 'jelly' when 'stack' result = 'overflow' return result or map = {'foo' => 'bar', 'peanut butter' => 'jelly', 'stack' => 'overflow'} return map[n] More specifically, when should I use case-statements and when should I simply use a hash?

    Read the article

  • Is it possible to use CASE with IN?

    - by dkackman
    I'm trying to construct a T-SQL statement with a WHERE clause determined by an input parameter. Something like: SELECT * FROM table WHERE id IN CASE WHEN @param THEN (1,2,4,5,8) ELSE (9,7,3) END I've tried all combination of moving the IN, CASE etc around that I can think of. Is this (or something like it) possible?

    Read the article

  • patterns in case statement in bash scripting

    - by Ramiro Rela
    The man says that case statements use "filename expansion pattern matching". I usually want to have short names for some parameters, so I go: case $1 in req|reqs|requirements) TASK="Functional Requirements";; met|meet|meetings) TASK="Meetings with the client";; esac logTimeSpentIn "$TASK" I tried patterns like "req*" or "me{e,}t" which I understand would expand correctly to match those values in the context of filename expansion, but it doesn't work. Thanks.

    Read the article

  • Switch case in where clause (sql server)

    - by user685565
    I want to use case in sql statement where clause but I have a problem as I want to create a where clause condition on the basis of some value and I want to set a not in clause values on the basis of it here is the query where am facing an issue WHERE CODE = 'x' and ID not in ( case when 'app'='A' then '570','592' when 'Q' then ID 592,90 else 592,90 END but its not syntax

    Read the article

  • ATG Live Webcast June 28: Scrambling Sensitive Data in EBS 12 Cloned Environments

    - by BillSawyer
    Securing the Oracle E-Business Suite includes protecting the underlying E-Business data in production and non-production databases.  While steps can be taken to provide a secure configuration to limit EBS access, a better approach to protecting non-production data is simply to scramble (mask) the data in the non-production copy.   The Oracle E-Business Suite Template for Data Masking Pack can be used in situations where confidential or regulated data needs to be shared with other non-production users who need access to some of the original data, but not necessarily every table.  Examples of non-production users include internal application developers or external business partners such as offshore testing companies, suppliers or customers. The Oracle E-Business Suite Template for Data Masking Pack is applied to a non-production environment with the Enterprise Manager Grid Control Data Masking Pack.  When applied, the Oracle E-Business Suite Template for Data Masking Pack will create an irreversibly scrambled version of your production database for development and testing. This ATG Live Webcast is your chance to come learn about the Oracle E-Business Suite Release 12.1.3 Template for Data Masking Pack from the experts. Oracle E-Business Suite Release 12.1.3 Template for Data Masking The agenda for the Oracle E-Business Suite Template for Data Masking Pack webcast includes the following topics: What does data masking do in E-Business Suite environments? De-identify the data Mask sensitive data Maintain data validity How can EBS customers use data masking? References Join Eric Bing, Senior Director and Elke Phelps, Senior Principal Product Manager, as they discusses the Oracle E-Business Suite Template for Data Masking Pack.Date:                  Thursday, June 28, 2012Time:                 8:00AM Pacific Standard TimePresenters:     Eric Bing, Senior Director                           Elke Phelps, Senior Principal Product ManagerWebcast Registration Link (Preregistration is optional but encouraged) To hear the audio feed:    Domestic Participant Dial-In Number:           877-697-8128    International Participant Dial-In Number:      706-634-9568    Additional International Dial-In Numbers Link:    Dial-In Passcode:                                              100865To see the presentation:    The Direct Access Web Conference details are:    Website URL: https://ouweb.webex.com    Meeting Number:  599097152If you miss the webcast, or you have missed any webcast, don't worry -- we'll post links to the recording as soon as it's available from Oracle University.  You can monitor this blog for pointers to the replay. And, you can find our archive of our past webcasts and training here.If you have any questions or comments, feel free to email Bill Sawyer (Senior Manager, Applications Technology Curriculum) at BilldotSawyer-AT-Oracle-DOT-com.

    Read the article

  • Sensitive middle-button (mouse)

    - by Gilead
    Whenever I click on the middle-button on my mouse-wheel, it seems that multiple click events are being sent in succession. Case in point: when I middle-click a bookmark folder in Chrome (to open up all the bookmarks in tabs), Chrome opens up the same set of bookmarks three times. This is very annoying. Is there a way in X or Gnome to detune the sensitivity of my mouse's middle button to prevent multiple click events from being sent? Maybe like a double-click speed adjustment for the middle-button?

    Read the article

  • Proper Case Title Case Question

    - by Michael Quiles
    What am i doing wrong here? I want the users name to be shown in the output as propercase but I cant figure it out. string proper = this.xTripNameTextBox.Text; CultureInfo properCase = System.Threading.Thread.CurrentThread.CurrentCulture; TextInfo currentInfo = properCase.TextInfo; proper = currentInfo.ToTitleCase(proper); this.xTripOutputLabel.Text = proper + Environment.NewLine + "The total gallons you would use: " + Output.ToString("0") + Environment.NewLine + "Total amount it will cost you: " + Coutput.ToString("C") + Environment.NewLine +" Your customer number is " + rnd1.Next(1, 1000).ToString();

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >