Search Results

Search found 2601 results on 105 pages for 'if condition'.

Page 66/105 | < Previous Page | 62 63 64 65 66 67 68 69 70 71 72 73  | Next Page >

  • Programming issue while applying text to the third party control.

    - by srivatsa
    Hello I have used some third party controls in my windows application. There is a snippet which is being used in our code which re-initializes all the .text property of all the controls on the form. Everything works fine except for a control. This control is similar to the Windows Panel except for it has a dropdown appearance. This control has .Caption property instead of .Text property associated to it. This causes the problem whenever i use such codes foreach (Control oControl in this.Controls) { if (oControl is DropDownPanel) { { oControl.Text = rm_ResourceManager.GetString(oControl.Name + ".Text"); } } } The text is not set here for the DropDownPanel control in the above method. Since .Text is not available for DropDownPanel control. I cannot do the following either .. ((DropDownPanel)oControl).Caption = rm_ResourceManager.GetString(oControl.Name + ".Text"); Cos it shall throw exception if i try to cast oControl with that of DropDownPanel Any ideas how can i overcome such a condition. Regards

    Read the article

  • When does a query/subquery return a NULL and when no value at all?

    - by AspOnMyNet
    a) If a query/subquery doesn’t find any matching rows, then it either returns NULL or no value at all, thus not even a NULL value. Based on what criteria does a query/subquery return a NULL and when doesn’t it return any results, not even a NULL value? b) I assume a scalar subquery will always return NULL, when no matching rows are found? I assume most-outer scalar query also returns NULL if no rows are found? c) SELECT FirstName, LastName, YEAR(BirthDate) FROM Persons WHERE YEAR(BirthDate) IN (SELECT YearReleased FROM Albums); If subquery finds no results, is then a WHERE clause of an outer query translated into WHERE YEAR(BirthDate) IN (null); ? If instead WHERE clause is translated into WHERE YEAR(BirthDate) IN(); then shouldn’t that be an error condition, since how can YEAR(BirthDate) value be compared to nothing? thanx

    Read the article

  • In registration form adding date dialogbox how can apply validation in system date in dialog ends

    - by narasimha
    hi i am implementing registration form adding date field then click icon to display date dialog window then limit date validation in system date below date only how can implement the validation protected Dialog onCreateDialog(int id) { Calendar c = Calendar.getInstance(); int cyear = c.get(Calendar.YEAR); int cmonth = c.get(Calendar.MONTH); int cday = c.get(Calendar.DAY_OF_MONTH); switch (id) { case DATE_DIALOG_ID: return new DatePickerDialog(this, mDateSetListener, cyear, cmonth, cday); } return null; } private DatePickerDialog.OnDateSetListener mDateSetListener = new DatePickerDialog.OnDateSetListener() { public void onDateSet(DatePicker view, int year, int monthOfYear, int dayOfMonth) { String date_selected = String.valueOf(monthOfYear+1)+" /"+String.valueOf(dayOfMonth)+" /"+String.valueOf(year); EditText birthday=(EditText) findViewById(R.id.EditTextBirthday); birthday.setText(date_selected); } }; public void onClick(View v) { if(v == b1) showDialog(DATE_DIALOG_ID); } } ** showing in system date in below dates only how can implemented some solution in running year to below years are display not incrementing above years this condition are appliying validations how can implemented ?

    Read the article

  • Stored Procedure to create Insert statements in MySql ??

    - by karthik
    I need a storedprocedure to get the records of a Table and return the value as Insert Statements for the selected records. For Instance, The stored procedure should have three Input parameters... 1- Table Name 2- Column Name 3- Column Value If 1- Table Name = "EMP" 2- Column Name = "EMPID" 3- Column Value = "15" Then the output should be, select all the values of EMP where EMPID is 15 Once the values are selected for above condition, the stored procedure must return the script for inserting the selected values. The purpose of this is to take backup of selected values. when the SP returns a value {Insert statements}, c# will just write them to a .sql file. I have no idea about writing this SP, any samples of code is appreicated. Thanks..

    Read the article

  • add text to UITextField at desired location

    - by Ankit Sachan
    Hello, Hello, I am quite new to iphone development. I have a situation here. I have some labels which can be dragged across the screen. When any of these labels are dragged to some textfield and released over a textfields UIlabel test is assigned to that text field. Now the problem is this I want to assign the text of UILabel to some specific position in textfield according to release of textfield i.e If user releases at the beginning of text field then it should be appended at the beginning and if somewhere near end of text of textfield then it should be appendended at the end. Can you help me to fabricate this condition. Thanx in advance

    Read the article

  • Rails, search item in different model?

    - by Danny McClelland
    Hi Everyone, I have a kase model which I am using a simple search form in. The problem I am having is some kases are linked to companies through a company model, and people through a people model. At the moment my search (in Kase model) looks like this: # SEARCH FACILITY def self.search(search) search_condition = "%" + search + "%" find(:all, :conditions => ['jobno LIKE ? OR casesubject LIKE ? OR transport LIKE ? OR goods LIKE ? OR comments LIKE ? OR invoicenumber LIKE ? OR netamount LIKE ? OR clientref LIKE ? OR kase_status LIKE ? OR lyingatlocationaddresscity LIKE ?', search_condition, search_condition, search_condition, search_condition, search_condition, search_condition, search_condition, search_condition, search_condition, search_condition]) end What I am trying to work out, is what condition can I add to allow a search by Company or Person to show the cases they are linked to. @kase.company.companyname and company.companyname don't work :( Is this possible? Thanks, Danny

    Read the article

  • linq NullReferenceException while checking for null reference

    - by Odrade
    I have the following LINQ query: List<FileInputItem> inputList = GetInputList(); var results = from FileInputItem f in inputList where ( Path.GetDirectoryName(f.Folder).ToLower().Trim() == somePath || Path.GetDirectoryName(f.Folder).ToLower().Trim() == someOtherPath ) && f.Expression == null select f; Every time this query is executed, it generates a NullReferenceException. If I remove the condition f.Expression == null or change it to f.Expression != null, the query executes normally (giving the wrong results, of course). The relevant bits of FileInputItem look like this: [Serializable] public class FileInputItem { [XmlElement("Folder")] public string Folder { get; set; } [XmlElement("Expression")] public string Expression { get; set; } /*SNIP. Irrelevant properties */ } I'm new to LINQ to objects, so I'm probably missing something fundamental here. What's the deal?

    Read the article

  • What is your favourite JavaScript reference manual?

    - by daniel.sedlacek
    Hi, I come from strong typed unambiguous OOP background and I struggle to find JavaScript reference manual that would fit my needs. The ideal one should be: compendious and handy, I'm not looking for ECMA standart reference. type specific, even if JS is not strong typed function arguments and returns have a type. browser specific, no matter the standards every browser is different and this ambiguity is killing me. examples, they are always handy. off line, this would be fine but it's not a condition. What is your favourite one? Help me, Obi-Wan Kenobi; you're my only hope!

    Read the article

  • Matching process , issue with query

    - by Blerta Blerta
    i have this code which helps me match two different tables.. now, each of this tables, has a epos_id and a rbpos_id ! I have another table which has pairs of rbpos_id and epos_id, something like: id | epos_id | rbpos_id 1 a3566 465jd 2 hkiyb rbposi When i join this other table, i need to check this condition, i mean, the matching should be done, only and if, the epos_id and rbpos_id of the join i'm doing, have the same id,i mean, belong to the same row.. Here is my current query... Thanks! SELECT retailer.date, retailer.time, retailer.location, retailer.user_id,imovo.mobile_number ". "FROM retailer LEFT JOIN imovo ". " ON addtime(retailer.time, '0:0:50')>imovo.time AND retailer.time <imovo.time AND retailer.date=imovo.date

    Read the article

  • PHP: Using browscap.ini on shared host. - ini_set() failing

    - by GreybeardTheUnready
    I'm trying to use get_browser() , unfortunately my page is on a shared host, and I have no access to php.ini. I have downloaded the latest version of browscap.ini and placed in my document root. I have then added the following:- if (!ini_set('browscap', '/home/private stuff/browscap.ini')) { echo "Failed to set browscap"; } else { echo "browscap = [" . ini_get('browscap') . "]"; } exit(); But this fails, (nb: the echo statement for the failed condition always shows [] - even if I didn;t have the browscap.ini file the setting should still show up in the ini_get.... shouldn't it?) I have looked at the previous questions on this and they don't seem to help, any ideas?

    Read the article

  • Are memcached entries saved by the Danga client compatible with the Spy client?

    - by jigjig
    After saving a String value into memcached using the Danga client, I attempted to get the entry using the Spy client. The two String values are not the same. The Danga client retrieves a string with an additional empty char prepended to the string, therefore violating the equality condition. Danga: t,e,s,t,s,t,r,i,n,g Spy: ,t,e,s,t,s,t,r,i,n,g I also attempted to save a serialized Map using the Danga client and get the Map using the Spy client. The Spy client is able to only get a String form of the Map. The string contains binary values, as below: sr

    Read the article

  • Sqlite3 activerecord :order => "time DESC" doesn't sort

    - by Ole Morten Amundsen
    rails 2.3.4, sqlite3 I'm trying this Production.find(:all, :conditions = ["time ?", start_time.utc], :order = "time DESC", :limit = 100) The condition works perfectly, but I'm having problems with the :order = time DESC. By chance, I discovered that it worked at Heroku (testing with heroku console), which runs PostgreSQL. However, locally, using sqlite3, new entries will be sorted after old ones, no matter what I set time to. Like this (output has been manually stripped): second entry is new: Production id: 2053939460, time: "2010-04-24 23:00:04", created_at: "2010-04-24 23:00:05" Production id: 2053939532, time: "2010-04-25 10:00:00", created_at: "2010-04-27 05:58:30" Production id: 2053939461, time: "2010-04-25 00:00:04", created_at: "2010-04-25 00:00:04" Production id: 2053939463, time: "2010-04-25 01:00:04", created_at: "2010-04-25 01:00:04" Seems like it sorts on the primary key, id, not time. Note that the query works fine on heroku, returning a correctly ordered list! I like sqlite, it's so KISS, I hope you can help me... Any suggestions?

    Read the article

  • Problem while looping on a NSDictionary

    - by Tom
    Hi! The end of my loop causes a EXC_BAD_ACCESS. Here's my dictionary (AppDelegate.data): 1 = ( 3, "Test 1", False, "" ); 2 = ( 4, "Test 2", False, "" ); And here is my loop: for (id theKey in AppDelegate.data) { if (theKey = nil) { NSLog(@"HOLY COW"); } else { NSLog(@"Key: %@ ?", theKey); } } It never says holy cow, and it says the right key but at the end it crashes... Do you have any idea why? It should only loop on 1 and two and then exit the loop... I know that there's always a "nil" object at the end that's why I did a condition with it but it doesn't look like it works at all.. Thanks!

    Read the article

  • "Circuit breaker" for net.msmq?

    - by Alex
    Hi, The Circuit Breaker pattern, from the book Release It!, protects a service from requests while it is failing (or recovering). The net.msmq binding used with transactions give us nice retry and poison message capabilities. But I am missing the implementation of such a "Circuit breaker" pattern. A service is put under even heavier load by retries while it is already in a failure condition (like DB connectivity issues causing loads of blocked threads etc.). Anyone knows about a behavior extension or similar that explicitly closes the service host when defined failure thresholds have been exceeded? Cheers, Alex

    Read the article

  • onTextChanged Event for many Textboxes c#

    - by Alan Bennett
    Hi, I am currently building a prototype for a new system screen, and i am using c# to build this. The question i have is, i currently have 14 textboxes which are filled from a condition from a couple of other controls on the screen. these 14 textboxes all add up to a total shown in another textbox. as these textboxes are editable (in case the client wishes to increase the value) (cant go into to much detail but they will) I need to have a firable ontextchange event for when the values change so the total box updates. however i have a feeling there must be a way of not having to create 14 different events, is there a way that i can have 1 event which fires if any of the 14 text boxes are fired? thanks Alan

    Read the article

  • What are Android different screens dimensions in dp for different screens (e.g. xlarge = 960dp x 720dp)?

    - by Zizo
    in this link: Range of screens supported, Android team mentioned that: As you design your UI for different screen sizes, you'll discover that each design requires a minimum amount of space. So, each generalized screen size above has an associated minimum resolution that's defined by the system. These minimum sizes are in "dp" units—the same units you should use when defining your layouts—which allows the system to avoid worrying about changes in screen density. xlarge screens are at least 960dp x 720dp large screens are at least 640dp x 480dp normal screens are at least 470dp x 320dp small screens are at least 426dp x 320dp So, If I want to support all Android screens, can I create images, for full screen view, in those dimensions and that will be sufficient condition to support all available screens? or they are just the minimum sizes, and I need other dimensions? If other dimensions are needed, Please list them as in the list above. Thanks in Advance.

    Read the article

  • Intermittent NoClassDefFoundError error running Selenium JUnit tests

    - by Matt Sheppard
    For some time, I've been running a substantial set of JUnit / Selenium tests against a number of platforms on a nightly basis. Intermittently (about once in every 40 runs), all the tests for a given platform fail with a NoClassDefFoundError on the common superclass of all my tests as follows. java.lang.NoClassDefFoundError: [common super class of all my selenium tests] at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2389) at java.lang.Class.getConstructors(Class.java:1459) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) Re-invoking the tests will generally get the tests running normally, so it's clearly something dependent on some condition I am not considering. What might be causing this error to occur seemingly randomly?

    Read the article

  • Transferring Data Directly between 2 Connections in Indy (TIdContext)

    - by killercode
    ive a sever running TIdTCPServer, and Client Using Web Browser (or any other software) to Communicate, i dunno the protocol, but what im trying to do is to Send The Data between the client and another Connection (Both Connected to the same TIdTCPServer) for example the data sent by the first client is transmitted to the second client, and the data sent by the second client is transmitted to the first client, like a proxy (i cant really use a proxy server since its just this one condition) and the TIdTCPServer should still be receiving other clients and processing their data. i stumbled upon the first line of code, since TIdContext.Connection.Socket.ReadLn requires a Delimiter, and the Client's Protocol is unknown to the server. any ideas? thanks.

    Read the article

  • How to unpack htmlAttributes in a span tag in ASP.NET MVC

    - by sleepy
    I have htmlAttributes generated - originally for the purpose of creating a link with the attribute using Html.ActionLink. Now, based on some condition, I would like to create a <span> tag instead and put the attributes in there. Is there anyway it can be done easily ? Eg: something like: <span <%= htmlAttributes.Unpack() %> > Some txt </span> OR <%= Html.SpanTag("Some txt", htmlAttributes) %> OR anything similar without wresling too much with the already generated htmlAttribues? Thanks

    Read the article

  • Sql Calculation And Sort By Date

    - by mahesh
    I have Confusion against utilize If,Else Statement against calculation of stock By date. And sort the same by date. There is real challenge to calculate running total between equal date: If date is equal If date is greater than If date is less than My Table Schema Is: TransID int, Auto Increment Date datetime, Inwards decimal(12,2) Outward decimal(12,2) Suppose If I have Records as Below: TransID Date(DD/MM/YYYY) Inward Outward 1 03/02/2011 100 2 12/04/2010 200 3 03/02/2011 400 Than Result Should be: TransID Date(DD/MM/YYYY) Inward Outward Balance 1 03/02/2011 100 -100 2 12/04/2010 200 -300 3 03/02/2011 400 100 I wants to calculate Inward - outwards = Balance and Balance count as running total as above. but the condition that it should be as per date order How to sort and calculate it by date and transID? What is transact SQL IN SQL_SERVER-2000**?.

    Read the article

  • Soql query to get all related contacts of an account in an opportunity

    - by Prady
    i have SOQL query which queries for some records based on a where condition. select id, name,account.name ... <other fields> from opportunity where eventname__c='Test Event' i also need to get the related contact details for the account in the opportunity. ie i need to add the email ids of contact who all are part of the account in the opportunity. For each opportunity, i need to get all the contacts emailids who are associated with the account in opportunity. I cant really figure out how to approach this. referring the documentation i can get the contact info of a account using the query SELECT Name, ( SELECT LastName FROM Contacts ) FROM Account How can i use this along with opportunity? Thanks

    Read the article

  • Multiple Table Join in Linq C# Dynamically

    - by kmkperumal
    I have 3 data table a,b,c In this I need to write Join Query Dynamically using linQ. The Selecting columns given by customer and Condition columns also given customer at run time. So i need to create Querys dynamically.Please check below example.Because i dont which table they want and which column also For example Select a.c1,a.c2,b.c1,b.c2 From a Left Join b on a.c1=b.c1 2.Select c.c1,c.c2,a.c1,a.c2 From c Left Join a on c.c3=a.c1 3.Select a.c1,a.c2,b.c1,b.c2,c.c1,c.c2 From a Left Join b on a.c2=b.c2 Left join c on c.c1=a.c1 Like i need create different set of query's. Please help me on this.

    Read the article

  • Quering distinct values throught related model

    - by matheus.emm
    Hi! I have a simple one-to-many (models.ForeignKey) relationship between two of my model classes: class TeacherAssignment(models.Model): # ... some fields year = models.CharField(max_length=4) class LessonPlan(models.Model): teacher_assignment = models.ForeignKey(TeacherAssignment) # ... other fields I'd like to query my database to get the set of distinct years of TeacherAssignments related to at least one LessonPlan. I'm able to get this set using Django query API if I ignore the relation to LessonPlan: class TeacherAssignment(models.Model): # ... model's fields def get_years(self): year_values = self.objects.all().values_list('year').distinct().order_by('-year') return [yv[0] for yv in year_values if len(yv[0]) == 4] Unfortunately I don't know how to express the condition that the TeacherAssignment must be related to at least one LessonPlan. Any ideas how I'd be able to write the query? Thanks in advance.

    Read the article

  • Transfer of control and data between C and C#

    - by Prithvi
    C# main program needs to call a C program GA.c This C code executes many functions and one function initialize() calls objective() function. But this objective function needs to be written in C#.This call is in a loop in the C code and the C code needs to continue execution after the return from objective() until its main is over and return control to C# main program. C# main() { //code call to GA in C; //remaining code; } GA in C: Ga Main() { //code call to initialize function(); //remaining code } initialize funtion() in GA { for(some condition) { //code call to objective(parameter) function in C#; //code } } How do we do this?

    Read the article

  • jQuery/Asp.Net mvc username lookup

    - by MD_Oppenheimer
    OK, for the life of me I can't uderstand why the follwing code is always returning false?? I have debugged with firefox to see what going on, but the function seems to always return false even when the condition username taken is 0(false), here is the jquery code: function CheckAvailability() { showLoader(); $.post("/Account/CheckUsernameAvailability", { userName: $(profile_username).val() }, function(data) { var myObject = eval('(' + data + ')'); var newid = myObject; if (newid == 0) { profile_username_error.removeClass("field_not_valid"); profile_username_error.addClass("field_valid"); $("#validUserName_msg").html("<font color='green'>Available</font>") return true; } else { profile_username_error.addClass("field_not_valid"); profile_username_error.removeClass("field_valid"); $("#validUserName_msg").html("<font color='red'>Taken</font>") return false; } }); } I'm using the /Account/CheckUsernameAvailability to check if a given name is take or not, it not taken(0) should return true, false otherwise.

    Read the article

< Previous Page | 62 63 64 65 66 67 68 69 70 71 72 73  | Next Page >