Search Results

Search found 196 results on 8 pages for 'doctor trout'.

Page 3/8 | < Previous Page | 1 2 3 4 5 6 7 8  | Next Page >

  • Toggle visibility of DIV based on Dropdown

    - by user1869787
    I have never used Javascript before, only HTML and CSS. I am attempting to have my information show only when selected from my drop down. I don't know any Javascript so any help would be overly appreciated. This is my html so far: <!DOCTYPE HTML> <html> <head> <meta charset="utf-8" /> <title>Gone Fishin'</title> <link href="finale.css" rel="stylesheet" type="text/css"> </head> <div id="wrapper"> <div id="nav"> <ul> <li><a href="Index.html">About Us</a></li> <li><a href="Species.html">List by Species</a></li> <li><a href="County.html">List by County</a></li> <li><a href="apply.html">Reservations</a></li> </ul> </div> <body> <div id="content"> <p>ontent</p> <fieldset> <legend>Choose your Target</legend> <select name="option" id="options"> <option value=""></option> <option value="1">American Shad</option> <option value="2">Black Crappie</option> <option value="3">Bluegill</option> <option value="4">Brook Trout</option> <option value="5">Brown Trout</option> <option value="6">Carp</option> <option value="7">Chain Pickerel</option> <option value="8">Channel Catfish</option> <option value="9">Flathead Catfish</option> <option value="10">Largemouth Bass</option> <option value="11">Muskellunge</option> <option value="12">Norhtern Pike</option> <option value="13">Pumkpinseed</option> <option value="14">Rainbow Trout</option> <option value="15">Readbreast Sunfish</option> <option value="16">Rock Bass</option> <option value="17">Sauger</option> <option value="18">Saugeye</option> <option value="19">Smallmouth Bass</option> <option value="20">Steelhead</option> <option value="21">Striped Bass</option> <option value="22">Walleye</option> <option value="23">White Bass</option> <option value="24">White Crappie</option> <option value="25">White Perch</option> <option value="26">Yellow Perch</option> </select> <div id="option"> <div id="1" style="display: block">Test 1</div> <div id="2">Test 2</div> <div id="3">Test 3</div> <div id="4">Test 4</div> <div id="5">Test 5</div> </div> </fieldset> </div> </body> </div> </html> And this is my CSS: @charset "utf-8"; /* CSS Document */ /*General Styles*/ * {font-family:Verdana, Geneva, sans-serif;} #wrapper {width:85%; margin:auto; background-color:#00CC00;} /*End of General Styles*/ /* nav div styles */ #nav {background-color:#FF0000; text-align:center;} #nav ul li {display:inline-block; background-color: #67e667; border:5px dashed; width: 90px text-align:center;} #nav ul li a:link {background-color:#a60000; width: 90px;} #nav ul li a:visited {background-color: #009999;} #nav ul li a:hover {background-color: #a64b00;} /* end nav styles */ /* content div styles*/ #content {padding: 5px;} #option {display:none;} /*end content styles*/ /*start form styles*/ fieldset {background-color:#ff7400; color:white} label {display:inline-block; width: 150px; float:left; margin-right: 3px;} #form li{margin-bottom:10px;} #dtg li{margin-bottom:5px;} Thank you for any help received

    Read the article

  • Assigning a group while adding user in django-admin

    - by Lokharkey
    In my application, I have models that have the Users model as a Foreign key, eg: class Doctor(models.Model): username=models.ForeignKey(User, unique=True) ... In the admin site, when adding a new Doctor, I have the option of adding a new User next to the username field. This is exactly what I want, but in the dialog that opens, it asks for a username and password for the new user; I would also like to be able to assign a group to this new user. What would be the best way of doing this ? Thanks, lokharkey

    Read the article

  • "And" condition in C#/LINQ Query

    - by user1213055
    partial void PrintDocLetter1_CanExecute(ref bool result) { if (this.PatientsMasterItem.DoctorsMasterItem != null) { var Doctor = PatientsMasterItem.DoctorsMasterItem; var PatientList = Doctor.PatientsMasterItem; var Letters = PatientsMasterItem.LettersSentItem; if ((PatientList.Count() > 1) && (Letters.Any(i => i.LetterType == "DoctorLetter1"))) { result = false; } else { result = true; } } } I think something is wrong with my second condition. I'm trying to find two things. 1) Doctors with more than 1 patient. 2) Among those patients whether a lettertype called "DoctorLetter1" has been sent or not. The above code is working good for that particular record but not working other patients with same doctors where patient1 has already been sent with DoctorLetter1.

    Read the article

  • Agile Awakenings and the Rules of Agile

    - by Robert May
    For those that care, you can read my history of management and technology to understand why I think I’m qualified to talk about this at all.  It’s boring, so feel free to skip it. Awakenings I first started to play around with the idea of “agile” in 2004 or 2005.  I found a book on the Rational Unified Process that I thought was good, and attempted to implement parts of it.  I thought I was agile, but really, it wasn’t.   I still didn’t understand the concept of a team.  I still wanted to tell the team what to do and how to get it done.  I still thought I was smarter than the team. After that job, I started work on another project and began helping that team.  The first few months were really rough.  We were implementing Scrum, which was relatively new to everyone on the team, and, quite frankly, I was doing a poor job of it.  I was trying to micro-manage every aspect of the teams work, and we were all miserable. The moment of change came when the senior architect bailed on the project.  His comment to me was: “This isn’t Agile.  Where are the stand-ups?  Where are the stories?”  He was dead on, and I finally woke up.  I finally realized that I was the problem!  I wasn’t trusting the team.  I wasn’t helping the team.  I was being a manager. Like many (most?), I was claiming to be Agile and use Scrum, but I wasn’t in fact following the rules Scrum.  Since then, I’ve done a lot of studying, hands on practice, coaching of many different teams, and other learning around Scrum, and I have discovered that Scrum has some rules that must be followed for success, even though the process is about continuous improvement. I’ve been practicing Scrum right for about 4 years now and have helped multiple teams implement it successfully, so what you’re about to get is based on experience, rather than just theory. The Rules of Scrum In my experience, what I’ve found is that most companies that claim to be doing Scrum or Agile are actually NOT doing either.  This stems largely because they think that they can “adopt the rules of Agile that fit their organization.”  Sadly, many of them think that this means they can adopt iterations (sprints) and not much else.  Either that, or they think they can do whatever they want, or were doing before, and call it Scrum.  This is simply not true. Here are some rules that must be followed for you to really be doing Scrum.  I’ll go into detail on each one of these posts in future blog posts and update links here.  My intent is that this will help other teams implementing scrum to see more success. Agile does not allow you to do whatever you want A Product Owner is required A ScrumMaster is required The team must function as a Team, and QA must be part of the team Support from upper management is required A prioritized product backlog is required A prioritized sprint backlog is required Release planning is required Complete spring planning is required Showcases are required Velocity must be measured Retrospectives are required Daily stand-ups are required Visibility is absolutely required For now, I think that’s enough, although I reserve the right to add more.  If you’re breaking any of these rules, you’re probably not doing Scrum.  There are exceptions to these rules, but until you have practiced Scrum for a while, you don’t know what those exceptions are. Breaking the Rules Many teams break these rules because they are the ones that expose the most pain.  Scrum is not Advil.  It’s not intended to mask the pain, its intended to cure it.  Let me explain that analogy a bit more.  Recently, my 7 year old son broke his arm, quite severely (see the X-Ray to the right).  That caused him a great deal of pain.  We went first to one doctor, and after viewing the X-Ray, they determined that there was no way that they’d cast the arm at their location.  It was simply too bad of a break for them to deal with.  They did, however, give him some Advil for the pain and put a splint on his arm to stabilize the broken bones.  Within minutes, he was feeling much better.  Had we been stupid, we could have gone home and he’d have been just as happy as ever . . . until the pain medication wore off or one of his siblings touched the splint.  Then, all of that pain would come right back to the top.  Sure, he could make it go away by just taking more Advil and moving the splint out of the way, but that wasn’t going to fix the problem permanently. We ended up in an emergency room with a doctor who could fix his arm.  However, we were warned that the fix was going to be VERY painful, and it was.  Even with heavy sedation (Propofol), my son was in enough pain that he squirmed and wiggled trying to get his arm away from the doctor.  He had to endure this pain in order to have a functional arm. But the setting wasn’t the end.  He had to have several casts, had to have it re-broken once, since the first setting didn’t take and finally was given a clean bill of health. Agile implementation is much like this story.  Agile was developed as a result of people recognizing that the development methodologies that were currently in place simply were ineffective.  However, the fix to the broken development that’s been festering for many years is not painless.  Many people start Agile thinking that things will be wonderful.  They won’t!  Agile is about visibility, and often, it brings great pain to surface.  It causes all of the missed deadlines, the cowboy coders, the coasters, the micro-managers, the lazy, and all of the other problems that are really part of your development process now to become painfully visible to EVERYONE.  Many people don’t like this exposure.  Agile will make the pain better, but not if you remove the cast (the rules above) prematurely and start breaking the rules that expose the most pain.  The healing will take time and is not instant (like Advil).  Figuring out what the true source of pain and fixing it is very valuable to you, your team, and your company.  Remember as you’re doing this that Agile isn’t the source of the pain, it’s really just exposing it.  Find the source. My recommendation is that ALL of these rules are followed for a minimum of six months, and preferably for an entire year, before you decide to break any of these rules.  Get a few good releases under your belt.  Figure out what your velocity is and start firing as a team.  Chances are, after you see agile really in action, you won’t want to break the rules because you’ll see their value. More Reading Jean Tabaka recently published a list of 78 Things I Have Learned in 6 Years of Agile Coaching.  Highly recommended. Technorati Tags: Agile,Scrum,Rules

    Read the article

  • links for 2010-05-27

    - by Bob Rhubart
    Top 10 things to know about WebLogic for UCM users Javier Doctor shares Oracle ACE Director Bex Huff's presentation. (tags: oracle otn enterprise2.0) Getting started with Oracle 11g Complex Event Processing (CEP) - Sharing with the world (tags: ping.fm) @theovanarem: Getting started with Oracle 11g Complex Event Processing Step-by-step instructions from Theo van Arem. (tags: oracle otn cep weblogic) Rittman Mead Consulting Blog Archive Realtime Data Warehouse Challenges &#8211; Part 1 Rittman Mead Consulting - &#8220;Delivering Oracle Business Intelligence&#8221; (tags: ping.fm)

    Read the article

  • Is there a tool that allows site users to schedule meetings with each other? [closed]

    - by Andrew Min
    I'm the webmaster for a debate team, and we're trying to find a tool that allows us to have multiple team members say when they're available and see who else is available during those timeslots for one-on-one practice rounds. I suppose we could use something like Doodle, but that would involve recreating the Doodle every week. There are many scheduling tools available, but they're usually built so that you can sign up to meet with a specific individual (think a doctor or a professor's office hours), whereas you could be paired with ANY individual.

    Read the article

  • My father wants to learn PHP-MySQL to port his application. What I should do to help?

    - by adijiwa
    My father is a doctor/physician. About 15 years ago he started writing an application to handle his patient's medical records in his clinic at home. The app has the ability to input patient's medical records (obviously), search patients by some criteria, manage medicine stocks, output receipt to printer, and some more CRUDs. He wrote it in dBase III+. A few years later he migrated to FoxPro 2.6 for DOS and finally in a few more years he rewrote his app in Visual FoxPro 9. And now (actually two years ago) he wants to rewrite it in PHP, but he don't know how. The Visual FoxPro version of this app is still running and has no serious problem except sometimes it performs slowly. Usually there are 1-5 concurrent users. The binary and database files are shared via windows share. He did all the coding as a hobby and for free (it is for his own clinic after all). He also use this app in two other offices he managed. Some reasons of why he wants to rewrite in PHP-MySQL: He wants to learn Easier to deploy (?) Easier client setup, need only a browser What should I do to help my father? How should he start? I explored some options: I let my father learn PHP and MySQL (and HTML (and JavaScript?)) from scratch. I create/bundle framework. I'm thinking on bundling CodeIgniter and a web UI framework (any suggestion?) especially to reduce effort on writing presentation codes. What do you think? tl;dr My father (a doctor) wants to rewrite his Visual FoxPro app in PHP-MySQL. He knows very little of PHP and MySQL but he wants to learn. What should I do to help? How should he start? Some facts: My father is 50 years old. His first encounter with a PC is in early 1980s. It was IBM PC with Intel 8088. He knows BASIC. He taught me how to use DOS and how to program with BASIC. The other language he knows fairly well is dBase/FoxPro. I got my bachelor CS degree last year. I know the internals of my father's app because sometime he wants me to help him writing his app. Sorry for my english.

    Read the article

  • The Antidote to SEO Anxiety Disorder

    When online marketers are building their presence online, Search Engine Optimisation can be like that irritating little medical condition that you keep ignoring and refusing to go to the doctor's to get help with because you have "more pressing priorities". You think: "It's too complicated - What if I can't fix it"?

    Read the article

  • Why do I get access denied to data folder when using adb?

    - by gregm
    I connected to my live device using the adb and the following commands: C:\>adb -s HT829GZ52000 shell $ ls ls sqlite_stmt_journals cache sdcard etc system sys sbin proc logo.rle init.trout.rc init.rc init.goldfish.rc init default.prop data root dev $ cd data cd data $ ls ls opendir failed, Permission denied I was surprised to see that I have access denied. How come I can't browse around the directories using the commandline like this? How do I get root access on my phone?

    Read the article

  • Can php query the results from a previous query?

    - by eaolson
    In some languages (ColdFusion comes to mind), you can run a query on the result set from a previous query. Is it possible to do something like that in php (with MySQL as the database)? I sort of want to do: $rs1 = do_query( "SELECT * FROM animals WHERE type = 'fish'" ); $rs2 = do_query( "SELECT * FROM rs1 WHERE name = 'trout'" );

    Read the article

  • Errors in Homebrew on OS X Lion

    - by Bo Tian
    I just ran the Homebrew script as described in the installation page. I then ran brew doctor in Terminal, and it returned several errors. I'm not sure how to fix those errors, please help. brew doctor Error: Some directories in /usr/local/share/man aren't writable. This can happen if you "sudo make install" software that isn't managed by Homebrew. If a brew tries to add locale information to one of these directories, then the install will fail during the link step. You should probably `chown` them: /usr/local/share/man/de /usr/local/share/man/de/man1 Error: You have Xcode 4.2, which is outdated. Please install Xcode 4.3. Error: Unbrewed dylibs were found in /usr/local/lib. If you didn't put them there on purpose they could cause problems when building Homebrew formulae, and may need to be deleted. Unexpected dylibs: /usr/local/lib/libcdt.5.dylib /usr/local/lib/libcgraph.6.dylib /usr/local/lib/libgraph.5.dylib /usr/local/lib/libgvc.6.dylib /usr/local/lib/libgvpr.2.dylib /usr/local/lib/libpathplan.4.dylib /usr/local/lib/libxdot.4.dylib Error: Unbrewed .pc files were found in /usr/local/lib/pkgconfig. If you didn't put them there on purpose they could cause problems when building Homebrew formulae, and may need to be deleted. Unexpected .pc files: /usr/local/lib/pkgconfig/libcdt.pc /usr/local/lib/pkgconfig/libcgraph.pc /usr/local/lib/pkgconfig/libgraph.pc /usr/local/lib/pkgconfig/libgvc.pc /usr/local/lib/pkgconfig/libgvpr.pc /usr/local/lib/pkgconfig/libpathplan.pc /usr/local/lib/pkgconfig/libxdot.pc Error: /usr/bin occurs before /usr/local/bin This means that system-provided programs will be used instead of those provided by Homebrew. The following tools exist at both paths: 2to3 Consider amending your PATH so that /usr/local/bin is ahead of /usr/bin in your PATH.

    Read the article

  • Real Excel Templates 1.5

    - by Tim Dexter
    Not the next installment quite yet, just an update from what I knew yesterday. Right after I posted the Real Excel Templates I. Mike from the PM team got in touch to say he and Shirley had just had a meeting with a customer about the Excel Templates and all the fab features. He included BIPs extended functions, data pre-processing, sub templates and other functionality which was great new news. One caveat, much of the really new stuff, is not quite out in the wild yet. Will let you know as soon as I know more. Shirley and I shared a conversation around being able to re-group data in the templates. It's one of the most powerful features of the RTF template. Providing the ultimate flexibility in layouts. As I wrote yesterday, you need hierarchical data for Excel templates. I stand corrected, 'Of course you can do that in Excel, here's an example' said Shirley 'Very cunning Shirley, very cunning' says I. You can basically use the hidden sheet to re-group the data using native XSL. I'll cover the 'how' later. As you can see Excel templates are the new 'black' with lots of attention and more importantly development cycles to take them forward. Looks like we are going to have a great weekend weather wise here in Colorado. The yard work and pond are beckoning. Maybe the trout will be rising and I can give my rusty fly casting skills a run for their money. I need some stupid fish thou :0) See ya'll next week!

    Read the article

  • Data Security Through Structure, Procedures, Policies, and Governance

    Security Structure and Procedures One of the easiest ways to implement security is through the use of structure, in particular the structure in which data is stored. The preferred method for this through the use of User Roles, these Roles allow for specific access to be granted based on what role a user plays in relation to the data that they are manipulating. Typical data access actions are defined by the CRUD Principle. CRUD Principle: Create New Data Read Existing Data Update Existing Data Delete Existing Data Based on the actions assigned to a role assigned, User can manipulate data as they need to preform daily business operations.  An example of this can be seen in a hospital where doctors have been assigned Create, Read, Update, and Delete access to their patient’s prescriptions so that a doctor can prescribe and adjust any existing prescriptions as necessary. However, a nurse will only have Read access on the patient’s prescriptions so that they will know what medicines to give to the patients. If you notice, they do not have access to prescribe new prescriptions, update or delete existing prescriptions because only the patient’s doctor has access to preform those actions. With User Roles comes responsibility, companies need to constantly monitor data access to ensure that the proper roles have the most appropriate access levels to ensure users are not exposed to inappropriate data.  In addition this also protects rouge employees from gaining access to critical business information that could be destroyed, altered or stolen. It is important that all data access is monitored because of this threat. Security Governance Current Data Governance laws regarding security Health Insurance Portability and Accountability Act (HIPAA) Sarbanes-Oxley Act Database Breach Notification Act The US Department of Health and Human Services defines HIIPAA as a Privacy Rule. This legislation protects the privacy of individually identifiable health information. Currently, HIPAA   sets the national standards for securing electronically protected health records. Additionally, its confidentiality provisions protect identifiable information being used to analyze patient safety events and improve patient safety. In 2002 after the wake of the Enron and World Com Financial scandals Senator Paul Sarbanes and Representative Michael Oxley lead the creation of the Sarbanes-Oxley Act. This act administered by the Securities and Exchange Commission (SEC) dramatically altered corporate financial practices and data governance. In addition, it also set specific deadlines for compliance. The Sarbanes-Oxley is not a set of standard business rules and does not specify how a company should retain its records; In fact, this act outlines which pieces of data are to be stored as well as the storage duration. The Database Breach Notification Act requires companies, in the event of a data breach containing personally identifiable information, to notify all California residents whose information was stored on the compromised system at the time of the event, according to Gregory Manter. He further explains that this act is only California legislation. However, it does affect “any person or business that conducts business in California, and that owns or licenses computerized data that includes personal information,” regardless of where the compromised data is located.  This will force any business that maintains at least limited interactions with California residents will find themselves subject to the Act’s provisions. Security Policies All companies must work in accordance with the appropriate city, county, state, and federal laws. One way to ensure that a company is legally compliant is to enforce security policies that adhere to the appropriate legislation in their area or areas that they service. These types of polices need to be mandated by a company’s Security Officer. For smaller companies, these policies need to come from executives, Directors, and Owners.

    Read the article

  • VB .NET DirectCast and Type Reflection

    - by msarchet
    The application that I am working on has a generic Parent Form called RSChild, that is used to perform some operations depending on whether or not the control that is contained within it is in a MdiTabManager or inside of its own modal form. Then the actual User Controls contained within Inherit from a Interface Called ObjectEdit (Objects that we allow to be edited). At a point in my code I am doing this. Public Function doesTabExist(ByVal id As Integer, ByVal recordType As Enums.eRecordType) As Boolean Dim alikePages As Object = (From tabs In DirectCast(Control.FromHandle(MainForm.SharedHandle), MainForm).XtraTabbedMdiManager1.Pages Where DirectCast(tabs.MdiChild, RSChild).RSObject.RecordType = recordType Select tabs) For Each page As DevExpress.XtraTabbedMdi.XtraMdiTabPage In alikePages Select Case recordType Case Enums.eRecordType.Doctor If id = DirectCast(castTabPageToRSChild(page).RSObject, UI.Doctor).ID Then pageToActive(page) Return True End If 'rest of the cases so the case block is repeated 10 times' End Function And my castTabPageToRSChild(page) is a lambda function as Such Dim castTabPageToRSChild As Func(Of DevExpress.XtraTabbedMdi.XtraMdiTabPage, RSChild) = Function(page) DirectCast(page.MdiChild, RSChild) So my Question is, I have about 10 case statements, all because I can't seem to find a way to use reflection to get the underlying Type of the RSObject Object. So I have the whole If block repeated over and over. I tried doing castTabPageToRSChild(page)RSObject.GetType and using that in the DirectCast and I also tried creating another object that was separate from that and doing the same thing. My code works as intended I'm just trying to see if there is a manner in which I didn't have a lot of replicated code. My vision would be to do something like For Each page As XtraMdiTabPage In alikePages If id = DirectCast(castTabPageToRSchild(page).RSObject, TypeOfThatObject).Id Then Return True Next However I have a feeling this is not possible due to the behavior of DirectCast.

    Read the article

  • homebrew path issue

    - by Shaun Stanislaus
    Master:~ shaunstanislaus$ ruby <(curl -fsSkL raw.github.com/mxcl/homebrew/go) ==> This script will install: /usr/local/bin/brew /usr/local/Library/... /usr/local/share/man/man1/brew.1 Press enter to continue ==> Downloading and Installing Homebrew... remote: Counting objects: 82368, done. remote: Compressing objects: 100% (39323/39323), done. remote: Total 82368 (delta 56782), reused 65301 (delta 42220) Receiving objects: 100% (82368/82368), 11.68 MiB | 1.59 MiB/s, done. Resolving deltas: 100% (56782/56782), done. From https://github.com/mxcl/homebrew * [new branch] master -> origin/master HEAD is now at 2ea1a0e smpeg: depends on gtk ==> Installation successful! You should run `brew doctor' *before* you install anything. Now type: brew help Master:~ shaunstanislaus$ brew doctor -bash: /usr/local/bin/brew: /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby: bad interpreter: No such file or directory Master:~ shaunstanislaus$ echo $PATH /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/X11/bin:/Users/shaunstanislaus/Library/Application Support/GoodSync:/opt/local/bin:/opt/local/sbin:/usr/local/sbin:/Users/shaunstanislaus/.ec2/bin:/Users/shaunstanislaus/.rvm/bin /usr/local/bin/brew: /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby: bad interpreter: No such file or directory how do i fix this path issue? i can't use brew command and i think i previously symlink to wrong location. please advice, thank you.

    Read the article

  • Not getting the right expected output for my Mysql Query?

    - by user1878107
    i've 4 tables as shown below doctors id name ------------ 1 Mathew 2 Praveen 3 Rosie 4 Arjun 5 Denis doctors_appointments id doctors_id patient_name contact date status -------------------------------------------------------------------------------------- 1 5 Nidhin 9876543210 2012-12-10 15:39:41 Registered 2 5 Sunny 9876543210 2012-12-18 15:39:48 Registered 3 5 Mani 9876543210 2012-12-12 15:39:57 Registered 4 2 John 9876543210 2012-12-24 15:40:09 Registered 5 4 Raj 9876543210 2012-12-05 15:41:57 Registered 6 3 Samuel 9876543210 2012-12-14 15:41:33 Registered 7 2 Louis 9876543210 2012-12-24 15:40:23 Registered 8 1 Federick 9876543210 2012-12-28 15:41:05 Registered 9 2 Sam 9876543210 2012-12-12 15:40:38 Registered 10 4 Sita 9876543210 2012-12-12 15:41:00 Registered doctors_dutyplan id doctor_id weeks time no_of_patients ------------------------------------------------------------------ 1 1 3,6,7 9:00am-1:00pm 10 2 2 3,4,5 1:00pm-4:00pm 7 3 3 3,6,7 10:00am-2:00pm 10 4 4 3,4,5,6 8:30am-12:30pm 12 5 5 3,4,5,6,7 9:00am-4:00pm 30 emp_leave id empid leavedate -------------------------------- 1 2 2012-12-05 14:42:36 2 2 2012-12-03 14:42:59 3 3 2012-12-03 14:43:06 4 3 2012-12-06 14:43:14 5 5 2012-12-04 14:43:24 My task is to find all the days in a month in which the doctor is available excluding the leave dates. My query what is wrote is given below: SELECT DATE_ADD( '2012-12-01', INTERVAL ROW DAY ) AS Date, ROW +1 AS DayOfMonth FROM ( SELECT @row := @row +1 AS ROW FROM ( SELECT 0 UNION ALL SELECT 1 UNION ALL SELECT 3 UNION ALL SELECT 4 UNION ALL SELECT 5 UNION ALL SELECT 6 )t1, ( SELECT 0 UNION ALL SELECT 1 UNION ALL SELECT 3 UNION ALL SELECT 4 UNION ALL SELECT 5 UNION ALL SELECT 6 )t2, ( SELECT @row := -1 )t3 LIMIT 31 )b WHERE DATE_ADD( '2012-12-01', INTERVAL ROW DAY ) BETWEEN '2012-12-01' AND '2012-12-31' AND DAYOFWEEK( DATE_ADD( '2012-12-01', INTERVAL ROW DAY ) ) =2 AND DATE_ADD( '2012-12-01', INTERVAL ROW DAY ) NOT IN ( SELECT DATE_FORMAT( l.leavedate, '%Y-%m-%d' ) AS date FROM doctors_dutyplan d LEFT JOIN emp_leave AS l ON d.doctor_id = l.empid WHERE doctor_id =2 ) This works fine for all doctors who took any leave in a particular day in a month (here in the example it is Decemeber 2012). and the result is shown below: Date DayOfMonth ----------------------- 2012-12-10 10 2012-12-17 17 2012-12-24 24 2012-12-31 31 But on the other hand for the doctors who did'nt took any leave , for that my query is showing empty table, example for the doctor Mathew whose id is 1, my query returns an empty result can anyone please tell a solution for this problem. Thanks in advance.

    Read the article

  • UIImageView subclass with CGRectIntersectsRect - help!

    - by Flafla2
    The title of this question should be pretty self explanatory. I am making an app that involves multiple UIImageViews that serve the same purpose. They are merely different sizes. Anyway, I decided that the best solution was to make UIImageView subclasses, link the subcalsses in IB, and work from there. My code should explain this better - #define kPausedStatePaused 1 #define kPausedStatePlay 2 #import "Game.h" #import "ScoreSystem.h" @interface Doctor : UIImageView { } @end @interface Ground : UIImageView { } @end @interface Wall : UIImageView { } @end @interface Electric_Wire : UIImageView { } @end @implementation Game /* // The designated initializer. Override if you create the controller programmatically and want to perform customization that is not appropriate for viewDidLoad. - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil { if (self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]) { // Custom initialization } return self; } */ /* // Implement viewDidLoad to do additional setup after loading the view, typically from a nib. - (void)viewDidLoad { [super viewDidLoad]; } */ - (IBAction)pause { UIAlertView *pause = [[UIAlertView alloc] initWithTitle:@"Pause" message:nil delegate:self cancelButtonTitle:@"Quit" otherButtonTitles:@"Play", nil]; [pause show]; [pause release]; pauseint = kPausedStatePaused; } - (void)viewDidAppear { pauseint = kPausedStatePlay; } - (void)loop { Doctor *doctorview; Ground *groundview; if (CGRectIntersectsRect(doctorview, groundview)) { } } - (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex { if ([alertView.title isEqual:@"Pause"]) { if(buttonIndex == 0) [self dismissModalViewControllerAnimated:YES]; pauseint = kPausedStatePlay; } } // Override to allow orientations other than the default portrait orientation. - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { // Return YES for supported orientations return (interfaceOrientation == UIInterfaceOrientationLandscapeRight); } - (void)didReceiveMemoryWarning { // Releases the view if it doesn't have a superview. [super didReceiveMemoryWarning]; // Release any cached data, images, etc that aren't in use. } - (void)viewDidUnload { // Release any retained subviews of the main view. // e.g. self.myOutlet = nil; } - (void)dealloc { [super dealloc]; } @end Unsurprisingly, Xcode gave me an "incompatible type for CGRectIntersectsRect" error.

    Read the article

  • What is the difference between Port and Connector?

    - by Ali Essam
    I want to know the difference between Port and Connector in Computer (the physical ones),and how can i tell that this thing is a port or connector ? I know that both terms are used for the same purpose but Doctor in college asked us to show the difference between them,and i have searched for it but people just say that there is no difference. According to Wikipedia also Port and Connector are almost the same.

    Read the article

  • Object allocations in the cellForRowAtIndexPath method is increasing? Is dealloc not called in prese

    - by Madan Mohan
    Hi Guys, This is PresentModelViewController, when click a button i will get this "DoctorListViewController" controller from down. object allocation are not releasing in this controller specially in cellForRowAtIndexPath delegate method. UITableViewCell and two labels allocated in this is not releasing. In the previous view The allocation count of this " UITableViewCell and two labels" is increasing.Also the dealloc method in this view controller is not called when I dismiss the modelviewcontrller, that is way I have released in the close method. please suggest me a right solution Thank you. import "DoctorListViewController.h" @implementation DoctorListViewController @synthesize doctorList; - (id)init { if (self = [super init]) { self.title=@"Doctors List"; UIView *myView = [[UIView alloc] initWithFrame:[[UIScreen mainScreen] applicationFrame]]; myView.autoresizingMask=YES; [myView setBackgroundColor:[UIColor groupTableViewBackgroundColor]]; myTableView=nil; myTableView = [[UITableView alloc]initWithFrame:CGRectMake(0,0,320,420) style:UITableViewStylePlain]; myTableView.delegate = self; myTableView.dataSource=self; [myTableView setSectionFooterHeight:5]; [myTableView setSectionHeaderHeight:15]; [myTableView setSeparatorColor:[UIColor greenColor]]; [myView addSubview: myTableView]; UIBarButtonItem *addButton = [[UIBarButtonItem alloc]initWithTitle:@"Close" style:UIBarButtonItemStyleBordered target:self action:@selector(closeAction)]; self.navigationItem.leftBarButtonItem = addButton; [addButton release]; self.view = myView; [myView release]; } return self; } -(void)viewWillAppear:(BOOL)animated { DoctorsAppDelegate *appDelegate = (DoctorsAppDelegate *) [ [UIApplication sharedApplication] delegate]; [self setToPortrait:appDelegate.isPortrait]; } -(void)setToPortrait:(BOOL)isPortrait { if(isPortrait == YES) { printf("\n hai i am in setToPortrait method"); [self shouldAutorotateToInterfaceOrientation:UIInterfaceOrientationPortrait]; } } -(BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { DoctorsAppDelegate *appDelegate = (DoctorsAppDelegate *) [ [UIApplication sharedApplication] delegate]; if(interfaceOrientation == UIInterfaceOrientationLandscapeLeft || interfaceOrientation == UIInterfaceOrientationLandscapeRight ) { myTableView.frame=CGRectMake(0,0,480,265); appDelegate.isPortrait=NO; } else if(interfaceOrientation == UIInterfaceOrientationPortrait) { myTableView.frame=CGRectMake(0,0,320,415); appDelegate.isPortrait=YES; } return YES; } -(void)closeAction { printf("\n hai i am in close action*****************"); [doctorList release]; [myTableView release]; myTableView=nil; printf("\n myTableView retainCount :%d",[myTableView retainCount]); [[self navigationController] dismissModalViewControllerAnimated:YES]; } pragma mark methods for dataSource and delegate (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { return 1; } (NSInteger)tableView:(UITableView )tableView numberOfRowsInSection:(NSInteger)section { / int numberOfRows = [doctorList count]; if(numberOfRows =[doctorList count]){ numberOfRows++; } return numberOfRows; */ return [doctorList count]; } (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath { return 50; } (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { UITableViewCell *cell = (UITableViewCell *)[myTableView dequeueReusableCellWithIdentifier:@"MyIdentifier"]; if (cell == nil) { cell = [[[UITableViewCell alloc] initWithFrame:CGRectZero reuseIdentifier:@"MyIdentifier"]autorelease]; UIView* elementView = [ [UIView alloc] initWithFrame:CGRectMake(5,5,300,480)]; elementView.tag = 0; [cell.contentView addSubview:elementView]; [elementView release]; } UIView* elementView = [cell.contentView viewWithTag:0]; for(UIView* subView in elementView.subviews) { [subView removeFromSuperview]; } if(indexPath.row != [doctorList count]) { cell.accessoryType=UITableViewCellAccessoryDisclosureIndicator; Doctor *obj= [doctorList objectAtIndex:indexPath.row]; UILabel *firstNameLabel =[[[UILabel alloc] initWithFrame:CGRectMake(5,2,300,15)]autorelease]; [firstNameLabel setFont:[UIFont boldSystemFontOfSize:12]]; firstNameLabel.textColor = [UIColor blackColor]; firstNameLabel.textColor =[UIColor blackColor]; firstNameLabel.numberOfLines = 0; firstNameLabel.tag=1; firstNameLabel.backgroundColor = [UIColor clearColor]; NSString *str=obj.firstName; str=[str stringByAppendingString:@" "]; str=[str stringByAppendingString:obj.lastName]; firstNameLabel.text=str; [elementView addSubview:firstNameLabel]; //[firstNameLabel release]; firstNameLabel=nil; UILabel *streetLabel =[[[UILabel alloc] initWithFrame:CGRectMake(5,20,300,15)]autorelease]; [streetLabel setFont:[UIFont systemFontOfSize:12]]; streetLabel.textColor = [UIColor blackColor]; streetLabel.numberOfLines = 0; streetLabel.tag=2; streetLabel.backgroundColor = [UIColor clearColor]; streetLabel.text=obj.streetAddress; [elementView addSubview:streetLabel]; //[streetLabel release]; streetLabel=nil; printf("\n retainCount count of firstNameLabel %d",[firstNameLabel retainCount]); printf("\n retainCount count of streetLabel %d",[streetLabel retainCount]); printf("\n retainCount count of cell %d",[cell retainCount]); } return cell; } (void )tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { [myTableView deselectRowAtIndexPath:indexPath animated:YES]; DoctorDetailsViewController *doctorDetailsViewController=[[DoctorDetailsViewController alloc]init]; Doctor *obj= [doctorList objectAtIndex:indexPath.row]; BOOL isList=YES; doctorDetailsViewController.isList=isList; doctorDetailsViewController.doctorObj=obj; [[self navigationController] pushViewController:doctorDetailsViewController animated:YES]; [doctorDetailsViewController release]; } (void)didReceiveMemoryWarning { // Releases the view if it doesn't have a superview. [super didReceiveMemoryWarning]; // Release any cached data, images, etc that aren't in use. } (void)dealloc { printf("\n hai i am in dealloc of Doctor list view contrller"); //[doctorList release]; //[myTableView release]; [super dealloc]; } @end

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8  | Next Page >