Search Results

Search found 20827 results on 834 pages for 'check'.

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

  • One check constraint or multiple check constraints?

    - by RenderIn
    Any suggestions on whether fewer check constraints are better, or more? How should they be grouped if at all? Suppose I have 3 columns which are VARCHAR2(1 BYTE), each of which is a 'T'/'F' flag. I want to add a check constraint to each column specifying that only characters IN ('T', 'F') are allowed. Should I have 3 separate check constraints, one for each column: COL_1 IN ('T', 'F') COL_2 IN ('T', 'F') COL_3 IN ('T', 'F') Or a single check constraint: COL_1 IN ('T', 'F') AND COL_2 IN ('T', 'F') AND COL_3 IN ('T', 'F') My thoughts are it is best to keep these three separate, as the columns are logically unrelated to each other. The only case I would have a check constraint that examines more than one column is if there was some relationship between the value in one and the value in another, e.g.: (PARENT_CNT > 0 AND PRIMARY_PARENT IS NOT NULL) OR (PARENT_CNT = 0 AND PRIMARY_PARENT IS NULL)

    Read the article

  • Login - check database if user exists... (c#)

    - by SAMIR BHOGAYTA
    I have managed to do the following... string connectionString = "datasource=localhost;username=xxx;password=xxx;database=xxx"; MySqlConnection mySqlConnection = new MySqlConnection(connectionString); string selectString = "SELECT username, password " + "FROM forum_members " + "WHERE username = '" + frmUsername.Text + "' AND password = '" + frmPassword.Text + "'"; MySqlCommand mySqlCommand = new MySqlCommand(selectString, mySqlConnection); mySqlConnection.Open(); String strResult = String.Empty; strResult = (String)mySqlCommand.ExecuteScalar(); mySqlConnection.Close(); if (strResult.Length == 0) { Label1.Text = "INCORRECT USER/PASS!" //could redirect to register page } else { Label1.Text = "YOU ARE LOGGED IN!"; //set loggin in sessions variables }

    Read the article

  • Disable XP disk check using FAT32

    - by mike xie
    Right now I'm using Windows XP and Macintosh on my MacBook Pro via Bootcamp. Sometimes my XP would crash and when I restarted it it would have to go through disk check, although it says I can skip it by pushing a key, but this never worked for me. I did a bit of research online on how to disable disk check and found chkntfs /x c: but when I tried this out in my cmd it said the disk is FAT32 format. I tried to convert my C: drive from FAT32 to NTFS by using convert c: /FS:NTFS but when I tried this it told me to locate my C: drive. I tried to type C: and Bootcamp but couldn't really get past it. I later saw someone said to use this: Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager] "AutoChkTimeOut"=dword:0000000 [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager] "BootExecute"=hex(7):61,00,75,00,74,00,6f,00,63,00,68,00,65,00,63,00,6b,00,20,\ 00,61,00,75,00,74,00,6f,00,63,00,68,00,6b,00,20,00,2a,00,00,00,00,00 [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon] "SFCScan"=dword:00000000 [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\cleanuppath] @=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,74,00,25,\ 00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,63,00,6c,00,\ 65,00,61,00,6e,00,6d,00,67,00,72,00,2e,00,65,00,78,00,65,00,20,00,2f,00,44,\ 00,20,00,25,00,63,00,00,00 (Save it as .reg and execute it) I have just tried running it but am not really sure if it did anything (my laptop hasn't crashed yet :) ) Firstly, I am wondering if someone can tell me how to check if that script worked? Secondly, if that script didn't work, does anyone have any solution for these problems? Is there another way to disable disk check or is there another way for me to change my FAT32 to NTFS?

    Read the article

  • Spell check doesn't work in protected forms in Word 2011 for Mac

    - by Erin
    We have a form template many staff members use. We created it in Word 2004 for Mac, and I was told a shortcoming was there was no way to turn on the spell checker (a real hassle!). I hoped this would be fixed in 2011, but when I open the form and save it as a .docx, the spell check still doesn't work. Many menu choices, including Language and Spelling and Grammar are grayed. Is there any way to get spell check in a protected, fillable form?

    Read the article

  • Running a Check-Disk (Is it dangerous)

    - by vaccano
    I have a lap top that a friend of mine would like me to fix. It is giving a blue screen on boot up. When I looked up the error message it indicates that I should run a check disk. Is this dangerous? Should I try to off load stuff from the hard drive first? I ask because I had a hard drive of my own that when I ran check disk it wiped a bunch of "bad sectors" and I lost most of the info on it (but it had been going bad). Opinions?

    Read the article

  • Normal check interval and re try check interval doesnot work in nagios

    - by chandra
    Hi Guys, I have configured nagios in my environment and i have used the following setting for a service which monitors the disk space for every 10 min , Normal check interval =10 min retry check interval = 1 min Maximum attempts =2 But accoring to this values i should recieve my first alert after 10 min and then from there for every 1 min. But in my case i am recieving my first alert and then next alert comes to me after 20 min. Can some one help me in fixing this.

    Read the article

  • Normal check interval and re try check interval doesnot work in nagios

    - by chandra
    I have configured nagios in my environment and i have used the following setting for a service which monitors the disk space for every 10 min , Normal check interval =10 min retry check interval = 1 min Maximum attempts =2 But accoring to this values i should recieve my first alert after 10 min and then from there for every 1 min. But in my case i am recieving my first alert and then next alert comes to me after 20 min. Can some one help me in fixing this.

    Read the article

  • windows seven disk check error

    - by crazybmanp
    i have gotten the error in the microsoft KB article 975778 (http://support.microsoft.com/kb/975778/en-us) i was able to get onto my computer luckily, but when i went on to get the hotfix that is stated in the article, it gave me this error when i ran it: "the update is not applicable to your computer." is there any way of getting the disk check error to stop, or to get this fix to work. i will answer any questions on hardware if you post the questions in the comments. answers to questions this is the a full version that i got from ASUS as an upgrade disk from windows vista (hopefully more specific than you were asking)

    Read the article

  • T-SQL foreign key check constraint

    - by PaN1C_Showt1Me
    When you create a foreign key constraint in a table and you create the script in MS SQL Management Studio, it looks like this. ALTER TABLE T1 WITH CHECK ADD CONSTRAINT FK_T1 FOREIGN KEY(project_id) REFERENCES T2 (project_id) GO ALTER TABLE T1 CHECK CONSTRAINT FK_T1 GO What I don't understand is what purpose has the second alter with check constraint. Isn't creating the FK constraint enough? Do you have to add the check constraint to assure reference integrity ? Another question: how would it look like then when you'd write it directly in the column definition? CREATE TABLE T1 ( my_column INT NOT NULL CONSTRAINT FK_T1 REFERENCES T2(my_column) ) Isn't this enough?

    Read the article

  • Run VISTA disk check without reboot

    - by Chau
    I want to perform a surface scan on my harddisks (S-ATA, P-ATA, USB and E-SATA) in windows VISTA. Is it possible to do this without scheduling the scan on next reboot? It takes a lot of time and I would like to be able to use the computer during the scan. I can accept that this might not be possible on the window partition disk, but I cannot see why it shouldn't be possible on other disks.

    Read the article

  • Firefox 3.6/4: modify/ tweak spell-check dictionary?

    - by studiohack
    I edit frequently on Super User, and it is a pain to edit for capitalization or words that are shortened, i.e. Win7 instead of Windows 7, or windows versus Windows. Using Firefox 3.6 and/or 4, Is there a way (using an extension or configure settings) I can configure the dictionary to automatically recognize words that may not be capitalized or are shortened (while editing a post)? Say, have the dictionary see Win7 and underline it so that I can right-click on it, and select Windows 7? I would want it to be configurable, so I can tell it what to look for, etc... Ideas or recommendations?

    Read the article

  • Vim lint check - only show message if there's an error

    - by GorillaSandwich
    I have this line in my .vimrc, which means "when I save a .rb file, run it through ruby -c" (the ruby interpreter's error checking). autocmd BufWritePost *.rb !ruby -c <afile> When I save that file, I always see output at the bottom of the screen, so I get used to it and start ignoring it. What I want is to only see output if there are errors. I can see that when there are errors, after it says what they are, at the bottom, it says "shell returned 1." How can I modify this line so that it only shows a message if the shell returns 1? Is there a way to conditionally surpress output from a shell command run in vim?

    Read the article

  • How do I create a check constraint?

    - by Zack Peterson
    Please imagine this small database... Diagram Tables Volunteer Event Shift EventVolunteer ========= ===== ===== ============== Id Id Id EventId Name Name EventId VolunteerId Email Location VolunteerId Phone Day Description Comment Description Start End Associations Volunteers may sign up for multiple events. Events may be staffed by multiple volunteers. An event may have multiple shifts. A shift belongs to only a single event. A shift may be staffed by only a single volunteer. A volunteer may staff multiple shifts. Check Constraints Can I create a check constraint to enforce that no shift is staffed by a volunteer that's not signed up for that shift's event? Can I create a check constraint to enforce that two overlapping shifts are never staffed by the same volunteer?

    Read the article

  • Check constraint over two columns

    - by Rippo
    I want to add a Check Constraint to a table for server 2005 but cannot work it out. MemberId ClubId MeetingId 1 100 10 2 100 10 3 100 10 7 101 10 <-This would throw a check constraint 1 100 11 2 100 11 I do not want to have more than one ClubId for a single MeetingId Basically a ClubId can only belong to a single MeetingId but can have more than one member assigned. How do I achieve this?

    Read the article

  • one check box to select other check boxes in jsf

    - by mudassar
    I have two kind of check boxes. One is a simple check box e.g t:selectBooleanCheckbox and another list t:selectBooleanCheckbox dynamically generated. I want to control this list with the single check box. e.g. when it is selected or deselected, similar action should take place for the list as well. Help please :)

    Read the article

  • Using a check contraint in MySQL for controlling string length

    - by ptrn
    I'm tumbled with a problem! I've set up my first check constraint using MySQL, but unfortunately I'm having a problem. When inserting a row that should fail the test, the row is inserted anyway. The structure: CREATE TABLE user ( id INT UNSIGNED NOT NULL AUTO_INCREMENT, uname VARCHAR(10) NOT NULL, fname VARCHAR(50) NOT NULL, lname VARCHAR(50) NOT NULL, mail VARCHAR(50) NOT NULL, PRIMARY KEY (id), CHECK (LENGTH(fname) > 30) ); The insert statement: INSERT INTO user VALUES (null, 'user', 'Fname', 'Lname', '[email protected]'); The length of the string in the fname column should be too short, but it's inserted anyway. I'm pretty sure I'm missing something basic here.

    Read the article

  • Excel VBA to check autofilter for data

    - by cav719
    I need help checking for autofiltered rows not including the header. I want it to give a message box "No records found." then exit sub or continue with copy paste if there are rows beyond the header row. I know I need an If/Else entry after the filter to check for data but I'm having trouble figuring how to check. This code is being done from a UserForm I created. Here is my script: Private Sub Searchbycompanyfield_Click() If CompanyComboBox1.Value = "" Then MsgBox "Please enter a Company to begin search." Exit Sub End If ActiveSheet.Range("$A:$H").AutoFilter Field:=1, Criteria1:=EQDataEntry.CompanyComboBox1.Value, Operator:=xlOr Cells.Select Selection.Copy Sheets("Sheet2").Select Range("A5").Select ActiveSheet.Paste Call MessageBoxYesOrNoMsgBox End Sub Any help would be greatly appreciated.

    Read the article

  • VS 2012 Code Review &ndash; Before Check In OR After Check In?

    - by Tarun Arora
    “Is Code Review Important and Effective?” There is a consensus across the industry that code review is an effective and practical way to collar code inconsistency and possible defects early in the software development life cycle. Among others some of the advantages of code reviews are, Bugs are found faster Forces developers to write readable code (code that can be read without explanation or introduction!) Optimization methods/tricks/productive programs spread faster Programmers as specialists "evolve" faster It's fun “Code review is systematic examination (often known as peer review) of computer source code. It is intended to find and fix mistakes overlooked in the initial development phase, improving both the overall quality of software and the developers' skills. Reviews are done in various forms such as pair programming, informal walkthroughs, and formal inspections.” Wikipedia No where does the definition mention whether its better to review code before the code has been committed to version control or after the commit has been performed. No matter which side you favour, Visual Studio 2012 allows you to request for a code review both before check in and also request for a review after check in. Let’s weigh the pros and cons of the approaches independently. Code Review Before Check In or Code Review After Check In? Approach 1 – Code Review before Check in Developer completes the code and feels the code quality is appropriate for check in to TFS. The developer raises a code review request to have a second pair of eyes validate if the code abides to the recommended best practices, will not result in any defects due to common coding mistakes and whether any optimizations can be made to improve the code quality.                                             Image 1 – code review before check in Pros Everything that gets committed to source control is reviewed. Minimizes the chances of smelly code making its way into the code base. Decreases the cost of fixing bugs, remember, the earlier you find them, the lesser the pain in fixing them. Cons Development Code Freeze – Since the changes aren’t in the source control yet. Further development can only be done off-line. The changes have not been through a CI build, hard to say whether the code abides to all build quality standards. Inconsistent! Cumbersome to track the actual code review process.  Not every change to the code base is worth reviewing, a lot of effort is invested for very little gain. Approach 2 – Code Review after Check in Developer checks in, random code reviews are performed on the checked in code.                                                      Image 2 – Code review after check in Pros The code has already passed the CI build and run through any code analysis plug ins you may have running on the build server. Instruct the developer to ensure ZERO fx cop, style cop and static code analysis before check in. Code is cleaner and smell free even before the code review. No Offline development, developers can continue to develop against the source control. Cons Bad code can easily make its way into the code base. Since the review take place much later in the cycle, the cost of fixing issues can prove to be much higher. Approach 3 – Hybrid Approach The community advocates a more hybrid approach, a blend of tooling and human accountability quotient.                                                               Image 3 – Hybrid Approach 1. Code review high impact check ins. It is not possible to review everything, by setting up code review check in policies you can end up slowing your team. More over, the code that you are reviewing before check in hasn't even been through a green CI build either. 2. Tooling. Let the tooling work for you. By running static analysis, fx cop, style cop and other plug ins on the build agent, you can identify the real issues that in my opinion can't possibly be identified using human reviews. Configure the tooling to report back top 10 issues every day. Mandate the manual code review of individuals who keep making it to this list of shame more often. 3. During Merge. I would prefer eliminating some of the other code issues during merge from Main branch to the release branch. In a scrum project this is still easier because cheery picking the merges is a possibility and the size of code being reviewed is still limited. Let the tooling work for you, if some one breaks the CI build often, put them on a gated check in build course until you see improvement. If some one appears on the top 10 list of shame generated via the build then ensure that all their code is reviewed till you see improvement. At the end of the day, the goal is to ensure that the code being delivered is top quality. By enforcing a code review before any check in, you force the developer to work offline or stay put till the review is complete. What do the experts say? So I asked a few expects what they thought of “Code Review quality gate before Checking in code?" Terje Sandstrom | Microsoft ALM MVP You mean a review quality gate BEFORE checking in code????? That would mean a lot of code staying either local or in shelvesets, and not even been through a CI build, and a green CI build being the main criteria for going further, f.e. to the review state. I would not like code laying around with no checkin’s. Having a requirement that code is checked in small pieces, 4-8 hours work max, and AT LEAST daily checkins, a manual code review comes second down the lane. I would expect review quality gates to happen before merging back to main, or before merging to release.  But that would all be on checked-in code.  Branching is absolutely one way to ease the pain.   Another way we are using is automatic quality builds, running metrics, coverage, static code analysis.  Unfortunately it takes some time, would be great to be on CI’s – but…., so it’s done scheduled every night. Based on this we get, among other stuff,  top 10 lists of suspicious code, which is then subjected to reviews.  If a person seems to be very popular on these top 10 lists, we subject every check in from that person to a review for a period. That normally helps.   None of the clients I have can afford to have every checkin reviewed, so we need to find ways around it. I don’t disagree with the nicety of having all the code reviewed, but I find it hard to find those resources in today’s enterprises. David V. Corbin | Visual Studio ALM Ranger I tend to agree with both sides. I hate having code that is not checked in, but at the same time hate having “bad” code in the repository. I have found that branching is one approach to solving this dilemma. Code is checked into the private/feature branch before the review, but is not merged over to the “official” branch until after the review. I advocate both, depending on circumstance (especially team dynamics)   - The “pre-checkin” is usually for elements that may impact the project as a whole. Think of it as another “gate” along with passing unit tests. - The “post-checkin” may very well not be at the changeset level, but correlates to a review at the “user story” level.   Again, this depends on team dynamics in play…. Robert MacLean | Microsoft ALM MVP I do not think there is no right answer for the industry as a whole. In short the question is why do you do reviews? Your question implies risk mitigation, so in low risk areas you can get away with it after check in while in high risk you need to do it before check in. An example is those new to a team or juniors need it much earlier (maybe that is before checkin, maybe that is soon after) than seniors who have shipped twenty sprints on the team. Abhimanyu Singhal | Visual Studio ALM Ranger Depends on per scenario basis. We recommend post check-in reviews when: 1. We don't want to block other checks and processes on manual code reviews. Manual reviews take time, and some pieces may not require manual reviews at all. 2. We need to trace all changes and track history. 3. We have a code promotion strategy/process in place. For risk mitigation, post checkin code can be promoted to Accepted branches. Or can be rejected. Pre Checkin Reviews are used when 1. There is a high risk factor associated 2. Reviewers are generally (most of times) have immediate availability. 3. Team does not have strict tracking needs. Simply speaking, no single process fits all scenarios. You need to select what works best for your team/project. Thomas Schissler | Visual Studio ALM Ranger This is an interesting discussion, I’m right now discussing details about executing code reviews with my teams. I see and understand the aspects you brought in, but there is another side as well, I’d like to point out. 1.) If you do reviews per check in this is not very practical as a hard rule because this will disturb the flow of the team very often or it will lead to reduce the checkin frequency of the devs which I would not accept. 2.) If you do later reviews, for example if you review PBIs, it is not easy to find out which code you should review. Either you review all changesets associate with the PBI, but then you might review code which has been changed with a later checkin and the dev maybe has already fixed the issue. Or you review the diff of the latest changeset of the PBI with the first but then you might also review changes of other PBIs. Jakob Leander | Sr. Director, Avanade In my experience, manual code review: 1. Does not get done and at the very least does not get redone after changes (regardless of intentions at start of project) 2. When a project actually do it, they often do not do it right away = errors pile up 3. Requires a lot of time discussing/defining the standard and for the team to learn it However code review is very important since e.g. even small memory leaks in a high volume web solution have big consequences In the last years I have advocated following approach for code review - Architects up front do “at least one best practice example” of each type of component and tell the team. Copy from this one. This should include error handling, logging, security etc. - Dev lead on project continuously browse code to validate that the best practices are used. Especially that patterns etc. are not broken. You can do this formally after each sprint/iteration if you want. Once this is validated it is unlikely to “go bad” even during later code changes Agree with customer to rely on static code analysis from Visual Studio as the one and only coding standard. This has HUUGE benefits - You can easily tweak to reach the level you desire together with customer - It is easy to measure for both developers/management - It is 100% consistent across code base - It gets validated all the time so you never end up getting hammered by a customer review in the end - It is easy to tell the developer that you do not want code back unless it has zero errors = minimize communication You need to track this at least during nightly builds and make sure team sees total # issues. Do not allow #issues it to grow uncontrolled. On the project I run I require code analysis to have run on code before checkin (checkin rule). This means -  You have to have clean compile (or CA wont run) so this is extra benefit = very few broken builds - You can change a few of the rules to compile as errors instead of warnings. I often do this for “missing dispose” issues which you REALLY do not want in your app Tip: Place your custom CA rules files as part of solution. That  way it works when you do branching etc. (path to CA file is relative in VS) Some may argue that CA is not as good as manual inspection. But since manual inspection in reality suffers from the 3 issues in start it is IMO a MUCH better (and much cheaper) approach from helicopter perspective Tirthankar Dutta | Director, Avanade I think code review should be run both before and after check ins. There are some code metrics that are meant to be run on the entire codebase … Also, especially on multi-site projects, one should strive to architect in a way that lets men manage the framework while boys write the repetitive code… scales very well with the need to review less by containment and imposing architectural restrictions to emphasise the design. Bruno Capuano | Microsoft ALM MVP For code reviews (means peer reviews) in distributed team I use http://www.vsanywhere.com/default.aspx  David Jobling | Global Sr. Director, Avanade Peer review is the only way to scale and its a great practice for all in the team to learn to perform and accept. In my experience you soon learn who's code to watch more than others and tune the attention. Mikkel Toudal Kristiansen | Manager, Avanade If you have several branches in your code base, you will need to merge often. This requires manual merging, when a file has been changed in both branches. It offers a good opportunity to actually review to changed code. So my advice is: Merging between branches should be done as often as possible, it should be done by a senior developer, and he/she should perform a full code review of the code being merged. As for detecting architectural smells and code smells creeping into the code base, one really good third party tools exist: Ndepend (http://www.ndepend.com/, for static code analysis of the current state of the code base). You could also consider adding StyleCop to the solution. Jesse Houwing | Visual Studio ALM Ranger I gave a presentation on this subject on the TechDays conference in NL last year. See my presentation and slides here (talk in Dutch, but English presentation): http://blog.jessehouwing.nl/2012/03/did-you-miss-my-techdaysnl-talk-on-code.html  I’d like to add a few more points: - Before/After checking is mostly a trust issue. If you have a team that does diligent peer reviews and regularly talk/sit together or peer review, there’s no need to enforce a before-checkin policy. The peer peer-programming and regular feedback during development can take care of most of the review requirements as long as the team isn’t under stress. - Under stress, enforce pre-checkin reviews, it might sound strange, if you’re already under time or budgetary constraints, but it is under such conditions most real issues start to be created or pile up. - Use tools to catch most common errors, Code Analysis/FxCop was already mentioned. HP Fortify, Resharper, Coderush etc can help you there. There are also a lot of 3rd party rules you can add to Code Analysis. I’ve written a few myself (http://fccopcontrib.codeplex.com) and various teams from Microsoft have added their own rules (MSOCAF for SharePoint, WSSF for WCF). For common errors that keep cropping up, see if you can define a rule. It’s much easier. But more importantly make sure you have a good help page explaining *WHY* it's wrong. If you have small feature or developer branches/shelvesets, you might want to review pre-merge. It’s still better to do peer reviews and peer programming, but the most important thing is that bad quality code doesn’t make it into the important branch. So my philosophy: - Use tooling as much as possible. - Make sure the team understands the tooling and the importance of the things it flags. It’s too easy to just click suppress all to ignore the warnings. - Under stress, tighten process, it’s under stress that the problems of late reviews will really surface - Most importantly if you do reviews do them as early as possible, but never later than needed. In other words, pre-checkin/post checking doesn’t really matter, as long as the review is done before the code is released. It’ll just be much more expensive to fix any review outcomes the later you find them. --- I would love to hear what you think!

    Read the article

  • WPF Check/Uncheck all checkboxes located in a gridview

    - by toni
    Hi! I have a gridview with some columns. One of these columns is checkbox type. Then I have two buttons in my UI, one for check all and another for uncheck all. I would like to check all checkboxes in the column when I press the a button and uncheck all checkboxes when I press the another one. How can I do this? Some snippet code: <... <Classes:SortableListView x:Name="lstViewRutas" ItemsSource="{Binding Source={StaticResource RutasCollectionData}}" ... > <...> <GridViewColumn Header="Activa" Width="50"> <GridViewColumn.CellTemplate> <DataTemplate> <CheckBox x:Name="chkBxF" Click="chkBx_Click" IsChecked="{Binding Path=Activa}" HorizontalContentAlignment="Stretch" HorizontalAlignment="Stretch"/> </DataTemplate> </GridViewColumn.CellTemplate> </GridViewColumn> <...> </Classes:SortableListView> <...> </Page> My data object binding to gridview is: namespace GParts.Classes { public class RutasCollection { /// <summary> /// Colección de datos de la tabla /// </summary> ObservableCollection<RutasData> _RutasCollection; /// <summary> /// Constructor. Crea una nueva instancia tipo ObservableCollection /// de tipo RutasData /// </summary> public RutasCollection() { _RutasCollection = new ObservableCollection<RutasData>(); } /// <summary> /// Retorna el conjunto entero de rutas en la colección /// </summary> public ObservableCollection<RutasData> Get { get { return _RutasCollection; } } /// <summary> /// Retorna el conjunto entero de rutas en la colección /// </summary> /// <returns></returns> public ObservableCollection<RutasData> GetCollection() { return _RutasCollection; } /// <summary> /// Añade un elemento tipo RutasData a la colección /// </summary> /// <param name="hora"></param> public void Add(RutasData ruta) { _RutasCollection.Add(ruta); } /// <summary> /// Elimina un elemento tipo RutasData de la colección /// </summary> /// <param name="ruta"></param> public void Remove(RutasData ruta) { _RutasCollection.Remove(ruta); } /// <summary> /// Elimina todos los registros de la colección /// </summary> public void RemoveAll() { _RutasCollection.Clear(); } /// <summary> /// Inserta un elemento tipo RutasData a la colección /// en la posición rowId establecida /// </summary> /// <param name="rowId"></param> /// <param name="ruta"></param> public void Insert(int rowId, RutasData ruta) { _RutasCollection.Insert(rowId, ruta); } } /// <summary> /// Clase RutasData /// </summary> // Registro tabla interficie pantalla public class RutasData { public int Id { get; set; } public bool Activa { get; set; } public string Ruta { get; set; } } } and in my page loaded event I do this to populate gridview: // Obtiene datos tabla Rutas var tbl_Rutas = Accessor.GetRutasTable(); // This method returns entire table foreach (var ruta in tbl_Rutas) { _RutasCollection.Add(new RutasData { Id = (int) ruta.Id, Ruta = ruta.Ruta, Activa = (bool) ruta.Activa }); } // Enlaza los datos con el objeto proveedor RutasCollection lstViewRutas.ItemsSource = _RutasCollection.GetCollection(); Everything is ok but now I would like to check/uncheck all checkboxes in the gridviewcolumn when I press one button or another. How can I do this? Something like this¿? I receive an error that says I can modify itemsource property. private void btnCheckAll_Click(object sender, RoutedEventArgs e) { // Update data object bind to gridview ObservableCollection<RutasData> listas = _RutasCollection.GetCollection(); foreach (var lst in listas) { ((RutasData)lst).Activa = true; } // Update with new values the UI lstViewRutas.ItemsSource = _RutasCollection.GetCollection(); } Thanks!

    Read the article

  • How to boundary check in gcc / mingw?

    - by Hernán Eche
    Having tried this int main(void) { int a[10]; a[20]=5; } gcc -Wall -O2 main.c It gives me no warning... It's gcc within windows (mingw) and I am not able to detect this kind of boundary limit bug how to tell compiler to check it? can mingw do it? thanks

    Read the article

  • Automatically check bounced emails via POP3 ?

    - by Johannes
    Hi all, Can anyone recommend software or even a .net library to develop software, that will check for bounced emails and the reason for the bounce? I get bounced emails into a pop3 account that I can read then... I need it to keep my user database clean from invalid email addresses and want to automate this (mark user as invalid email). Thanks

    Read the article

  • Fastest way to check array items existence in mySQL table

    - by Enrique
    User writes a series of tags (, separated) and posts the form. I build an array containing the tags and delete dupes with array_unique() php function. I'm thinking of doing: go through the array with foreach($newarray as $item) { ... } check each $item for existence in the tags mySQL table if item does not exists, insert into tags table Is there a FASTER or MORE OPTIMUM way for doing this?

    Read the article

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