Search Results

Search found 21356 results on 855 pages for 'check digit'.

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

  • How do I create a multiple-table 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

  • How to check with program in other programming-language (C,C++, etc) whether JAVA is installed and w

    - by Andreas Hornig
    Hi, I would like to know whether or not JAVA is installed and where (path). Perhaps it sounds strange, but my aim is to let BOINC (coded in C++) check the JAVA installation and then start my JAVA app. But therefore I need to know if BOINC can start JAVA natively, or if I have to also send the JRE and then start my app with this not installed JRE. So is there a way to check the installation first? thank you in advance! Andreas

    Read the article

  • Check file stamp using FTP to see if it is today's file.

    - by needshelp
    Hi, I am using FTP (plain version) to download files from a server. The name of the file is always the same. All I can do to check to know if it is today's file is look at the timestamp manually. How can I write FTP script to check if the time stamp is having today's date? If you have come across this situation and have solved it, please let me know. Thank you in advance for your time.

    Read the article

  • Disable digit substitution

    - by Uwe
    How can I disable the digit substitution (for example for Hindi numerals instead of Arabic ones) for my application (native c++) completely? I want all the numbers displayed with 0123 instead of ???? There is an option in localization options in windows, but I don't want to change that for the user. Only for my app. Thank you!

    Read the article

  • Retrieving the first digit of a number

    - by Michoel
    Hi, I am just learning Java and am trying to get my program to retrieve the first digit of a number - for example 543 should return 5, etc. I thought to convert to a string, but I am not sure how I can convert it back? Thanks for any help. int number = 534; String numberString = Integer.toString(number); char firstLetterChar = numberString.charAt(0); int firstDigit = ????

    Read the article

  • PHP MYSQL loop to check if LicenseID Values are contained in mysql DB [closed]

    - by Jasper
    I have some troubles to find the right loop to check if some values are contained in mysql DB. I'm making a software and I want to add license ID. Each user has x keys to use. Now when the user start the client, it invokes a PHP page that check if the Key sent in the POST method is stored in DB or not. If that key isn't store than I need to check the number of his keys. If it's than X I'll ban him otherwise i add the new keys in the DB. I'm new with PHP and MYSQL. I wrote this code and I would know if I can improve it. <?php $user = POST METHOD $licenseID = POST METHOD $resultLic= mysql_query("SELECT id , idUser , idLicense FROM license WHERE idUser = '$user'") or die(mysql_error()); $resultNumber = mysql_num_rows($resultLic); $keyFound = '0'; // If keyfound is 1 the key is stored in DB while ($rows = mysql_fetch_array($resultLic,MYSQL_BOTH)) { //this loop check if the $licenseID is stored in DB or not for($i=0; $i< $resultNumber ; i++) { if($rows['idLicense'] === $licenseID) { //Just for the debug echo("License Found"); $keyFound = '1'; break; } //If key isn't in DB and there are less than 3 keys the new key will be store in DB if($keyfound == '0' && $resultNumber < 3) { mysql_query( Update users set ...Store $licenseID in Table) } // Else mean that the user want user another generated key (from the client) in the DB and i will be ban (It's wrote in TOS terms that they cant use the software on more than 3 different station) else { mysql_query( update users set ban ='1'.....etc ); } } ?> I know that this code seems really bad so i would know how i can improve it. Someone Could give me any advice? I choose to have 2 tables: users where all information about the users is, with fields id, username, password and another table license with fields id, idUsername, idLicense (the last one store license that the software generate)

    Read the article

  • share code between check and process methods

    - by undu
    My job is to refactor an old library for GIS vector data processing. The main class encapsulates a collection of building outlines, and offers different methods for checking data consistency. Those checking functions have an optional parameter that allows to perform some process. For instance: std::vector<Point> checkIntersections(int process_mode = 0); This method tests if some building outlines are intersecting, and return the intersection points. But if you pass a non null argument, the method will modify the outlines to remove the intersection. I think it's pretty bad (at call site, a reader not familiar with the code base will assume that a method called checkSomething only performs a check and doesn't modifiy data) and I want to change this. I also want to avoid code duplication as check and process methods are mostly similar. So I was thinking to something like this: // a private worker std::vector<Point> workerIntersections(int process_mode = 0) { // it's the equivalent of the current checkIntersections, it may perform // a process depending on process_mode } // public interfaces for check and process std::vector<Point> checkIntersections() /* const */ { workerIntersections(0); } std::vector<Point> processIntersections(int process_mode /*I have different process modes*/) { workerIntersections(process_mode); } But that forces me to break const correctness as workerIntersections is a non-const method. How can I separate check and process, avoiding code duplication and keeping const-correctness?

    Read the article

  • VSS to TFS Migration - Persist User on check-in actions

    - by Adam Jenkin
    I am using the VSSConveter.exe tool to import from VSS6 (using 2005 ide) to TFS2008. I have run analyze (no errors) and migrate WITH a user mapping file (containg the vss/domain user mappings) I would like to persist in tfs the check-in user of the file, currently the check-in user for all versions of file shows as admin (the account im running the import with), the origional check-in user is appended to the check-in comment. For example:- TestFile.aspx in VSS Check in ver: 1 - User:Adam - Comment:TEST1 Check in ver: 2 - User:James - Comment:TEST2 Check in ver: 3 - User:Joel - Comment:TEST2 After import into TFS Check in ver: 1 - User:mydomain\Admin - Comment:TEST1 (Commited by Adam) Check in ver: 2 - User:mydomain\Admin - Comment:TEST2 (Commited by James) Check in ver: 3 - User:mydomain\Admin - Comment:TEST2 (Commited by Joel) In TFS I want the user to show as the correct domain user as configured in my user mapping file. Is this possible, or is this just how the VSSConverter program works?

    Read the article

  • Define a regex, which matches one digit twice and all others once

    - by Amin
    As part of a larger regex I would like to match the following restrictions: The string has 11 digits All digits are numbers Within the first 10 digits one number [0-9] (and one only!) must be listed twice This means the following should match: 12345678914 12235879600 Whereas these should not: 12345678903 -> none of the numbers at digits 1 to 10 appears twice 14427823482 -> one number appears more than twice 72349121762 -> two numbers appear twice I have tried to use a lookahead, but all I'm managing is that the regex counts a certain digit, i.e.: (?!.*0\1{2}) That does not do what I need. Is my query even possible with regex?

    Read the article

  • How to get user input for 2 digit data

    - by oneMinute
    In a HTML form user is expect to fill / select some data and trigger an action probably a http-post. If your only requested data field is a "2 digit" you can use html text input element get some data. Then you want to make it useful; enable user easily select data from a 'html select' But not all of your data is well-ordered so eye-searching within these data is somehow cumbersome. Because your data is meaningful with its relations. If there is no primary key for foreign key "12" it should not be shown. Vice versa if this foreign key occurs a lot, then it has some weight and could be displayed with more importance. So, what will be your way? a) Use text input to get data and validate it with regex, javascript, ... b) Use some dropdown select. c) Any other way ? Any answer will appreciated :)

    Read the article

  • Unknown http requests of type http://<domain>/cache/<32-digit-alphanumeric-key>

    - by Siva Bathula
    I am getting a lot of incoming requests with this structure: //domain_name/cache/22092e9b25c40809dfb94b6179166b26. I am running a .NET 4.0 website served from IIS 7.5. A lot of these URLs have no referrer URLs and come in randomly with a different 32 digit alphanumeric key. And I do not have any resource like '.../cache/...' on my website. I just want to eliminate such requests and want to understand where these are coming from at all. Any help would be appreciated.

    Read the article

  • Sorting 1 million 8-digit numbers in 1MB of RAM

    - by Favourite Chigozie Onwuemene
    I have a computer with 1M of RAM and no other local storage. I must use it to accept 1 million 8-digit decimal numbers over a TCP connection, sort them, and then send the sorted list out over another TCP connection. The list of numbers may contain duplicates, which I must not discard. The code will be placed in ROM, so I need not subtract the size of my code from the 1M. I already have code to drive the ethernet port and handle TCP/IP connections, and it requires 2k for its state data, including a 1k buffer via which the code will read and write data. Is there a solution to this problem?

    Read the article

  • Why does String.Equals(Object obj) check to see if this == null?

    - by m-y
    // Determines whether two strings match. [ReliabilityContract(Consistency.WillNotCorruptState, Cer.MayFail)] public override bool Equals(Object obj) { //this is necessary to guard against reverse-pinvokes and //other callers who do not use the callvirt instruction if (this == null) throw new NullReferenceException(); String str = obj as String; if (str == null) return false; if (Object.ReferenceEquals(this, obj)) return true; return EqualsHelper(this, str); } The part I don't understand is the fact that it is checking for the current instance, this, against null. The comment is a bit confusing, so I was wondering what does that comment actually mean? Can anyone give an example of how this could break if that check was not there, and does this mean that I should also place that check in my classes?

    Read the article

  • how to check that Google Analytics Tracking Code is firing on an iPad

    - by crmpicco
    I am used to using the Firebug extension "Omnibug" with Firefox to check that Google Analytics Tracking Code is firing on my website. This application works very well and has minimal overhead. I am now testing the website on an iPad and would like to know if there is a way to check that the GATC is firing on the iPad natively? I have spoofed the iPad UA string on Firefox on the desktop and it appears to fire correctly, however i'd like to see it happening on the device itself (if at all possible). I know that Firebug can be installed on an iPhone by means of a bookmarklet, however it is 1) quite buggy and not very user-friendly and 2) it doesn't support Omnibug. How can I check that my GATC is firing on my iPad?

    Read the article

  • Kernel Panic Fatal Machine Check

    - by 0x4a6f4672
    I have got a new Samsung Series 7 laptop with dual boot setup for Windows 8 and Ubuntu 12.10. The Ubuntu installation was quite a hassle, but with the help of Boot Repair finally it seemed to work. Or so I thought. Windows 8 starts fine, but if I want to start Ubuntu regularly the following error occurs, quite similar to this one [Hardware Error] CPU 1: Machine Check Exception: 5 Bank 6 [Hardware Error] RIP !inexact! 33 <00007fab2074598a> [Hardware Error] TSC 95b623464c ADDR fe400 MISC 3880000086 .. [similar messages for CPU 2,3 and 0] .. [Hardware Error] Machine Check: Processor context corrupt Kernel panic - not syncing: Fatal Machine Check Rebooting in 30 seconds Kernel panic does not sound good. Then it starts to reboot, and the second boot trial often works. Is it a Kernel or driver problem? The laptop has an Intel Core i7 processor. I already deactivated Hyperthreading in the BIOS, but it does not seem to help :-(

    Read the article

  • mySQL removes first digit

    - by kielie
    Hi guys, I am inputting data into a mySQL database via a PHP script, but for some reason when I check the database, all of the phone numbers have their first digit removed, like so, 0123456789 shows up as 123456789 in the database, but if I change the data type from INT to TEXT, it shows correctly, I am very hesitant to keep it as TEXT though, as I am sure this will cause complications further down the road as the database app starts to become more complicated, here is the PHP code. <?php $gender = $_POST['gender']; $first_name = $_POST['first_name']; $second_name = $_POST['second_name']; $id_number = $_POST['id_number']; $home_number = $_POST['home_number']; $cell_work = $_POST['cell_work']; $email_address = $_POST['email_address']; $curDate = date("Y-m-d"); mysql_connect ("server", "user", "pass") or die ('Error: ' . mysql_error()); mysql_select_db ("database"); $query = "INSERT INTO table (id,gender,first_name,second_name,id_number,home_number,cell_work,email_address,date) VALUES('NULL','".$gender."','".$first_name."','".$second_name."','".$id_number."','".$home_number."','".$cell_work."','".$email_address."','".$curDate."' )"; mysql_query($query) or die (mysql_error()); ?> Thanx in advance!

    Read the article

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