Search Results

Search found 871 results on 35 pages for 'ma ver ick'.

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

  • algorithm optimization: returning object and sub-objects from single SQL statement in PHP

    - by pocketfullofcheese
    I have an object oriented PHP application. I have a simple hierarchy stored in an SQL table (Chapters and Authors that can be assigned to a chapter). I wrote the following method to fetch the chapters and the authors in a single query and then loop through the result, figuring out which rows belong to the same chapter and creating both Chapter objects and arrays of Author objects. However, I feel like this can be made a lot neater. Can someone help? function getChaptersWithAuthors($monographId, $rangeInfo = null) { $result =& $this->retrieveRange( 'SELECT mc.chapter_id, mc.monograph_id, mc.chapter_seq, ma.author_id, ma.monograph_id, mca.primary_contact, mca.seq, ma.first_name, ma.middle_name, ma.last_name, ma.affiliation, ma.country, ma.email, ma.url FROM monograph_chapters mc LEFT JOIN monograph_chapter_authors mca ON mc.chapter_id = mca.chapter_id LEFT JOIN monograph_authors ma ON ma.author_id = mca.author_id WHERE mc.monograph_id = ? ORDER BY mc.chapter_seq, mca.seq', $monographId, $rangeInfo ); $chapterAuthorDao =& DAORegistry::getDAO('ChapterAuthorDAO'); $chapters = array(); $authors = array(); while (!$result->EOF) { $row = $result->GetRowAssoc(false); // initialize $currentChapterId for the first row if ( !isset($currentChapterId) ) $currentChapterId = $row['chapter_id']; if ( $row['chapter_id'] != $currentChapterId) { // we're on a new row. create a chapter from the previous one $chapter =& $this->_returnFromRow($prevRow); // set the authors with all the authors found so far $chapter->setAuthors($authors); // clear the authors array unset($authors); $authors = array(); // add the chapters to the returner $chapters[$currentChapterId] =& $chapter; // set the current id for this row $currentChapterId = $row['chapter_id']; } // add every author to the authors array if ( $row['author_id'] ) $authors[$row['author_id']] =& $chapterAuthorDao->_returnFromRow($row); // keep a copy of the previous row for creating the chapter once we're on a new chapter row $prevRow = $row; $result->MoveNext(); if ( $result->EOF ) { // The result set is at the end $chapter =& $this->_returnFromRow($row); // set the authors with all the authors found so far $chapter->setAuthors($authors); unset($authors); // add the chapters to the returner $chapters[$currentChapterId] =& $chapter; } } $result->Close(); unset($result); return $chapters; } PS: the _returnFromRow methods simply construct an Chapter or Author object given the SQL row. If needed, I can post those methods here.

    Read the article

  • Converting Complicated Oracle Join Syntax

    - by Grasper
    I have asked for help before on porting joins of this nature, but nothing this complex. I am porting a bunch of old SQL from oracle to postgres, which includes a lot of (+) style left joins. I need this in a format that pg will understand. I am having trouble deciphering this join hierarchy: SELECT * FROM PLANNED_MISSION PM_CTRL, CONTROL_AGENCY CA, MISSION_CONTROL MC, MISSION_OBJECTIVE MOR, REQUEST_OBJECTIVE RO, MISSION_REQUEST_PAIRING MRP, FRIENDLY_UNIT FU, PACKAGE_MISSION PKM, MISSION_AIRCRAFT MA, MISSION_OBJECTIVE MO, PLANNED_MISSION PM WHERE PM.MSN_TASKED_UNIT_TYPE != 'EAM' AND PM.MSN_INT_ID = MO.MSN_INT_ID AND PM.MSN_INT_ID = PKM.MSN_INT_ID (+) AND PM.MSN_INT_ID = MA.MSN_INT_ID (+) AND COALESCE(MA.MA_RESOURCE_INT_ID,0) = (SELECT COALESCE(MIN(MA1.MA_RESOURCE_INT_ID),0) FROM MISSION_AIRCRAFT MA1 WHERE MA.MSN_INT_ID = MA1.MSN_INT_ID) AND MA.FU_UNIT_ID = FU.FU_UNIT_ID (+) AND MA.CC_COUNTRY_CD = FU.CC_COUNTRY_CD (+) AND MO.MSN_INT_ID = MC.MSN_INT_ID (+) AND MO.MO_INT_ID = MC.MO_INT_ID (+) AND MC.CAG_CALLSIGN = CA.CAG_CALLSIGN (+) AND MC.CTRL_MSN_INT_ID = PM_CTRL.MSN_INT_ID (+) AND MO.MSN_INT_ID = MRP.MSN_INT_ID (+) AND MO.MO_INT_ID = MRP.MO_INT_ID (+) AND MRP.REQ_INT_ID = RO.REQ_INT_ID (+) AND RO.MSN_INT_ID = MOR.MSN_INT_ID (+) AND RO.MO_INT_ID = MOR.MO_INT_ID (+) AND MO.MSN_INT_ID = :msn_int_id AND MO.MO_INT_ID = :obj_int_id AND COALESCE(PM.MSN_MISSION_NUM, ' ') LIKE '%' AND COALESCE( PKM.PKG_NM,' ') LIKE '%' AND COALESCE( MA.FU_UNIT_ID, ' ') LIKE '%' AND COALESCE( MA.CC_COUNTRY_CD, ' ') LIKE '%' AND COALESCE(FU.FU_COMPONENT, ' ') LIKE '%' AND COALESCE( MA.ACT_AC_TYPE,' ') LIKE '%' AND MO.MO_MSN_CLASS_CD LIKE '%' AND COALESCE(MO.MO_MSN_TYPE, ' ') LIKE '%' AND COALESCE( MO.MO_OBJ_LOCATION,COALESCE( MOR.MO_OBJ_LOCATION, ' ')) LIKE '%' AND COALESCE(CA.CAG_TYPE_OF_CONTROL, ' ') LIKE '%' AND COALESCE( MC.CAG_CALLSIGN,' ') LIKE '%' AND COALESCE( MC.ASP_AIRSPACE_NM, ' ') LIKE '%' AND COALESCE( MC.CTRL_MSN_INT_ID, 0) LIKE '%' AND COALESCE(MC.CTRL_MO_INT_ID, 0) LIKE '%' AND COALESCE( PM_CTRL.MSN_MISSION_NUM,' ') LIKE '%' Any help is appreciated.

    Read the article

  • Windows7 shows a drive as full in summary but files, including backup folder, shown on drive are ver

    - by Rob
    I have a drive partitioned so it is seen by Windows as 2 drives: C:\ and D:\ Windows7 shows D:\ as full up in the graphical summary in 'My Computer' summary of all the drives, e.g. the bar graph indicates full and nearly all of the drive's capacity, 108Gb, is full. So I go into the D:\ drive to look at the files, I see several folders. I select them all and the right click menu Properties to count their size, expecting the value to be about the same as what Windows reports in the summary, i.e. nearly 108Gb. But the properties shows the files are very small, Kbs and Mbs, nowhere near 108Gbs. One of the folders is a backup, but its size is very small. I've checked the folder options to show all system files and hidden files too - and counted these in the properties. Something invisible is holding the space. What is happening here? I'm afraid to delete anything if it removes valuable backups. Have I got huge backups here? Why can't I see them? How do I see them?

    Read the article

  • How can I split the 5.1 audio channels from an AC3 file into individuals streams (preferably on a Ma

    - by Drarok
    I have a file that I've pulled from a DVD that is apparently in AC3 5.1 format. The extension is .AC3 and it opens an plays in QuickTime, VLC etc. What I want is each individual channel in a separate file, but I can't seem to find any tools that will allow be to do that. Is there a way to split the file I have, or alternatively is there a way to pull the audio streams from a 5.1 DVD?

    Read the article

  • Can't find partition tab in disk utility osX ver. 10.6.8

    - by John W
    I just got a used Mac Book Pro. I created a new admin account and deleted the old one as well as one other user. This is an older late 2007 MBP... the osX upgrade to 10.6.8 was just performed. My Macintosh HD is showing up as Partition 2. I ran disk utility (not from install disk), but there was no partition tab. I have a 160GB drive with only 53GB of space left on it. Since I am the only user and have no files on the laptop yet, I don't understand why there is so little space left. Surely the OS can't use up over 100GB. I wanted to run disk utility to see if there were any recovery partitions or other partition left over from the previous owner that could be erased to make room for expanding the main partition. Unfortunately, there is no partition tab in disk utility. The documentation I have found on line states that this version of osX includes that utility. The osX disks I have are for an older version so I wasn't sure if they would be of any use in solving this problem. Also, I was afraid if using the disks, would I lose the little bit of data/apps that I have assembled. I would rather not do a fresh install and have to do all the updates again to achieve this. The previous owner had some apps that I don't want to lose as I would have to pay handsomely to get them back. Simply, if all the previous users data is backed up on here after deleting user is still taking up space on a recovery partition (that I can't see)... I need to locate it erase it and expand the primary partition to re-aquire disk space for my files. I am new to Mac, so please be as descriptive as possible. Thanks.

    Read the article

  • Unable to logon to vpn

    - by nitin pande
    My openvpn client log file- The interesting bit: Tue Oct 26 12:32:49 2010 TLS Error: cannot locate HMAC in incoming packet from 67.228.223.12:3389 Tue Oct 26 12:32:49 2010 Fatal TLS error (check_tls_errors_co), restarting Tue Oct 26 12:32:49 2010 TCP/UDP: Closing socket The rest of the log just in case: Tue Oct 26 12:32:35 2010 OpenVPN 2.0.9 Win32-MinGW [SSL] [LZO] built on Oct 1 2006 Tue Oct 26 12:32:48 2010 IMPORTANT: OpenVPN's default port number is now 1194, based on an official port number assignment by IANA. OpenVPN 2.0-beta16 and earlier used 5000 as the default port. Tue Oct 26 12:32:48 2010 Control Channel Authentication: using 'ta.key' as a OpenVPN static key file Tue Oct 26 12:32:48 2010 Outgoing Control Channel Authentication: Using 160 bit message hash 'SHA1' for HMAC authentication Tue Oct 26 12:32:48 2010 Incoming Control Channel Authentication: Using 160 bit message hash 'SHA1' for HMAC authentication Tue Oct 26 12:32:48 2010 LZO compression initialized Tue Oct 26 12:32:48 2010 Control Channel MTU parms [ L:1544 D:168 EF:68 EB:0 ET:0 EL:0 ] Tue Oct 26 12:32:48 2010 Data Channel MTU parms [ L:1544 D:1450 EF:44 EB:135 ET:0 EL:0 AF:3/1 ] Tue Oct 26 12:32:48 2010 Local Options hash (VER=V4): 'ee93268d' Tue Oct 26 12:32:48 2010 Expected Remote Options hash (VER=V4): 'bd577cd1' Tue Oct 26 12:32:48 2010 Attempting to establish TCP connection with 67.228.223.12:3389 Tue Oct 26 12:32:48 2010 TCP connection established with 67.228.223.12:3389 Tue Oct 26 12:32:48 2010 TCPv4_CLIENT link local: [undef] Tue Oct 26 12:32:48 2010 TCPv4_CLIENT link remote: 67.228.223.12:3389 Tue Oct 26 12:32:49 2010 TLS: Initial packet from 67.228.223.12:3389, sid=bd5f79fe 8475497f Tue Oct 26 12:32:49 2010 TLS Error: cannot locate HMAC in incoming packet from 67.228.223.12:3389 Tue Oct 26 12:32:49 2010 Fatal TLS error (check_tls_errors_co), restarting Tue Oct 26 12:32:49 2010 TCP/UDP: Closing socket Tue Oct 26 12:32:49 2010 SIGUSR1[soft,tls-error] received, process restarting Tue Oct 26 12:32:49 2010 Restart pause, 5 second(s) Tue Oct 26 12:32:54 2010 IMPORTANT: OpenVPN's default port number is now 1194, based on an official port number assignment by IANA. OpenVPN 2.0-beta16 and earlier used 5000 as the default port. Tue Oct 26 12:32:54 2010 Re-using SSL/TLS context Tue Oct 26 12:32:54 2010 LZO compression initialized Tue Oct 26 12:32:54 2010 Control Channel MTU parms [ L:1544 D:168 EF:68 EB:0 ET:0 EL:0 ] Tue Oct 26 12:32:54 2010 Data Channel MTU parms [ L:1544 D:1450 EF:44 EB:135 ET:0 EL:0 AF:3/1 ] Tue Oct 26 12:32:54 2010 Local Options hash (VER=V4): 'ee93268d' Tue Oct 26 12:32:54 2010 Expected Remote Options hash (VER=V4): 'bd577cd1' Tue Oct 26 12:32:54 2010 Attempting to establish TCP connection with 67.228.223.12:3389 Tue Oct 26 12:32:54 2010 TCP connection established with 67.228.223.12:3389 Tue Oct 26 12:32:54 2010 TCPv4_CLIENT link local: [undef] Tue Oct 26 12:32:54 2010 TCPv4_CLIENT link remote: 67.228.223.12:3389 Tue Oct 26 12:32:54 2010 TLS: Initial packet from 67.228.223.12:3389, sid=1643b931 ce240d5f Tue Oct 26 12:32:54 2010 TLS Error: cannot locate HMAC in incoming packet from 67.228.223.12:3389 Tue Oct 26 12:32:54 2010 Fatal TLS error (check_tls_errors_co), restarting Tue Oct 26 12:32:54 2010 TCP/UDP: Closing socket Tue Oct 26 12:32:54 2010 SIGUSR1[soft,tls-error] received, process restarting Tue Oct 26 12:32:54 2010 Restart pause, 5 second(s) Tue Oct 26 12:32:59 2010 IMPORTANT: OpenVPN's default port number is now 1194, based on an official port number assignment by IANA. OpenVPN 2.0-beta16 and earlier used 5000 as the default port. Tue Oct 26 12:32:59 2010 Re-using SSL/TLS context Tue Oct 26 12:32:59 2010 LZO compression initialized Tue Oct 26 12:32:59 2010 Control Channel MTU parms [ L:1544 D:168 EF:68 EB:0 ET:0 EL:0 ] Tue Oct 26 12:32:59 2010 Data Channel MTU parms [ L:1544 D:1450 EF:44 EB:135 ET:0 EL:0 AF:3/1 ] Tue Oct 26 12:32:59 2010 Local Options hash (VER=V4): 'ee93268d' Tue Oct 26 12:32:59 2010 Expected Remote Options hash (VER=V4): 'bd577cd1' Tue Oct 26 12:32:59 2010 Attempting to establish TCP connection with 67.228.223.12:3389 Tue Oct 26 12:33:00 2010 TCP connection established with 67.228.223.12:3389 Tue Oct 26 12:33:00 2010 TCPv4_CLIENT link local: [undef] Tue Oct 26 12:33:00 2010 TCPv4_CLIENT link remote: 67.228.223.12:3389 Tue Oct 26 12:33:00 2010 TLS: Initial packet from 67.228.223.12:3389, sid=cd439fb2 d625ca0d Tue Oct 26 12:33:00 2010 TLS Error: cannot locate HMAC in incoming packet from 67.228.223.12:3389 Tue Oct 26 12:33:00 2010 Fatal TLS error (check_tls_errors_co), restarting Tue Oct 26 12:33:00 2010 TCP/UDP: Closing socket Tue Oct 26 12:33:00 2010 SIGUSR1[soft,tls-error] received, process restarting Tue Oct 26 12:33:00 2010 Restart pause, 5 second(s) Tue Oct 26 12:33:05 2010 IMPORTANT: OpenVPN's default port number is now 1194, based on an official port number assignment by IANA. OpenVPN 2.0-beta16 and earlier used 5000 as the default port. Tue Oct 26 12:33:05 2010 Re-using SSL/TLS context Tue Oct 26 12:33:05 2010 LZO compression initialized Tue Oct 26 12:33:05 2010 Control Channel MTU parms [ L:1544 D:168 EF:68 EB:0 ET:0 EL:0 ] Tue Oct 26 12:33:05 2010 Data Channel MTU parms [ L:1544 D:1450 EF:44 EB:135 ET:0 EL:0 AF:3/1 ] Tue Oct 26 12:33:05 2010 Local Options hash (VER=V4): 'ee93268d' Tue Oct 26 12:33:05 2010 Expected Remote Options hash (VER=V4): 'bd577cd1' Tue Oct 26 12:33:05 2010 Attempting to establish TCP connection with 67.228.223.12:3389 Tue Oct 26 12:33:06 2010 TCP connection established with 67.228.223.12:3389 Tue Oct 26 12:33:06 2010 TCPv4_CLIENT link local: [undef] Tue Oct 26 12:33:06 2010 TCPv4_CLIENT link remote: 67.228.223.12:3389 Tue Oct 26 12:33:06 2010 TLS: Initial packet from 67.228.223.12:3389, sid=28f0cb87 69c90cde Tue Oct 26 12:33:06 2010 TLS Error: cannot locate HMAC in incoming packet from 67.228.223.12:3389 Tue Oct 26 12:33:06 2010 Fatal TLS error (check_tls_errors_co), restarting Tue Oct 26 12:33:06 2010 TCP/UDP: Closing socket Tue Oct 26 12:33:06 2010 SIGUSR1[soft,tls-error] received, process restarting Tue Oct 26 12:33:06 2010 Restart pause, 5 second(s) Tue Oct 26 12:33:11 2010 IMPORTANT: OpenVPN's default port number is now 1194, based on an official port number assignment by IANA. OpenVPN 2.0-beta16 and earlier used 5000 as the default port. Tue Oct 26 12:33:11 2010 Re-using SSL/TLS context Tue Oct 26 12:33:11 2010 LZO compression initialized Tue Oct 26 12:33:11 2010 Control Channel MTU parms [ L:1544 D:168 EF:68 EB:0 ET:0 EL:0 ] Tue Oct 26 12:33:11 2010 Data Channel MTU parms [ L:1544 D:1450 EF:44 EB:135 ET:0 EL:0 AF:3/1 ] Tue Oct 26 12:33:11 2010 Local Options hash (VER=V4): 'ee93268d' Tue Oct 26 12:33:11 2010 Expected Remote Options hash (VER=V4): 'bd577cd1' Tue Oct 26 12:33:11 2010 Attempting to establish TCP connection with 67.228.223.12:3389 Tue Oct 26 12:33:11 2010 TCP connection established with 67.228.223.12:3389 Tue Oct 26 12:33:11 2010 TCPv4_CLIENT link local: [undef] Tue Oct 26 12:33:11 2010 TCPv4_CLIENT link remote: 67.228.223.12:3389 Tue Oct 26 12:33:12 2010 TLS: Initial packet from 67.228.223.12:3389, sid=128becf9 f62adf0c Tue Oct 26 12:33:12 2010 TLS Error: cannot locate HMAC in incoming packet from 67.228.223.12:3389 Tue Oct 26 12:33:12 2010 Fatal TLS error (check_tls_errors_co), restarting Tue Oct 26 12:33:12 2010 TCP/UDP: Closing socket Tue Oct 26 12:33:12 2010 SIGUSR1[soft,tls-error] received, process restarting Tue Oct 26 12:33:12 2010 Restart pause, 5 second(s) Tue Oct 26 12:33:17 2010 IMPORTANT: OpenVPN's default port number is now 1194, based on an official port number assignment by IANA. OpenVPN 2.0-beta16 and earlier used 5000 as the default port. Tue Oct 26 12:33:17 2010 Re-using SSL/TLS context Tue Oct 26 12:33:17 2010 LZO compression initialized Tue Oct 26 12:33:17 2010 Control Channel MTU parms [ L:1544 D:168 EF:68 EB:0 ET:0 EL:0 ] Tue Oct 26 12:33:17 2010 Data Channel MTU parms [ L:1544 D:1450 EF:44 EB:135 ET:0 EL:0 AF:3/1 ] Tue Oct 26 12:33:17 2010 Local Options hash (VER=V4): 'ee93268d' Tue Oct 26 12:33:17 2010 Expected Remote Options hash (VER=V4): 'bd577cd1' Tue Oct 26 12:33:17 2010 Attempting to establish TCP connection with 67.228.223.12:3389 Tue Oct 26 12:33:20 2010 TCP/UDP: Closing socket Tue Oct 26 12:33:20 2010 SIGTERM[hard,init_instance] received, process exiting Guys I am extremely sorry for not presenting my error Log properly, please forgive me and give me your valuable advice. I am using windows 7 and I am using openvpn mainly to bypass censorship at UAE. I am using only client config file. Ca.crt file is in config folder Thanks and regards Nitin My error Log with Config1 file Tue Oct 26 21:24:34 2010 OpenVPN 2.0.9 Win32-MinGW [SSL] [LZO] built on Oct 1 2006 Tue Oct 26 21:24:46 2010 IMPORTANT: OpenVPN's default port number is now 1194, based on an official port number assignment by IANA. OpenVPN 2.0-beta16 and earlier used 5000 as the default port. Tue Oct 26 21:24:46 2010 Control Channel Authentication: using 'ta.key' as a OpenVPN static key file Tue Oct 26 21:24:46 2010 Outgoing Control Channel Authentication: Using 160 bit message hash 'SHA1' for HMAC authentication Tue Oct 26 21:24:46 2010 Incoming Control Channel Authentication: Using 160 bit message hash 'SHA1' for HMAC authentication Tue Oct 26 21:24:46 2010 LZO compression initialized Tue Oct 26 21:24:46 2010 Control Channel MTU parms [ L:1544 D:168 EF:68 EB:0 ET:0 EL:0 ] Tue Oct 26 21:24:46 2010 Data Channel MTU parms [ L:1544 D:1450 EF:44 EB:135 ET:0 EL:0 AF:3/1 ] Tue Oct 26 21:24:46 2010 Local Options hash (VER=V4): 'ee93268d' Tue Oct 26 21:24:46 2010 Expected Remote Options hash (VER=V4): 'bd577cd1' Tue Oct 26 21:24:46 2010 Attempting to establish TCP connection with 67.228.223.12:3389 Tue Oct 26 21:24:47 2010 TCP connection established with 67.228.223.12:3389 Tue Oct 26 21:24:47 2010 TCPv4_CLIENT link local: [undef] Tue Oct 26 21:24:47 2010 TCPv4_CLIENT link remote: 67.228.223.12:3389 Tue Oct 26 21:24:47 2010 TLS: Initial packet from 67.228.223.12:3389, sid=4244e662 e5a0572a Tue Oct 26 21:24:47 2010 TLS Error: cannot locate HMAC in incoming packet from 67.228.223.12:3389 Tue Oct 26 21:24:47 2010 Fatal TLS error (check_tls_errors_co), restarting Tue Oct 26 21:24:47 2010 TCP/UDP: Closing socket Tue Oct 26 21:24:47 2010 SIGUSR1[soft,tls-error] received, process restarting client config file: client dev tun proto tcp remote openvpn1.flashvpn.com 3389 float resolv-retry infinite nobind persist-key persist-tun ca ca.crt ns-cert-type server tls-auth ta.key 1 comp-lzo verb 3 mute 20 auth-user-pass route-method exe route-delay 2

    Read the article

  • WordPress > Optimizing a query to show recent posts with a "View All" link when postcount exceeds ma

    - by Scott B
    I have a setting in my theme that allows the site owner to set the maximum number of posts ($maxPosts) to display in a "Recent Posts" menu. I'm using a custom script to generate the recent posts (because the Recent Posts widget does not highlight the current page, which I need for my css). My menu also is set up to display a "View All" link below the post listing, but only if the actual post count is $maxposts I'm trying to work out the best method for getting the post count and comparing it to $maxposts in order to determine whether or not to show a "View All" link. I'm sure there's probably a better way, but here's my code. I'm looking to optimize it to support very large post counts... $cat=get_cat_ID('excludeFromRecentPosts'); $catHidden=get_cat_ID('hidden'); $myquery = new WP_Query(); $myquery->query(array( 'cat' => "-$cat,-$catHidden", 'post_not_in' => get_option('sticky_posts') )); $myrecentpostscount = $myquery->found_posts; if ($myrecentpostscount > 0) { //show the menu if ($myrecentpostscount > $maxPosts) { //show "View All" link } } I really only need to determine if the total post count from the query is greater than the maxPost setting in order to determine whether to show the "View All" link, so I'm wondering if, in the case there are thousands of posts matching the criteria, to avoid performance issues, I don't need to get a count of all of them. I just need to count up until the point of maxPosts + 1, and that's where I'm struggling a bit because the user could elect to make maxPosts = -1 which means they want to show all posts. But this would be impractical, so I would probably set a upper limit of 20...

    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

  • NSXMLParser and Geonames

    - by Xcoder
    I'm trying to parse a call from Geonames with NSXMLParser in the iPhone SDK. I've used this before but for some reason I'm getting an empty dictionary back even though I get results back in a web browser. Can someone please point out what I may be doing wrong. Below is the code I'm using and the results that comes back pasting it in a browser. Thanks in advance #pragma mark - #pragma mark - Parcer Services -(void)beginLoadingFeed{ //[self startLoadingWithMessage:@"Loading Results...."]; NSInvocationOperation *operation = [[NSInvocationOperation alloc] initWithTarget:self selector:@selector(loadFeed) object:nil]; [operationQueue addOperation:operation]; [operation release]; } - (void)loadFeed{ NSString *path = [NSString stringWithFormat:@"http://ws.geonames.org/postalCodeSearch?placename=%@&long&maxRows=20",self.location]; [Logger log:@"Geonames Query: %@",path]; [self parseXMLFileAtURL:path]; [self performSelectorOnMainThread:@selector(didfinishedLoadingFeed) withObject:nil waitUntilDone:YES]; } -(void)didfinishedLoadingFeed{ } - (void)parserDidStartDocument:(NSXMLParser *)parser{ [Logger log:@"found file and started parsing"]; } //Called when the parser runs into an open tag (<tag>) - (void)parser:(NSXMLParser *)parser didStartElement:(NSString *)elementName namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)qName attributes:(NSDictionary *)attributeDict { if ([elementName isEqualToString:@"code"]) { currentResult = [NSMutableDictionary dictionary]; } else { currentElement = [elementName copy]; } } //This is just to resolve random HTML entities - (NSData *)parser:(NSXMLParser *)parser resolveExternalEntityName:(NSString *)entityName systemID:(NSString *)systemID { return [entityName dataUsingEncoding:NSASCIIStringEncoding]; } - (void)parseXMLFileAtURL:(NSString *)URL{ self.results = [[[NSMutableArray alloc] init] autorelease]; NSURL *xmlURL = [NSURL URLWithString:URL]; NSXMLParser *parser = [[NSXMLParser alloc] initWithContentsOfURL:xmlURL]; [parser setDelegate:self]; [parser parse]; [parser autorelease]; } - (void)parser:(NSXMLParser *)parser parseErrorOccurred:(NSError *)parseError { NSString * errorString = [NSString stringWithFormat:@"Unable to connect to web site (Error code %i )", [parseError code]]; [Logger log:@"error parsing : %@", errorString]; [self stopLoadingView]; [self showMessage:@"Error loading content" withTitle:@"Error Loading"]; } /*** Called when the parser runs into a close tag (</tag>). If it is the Result tag that is closing, we should add the currentResult to the array, and then forget about it ***/ - (void)parser:(NSXMLParser *)parser didEndElement:(NSString *)elementName namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)qName { if ([elementName isEqualToString:@"code"]) { [self.results addObject:currentResult]; currentResult = nil; } } - (void)parserDidEndDocument:(NSXMLParser *)parser { [Logger log:@"all done!"]; [Logger log:@"results array has %d items", [self.results count]]; [Logger log:@"Results:%@",results]; [theTableView reloadData]; [self stopLoadingView]; } Below is the result that comes back in a browser using the same call above when doing the search for the term "boston": <?xml version="1.0" encoding="UTF-8" standalone="no"?> <geonames> <totalResultsCount>2808</totalResultsCount> <code> <postalcode>02101</postalcode> <name>Boston</name> <countryCode>US</countryCode> <lat>42.370567</lat> <lng>-71.026964</lng> <adminCode1>MA</adminCode1> <adminName1>Massachusetts</adminName1> <adminCode2>025</adminCode2> <adminName2>Suffolk</adminName2> <adminCode3/> <adminName3/> </code> <code> <postalcode>02108</postalcode> <name>Boston</name> <countryCode>US</countryCode> <lat>42.357603</lat> <lng>-71.068432</lng> <adminCode1>MA</adminCode1> <adminName1>Massachusetts</adminName1> <adminCode2>025</adminCode2> <adminName2>Suffolk</adminName2> <adminCode3/> <adminName3/> </code> <code> <postalcode>02109</postalcode> <name>Boston</name> <countryCode>US</countryCode> <lat>42.360027</lat> <lng>-71.054495</lng> <adminCode1>MA</adminCode1> <adminName1>Massachusetts</adminName1> <adminCode2>025</adminCode2> <adminName2>Suffolk</adminName2> <adminCode3/> <adminName3/> </code> <code> <postalcode>02110</postalcode> <name>Boston</name> <countryCode>US</countryCode> <lat>42.357636</lat> <lng>-71.051417</lng> <adminCode1>MA</adminCode1> <adminName1>Massachusetts</adminName1> <adminCode2>025</adminCode2> <adminName2>Suffolk</adminName2> <adminCode3/> <adminName3/> </code> <code> <postalcode>02111</postalcode> <name>Boston</name> <countryCode>US</countryCode> <lat>42.350348</lat> <lng>-71.0629</lng> <adminCode1>MA</adminCode1> <adminName1>Massachusetts</adminName1> <adminCode2>025</adminCode2> <adminName2>Suffolk</adminName2> <adminCode3/> <adminName3/> </code> <code> <postalcode>02114</postalcode> <name>Boston</name> <countryCode>US</countryCode> <lat>42.361111</lat> <lng>-71.06823</lng> <adminCode1>MA</adminCode1> <adminName1>Massachusetts</adminName1> <adminCode2>025</adminCode2> <adminName2>Suffolk</adminName2> <adminCode3/> <adminName3/> </code> <code> <postalcode>02115</postalcode> <name>Boston</name> <countryCode>US</countryCode> <lat>42.342706</lat> <lng>-71.092215</lng> <adminCode1>MA</adminCode1> <adminName1>Massachusetts</adminName1> <adminCode2>025</adminCode2> <adminName2>Suffolk</adminName2> <adminCode3/> <adminName3/> </code> <code> <postalcode>02116</postalcode> <name>Boston</name> <countryCode>US</countryCode> <lat>42.349201</lat> <lng>-71.076798</lng> <adminCode1>MA</adminCode1> <adminName1>Massachusetts</adminName1> <adminCode2>025</adminCode2> <adminName2>Suffolk</adminName2> <adminCode3/> <adminName3/> </code> <code> <postalcode>02118</postalcode> <name>Boston</name> <countryCode>US</countryCode> <lat>42.336162</lat> <lng>-71.072854</lng> <adminCode1>MA</adminCode1> <adminName1>Massachusetts</adminName1> <adminCode2>025</adminCode2> <adminName2>Suffolk</adminName2> <adminCode3/> <adminName3/> </code> <code> <postalcode>02128</postalcode> <name>Boston</name> <countryCode>US</countryCode> <lat>42.364197</lat> <lng>-71.025694</lng> <adminCode1>MA</adminCode1> <adminName1>Massachusetts</adminName1> <adminCode2>025</adminCode2> <adminName2>Suffolk</adminName2> <adminCode3/> <adminName3/> </code> <code> <postalcode>02199</postalcode> <name>Boston</name> <countryCode>US</countryCode> <lat>42.347873</lat> <lng>-71.082543</lng> <adminCode1>MA</adminCode1> <adminName1>Massachusetts</adminName1> <adminCode2>025</adminCode2> <adminName2>Suffolk</adminName2> <adminCode3/> <adminName3/> </code> <code> <postalcode>02210</postalcode> <name>Boston</name> <countryCode>US</countryCode> <lat>42.348921</lat> <lng>-71.046511</lng> <adminCode1>MA</adminCode1> <adminName1>Massachusetts</adminName1> <adminCode2>025</adminCode2> <adminName2>Suffolk</adminName2> <adminCode3/> <adminName3/> </code> <code> <postalcode>02215</postalcode> <name>Boston</name> <countryCode>US</countryCode> <lat>42.347088</lat> <lng>-71.102689</lng> <adminCode1>MA</adminCode1> <adminName1>Massachusetts</adminName1> <adminCode2>025</adminCode2> <adminName2>Suffolk</adminName2> <adminCode3/> <adminName3/> </code> <code> <postalcode>22713</postalcode> <name>Boston</name> <countryCode>US</countryCode> <lat>38.538241</lat> <lng>-78.142285</lng> <adminCode1>VA</adminCode1> <adminName1>Virginia</adminName1> <adminCode2>047</adminCode2> <adminName2>Culpeper</adminName2> <adminCode3/> <adminName3/> </code> <code> <postalcode>24592</postalcode> <name>South Boston</name> <countryCode>US</countryCode> <lat>36.696335</lat> <lng>-78.918829</lng> <adminCode1>VA</adminCode1> <adminName1>Virginia</adminName1> <adminCode2>083</adminCode2> <adminName2>Halifax</adminName2> <adminCode3/> <adminName3/> </code> <code> <postalcode>02102</postalcode> <name>Boston</name> <countryCode>US</countryCode> <lat>42.338947</lat> <lng>-70.919635</lng> <adminCode1>MA</adminCode1> <adminName1>Massachusetts</adminName1> <adminCode2>025</adminCode2> <adminName2>Suffolk</adminName2> <adminCode3/> <adminName3/> </code> <code> <postalcode>02103</postalcode> <name>Boston</name> <countryCode>US</countryCode> <lat>42.338947</lat> <lng>-70.919635</lng> <adminCode1>MA</adminCode1> <adminName1>Massachusetts</adminName1> <adminCode2>025</adminCode2> <adminName2>Suffolk</adminName2> <adminCode3/> <adminName3/> </code> <code> <postalcode>02104</postalcode> <name>Boston</name> <countryCode>US</countryCode> <lat>42.338947</lat> <lng>-70.919635</lng> <adminCode1>MA</adminCode1> <adminName1>Massachusetts</adminName1> <adminCode2>025</adminCode2> <adminName2>Suffolk</adminName2> <adminCode3/> <adminName3/> </code> <code> <postalcode>02105</postalcode> <name>Boston</name> <countryCode>US</countryCode> <lat>42.338947</lat> <lng>-70.919635</lng> <adminCode1>MA</adminCode1> <adminName1>Massachusetts</adminName1> <adminCode2>025</adminCode2> <adminName2>Suffolk</adminName2> <adminCode3/> <adminName3/> </code> <code> <postalcode>02106</postalcode> <name>Boston</name> <countryCode>US</countryCode> <lat>42.354318</lat> <lng>-71.073449</lng> <adminCode1>MA</adminCode1> <adminName1>Massachusetts</adminName1> <adminCode2>025</adminCode2> <adminName2>Suffolk</adminName2> <adminCode3/> <adminName3/> </code> </geonames>

    Read the article

  • How to send EML data in chuck to Google Apps Mail using Google API ver 2 ?

    - by Preeti
    Hi, I am migrating EML mails to Google Apps. When i try to Migrate a EML file with two attachment 2.1 MB and 1.96 MB. It is throwing exception: "The request was aborted: The request was canceled." I am using below code: MailItemEntry[] entries = new MailItemEntry[1]; String msg = File.ReadAllText(EmlPath); entries[0] = new MailItemEntry(); entries[0].Rfc822Msg = new Rfc822MsgElement(msg); ........ MailItemFeed feed = mailItemService.Batch(domain, UserName, entries); I think sending data can resolve this issue.So,how can send this EML data in chunk to Google Apps? Thanx

    Read the article

  • Implementing ma? osx loop device driver.

    - by Inso Reiges
    Hello, I am aware that there is a native implementation of loop device system on osx, the hdiutil/hdix driver. But due to a number of reasons i need to roll out my own custom loop driver. Since hdix is closed-source can anyone give some starting pointers, links, advises, etc. on the subject? I had expirience implementing loop drivers on linux and windows but i don't really have a clue where to start from on osx. The basic functionality i need to implement is the same: given any file on disk, simulate a virtual block device interface for it. I also would like my loop driver to use all the native partition filter stacking available for real and hdix virtual block devices on osx.

    Read the article

  • Function lfit in numerical recipes, providing a test function

    - by Simon Walker
    Hi I am trying to fit collected data to a polynomial equation and I found the lfit function from Numerical Recipes. I only have access to the second edition, so am using that. I have read about the lfit function and its parameters, one of which is a function pointer, given in the documentation as void (*funcs)(float, float [], int)) with the help The user supplies a routine funcs(x,afunc,ma) that returns the ma basis functions evaluated at x = x in the array afunc[1..ma]. I am struggling to understand how this lfit function works. An example function I found is given below: void fpoly(float x, float p[], int np) /*Fitting routine for a polynomial of degree np-1, with coe?cients in the array p[1..np].*/ { int j; p[1]=1.0; for (j=2;j<=np;j++) p[j]=p[j-1]*x; } When I run through the source code for the lfit function in gdb I can see no reference to the funcs pointer. When I try and fit a simple data set with the function, I get the following error message. Numerical Recipes run-time error... gaussj: Singular Matrix ...now exiting to system... Clearly somehow a matrix is getting defined with all zeroes. I am going to involve this function fitting in a large loop so using another language is not really an option. Hence why I am planning on using C/C++. For reference, the test program is given here: int main() { float x[5] = {0., 0., 1., 2., 3.}; float y[5] = {0., 0., 1.2, 3.9, 7.5}; float sig[5] = {1., 1., 1., 1., 1.}; int ndat = 4; int ma = 4; /* parameters in equation */ float a[5] = {1, 1, 1, 0.1, 1.5}; int ia[5] = {1, 1, 1, 1, 1}; float **covar = matrix(1, ma, 1, ma); float chisq = 0; lfit(x,y,sig,ndat,a,ia,ma,covar,&chisq,fpoly); printf("%f\n", chisq); free_matrix(covar, 1, ma, 1, ma); return 0; } Also confusing the issue, all the Numerical Recipes functions are 1 array-indexed so if anyone has corrections to my array declarations let me know also! Cheers

    Read the article

  • Using a Linq-To-SQL class automagically generates the connection string for me; is there a way to ma

    - by Sergio Tapia
    I'm just beginning to use Linq-to-SQL and it's just wonderful to use. The problem is, this software is going to be run on a lot of machines and each machine will have a unique connection string. Is there a way for me to manually set the connection the Linq-to-SQL (.dbml) uses? The way I'm doing things now is creating the .dbml file, and in the graphic designer I'm dragging tables from the Server Explorer to the white board of the .dbml.

    Read the article

  • Oracle Professional Developer, Ver. 6.0.33 for MS-DOS

    - by Frank Developer
    Hi, I'm trying to install this fossil in DOS 6.22, which is running in Microsoft Virtual PC 2007. I'm hoping that some of you veteran Oracle developers have any recollection of in what order do these diskette images need to be loaded, since I don't have any documentation available for 6.0.33. A friend emailed me the following 720K diskette images: INSTALLE.IMG RDBMS1.IMG RDBMS2.IMG RDBMS3.IMG RSF.IMG SQLLDR1.IMG SQLLDR2.IMG UTIL1.IMG UTIL2.IMG UTIL3.IMG Within Virtual PC, I capture a diskette image, one at a time, into Drive A: VPC's floppy disk emulation supports FAT12, so the supported diskette formats can be: 720K or 1.44MB. If anyone happens to have documentation for this legacy version, I would greatly appreciate a copy of it! Thank You.

    Read the article

  • How can i solve "Captcha required" error in Google Apps API Ver 2 for .NET ?

    - by Preeti
    Hi, I am migrating Contacts to Google Apps. But after migrating around 300 contacts I am getting "Captcha Required" Exception at line : Uri feedUri = new Uri(ContactsQuery.CreateContactsUri(UserName)); ContactEntry createdEntry = (ContactEntry)service.Insert(feedUri, ContactEntry[0]); I am using Ver2 of Google API. How can i solve this issue ? Note : I am not using web application. Thanx

    Read the article

  • Bluetooth not working on an Alienware m14x r2

    - by S. L.
    on my alienware m14x r2 laptop with ubuntu 12.04.1 x64, the bluetooth interface is not working. WLAN works fine. I have a dualboot install with ubuntu & win 7 on this laptop. In win 7, the bluetooth interface works fine, because its all activated in BIOS. I have the killer wireless-n 1202 a/g/n interface with integrated bluetooth 4.0 in this laptop. Here is some code : sudo rfkill list 0: phy0: Wireless LAN Soft blocked: no Hard blocked: no lsusb Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub Bus 001 Device 003: ID 064e:8128 Suyin Corp. Bus 002 Device 003: ID 0cf3:3004 Atheros Communications, Inc. Bus 002 Device 004: ID 187c:0521 Alienware Corporation dmesg | grep "Bluetooth" [ 2.590377] Bluetooth: Core ver 2.16 [ 2.590395] Bluetooth: HCI device and connection manager initialized [ 2.590397] Bluetooth: HCI socket layer initialized [ 2.590399] Bluetooth: L2CAP socket layer initialized [ 2.590403] Bluetooth: SCO socket layer initialized [ 2.591518] Bluetooth: BNEP (Ethernet Emulation) ver 1.3 [ 2.591519] Bluetooth: BNEP filters: protocol multicast [ 2.599411] Bluetooth: RFCOMM TTY layer initialized [ 2.599415] Bluetooth: RFCOMM socket layer initialized [ 2.599416] Bluetooth: RFCOMM ver 1.11 [ 2.696552] Bluetooth: Generic Bluetooth USB driver ver 0.6 [ 2.696751] Bluetooth: Atheros AR30xx firmware driver ver 1.0 [ 2.702607] Bluetooth: Configuration file not found ar3k/ramps_0x11020000_40.dfu [ 2.702609] Bluetooth: Loading sysconfig file failed Any ideas to fix that problem ?

    Read the article

  • Bluetooth light not turned on and bluetooth also not working on vostro 1014

    - by Dinesh Kumar
    after running following command dmesg | grep -i bluetooth [ 17.106250] Bluetooth: Core ver 2.16 [ 17.107845] Bluetooth: HCI device and connection manager initialized [ 17.107847] Bluetooth: HCI socket layer initialized [ 17.107849] Bluetooth: L2CAP socket layer initialized [ 17.107857] Bluetooth: SCO socket layer initialized [ 18.853255] Bluetooth: BNEP (Ethernet Emulation) ver 1.3 [ 18.853260] Bluetooth: BNEP filters: protocol multicast [ 18.859350] Bluetooth: RFCOMM TTY layer initialized [ 18.859355] Bluetooth: RFCOMM socket layer initialized [ 18.859357] Bluetooth: RFCOMM ver 1.11 [14998.338293] init: bluetooth main process ended, respawning

    Read the article

  • 10.6.4 Apple Wiki: New just created users can do nothing?

    - by beefon
    Hello, After update to 10.6.4 there's an issue: any new users that I create in Server Prefs/WGM can't post to their blogs, comment, create wiki pages... They can't do anything! There's log from Wiki errors (when user DURAK tries to create new blog entry): [HTTPChannel,5,127.0.0.1] Traceback (most recent call last): [HTTPChannel,5,127.0.0.1] File "/usr/share/caldavd/lib/python/twisted/web/server.py", line 126, in process self.render(resrc) [HTTPChannel,5,127.0.0.1] File "/usr/share/caldavd/lib/python/twisted/web/server.py", line 133, in render body = resrc.render(self) [HTTPChannel,5,127.0.0.1] File "/usr/share/wikid/lib/python/apple_xmlrpc_server/WebAppServer.py", line 90, in render d = defer.maybeDeferred(function, *args) [HTTPChannel,5,127.0.0.1] File "/usr/share/caldavd/lib/python/twisted/internet/defer.py", line 104, in maybeDeferred result = f(*args, **kw) [HTTPChannel,5,127.0.0.1] --- <exception caught here> --- [HTTPChannel,5,127.0.0.1] File "/usr/share/wikid/lib/python/apple_xmlrpc_server/ContentServiceBase.py", line 121, in xmlrpc_addEntry aPage = ContentEntry.newBundleBasedContentEntry (path = path, content = content, author = author, title = title, uid = uid, type = kind, versioned = self.versioned, templateName = template) [HTTPChannel,5,127.0.0.1] File "/usr/share/wikid/lib/python/apple_wlt/ContentEntry.py", line 794, in newBundleBasedContentEntry aPage.save('First created', 'created') [HTTPChannel,5,127.0.0.1] File "/usr/share/wikid/lib/python/apple_wlt/ContentEntry.py", line 445, in save revisions.addRevision(self.serializeEntry(revisionAttributes), inComment = comment, inAuthor = updateAuthor, inChangeType = editType) [HTTPChannel,5,127.0.0.1] File "/usr/share/wikid/lib/python/apple_utilities/sqlitersion.py", line 36, in _func result = f(self, *args, **kwargs) [HTTPChannel,5,127.0.0.1] File "/usr/share/wikid/lib/python/apple_utilities/sqlitersion.py", line 49, in addRevision contentPlistStr = plistlib.writePlistToString(inContentDict).decode("utf-8") [HTTPChannel,5,127.0.0.1] File "/S-m/Lib-ry/Fr-ks/Python.fr-k/Ver-s/2.6/lib/pyth-2.6/plistlib.py", line 110, in writePlistToString [HTTPChannel,5,127.0.0.1] File "/S-m/Lib-ry/Fr-ks/Python.fr-k/Ver-s/2.6/lib/pyth-2.6/plistlib.py", line 94, in writePlist [HTTPChannel,5,127.0.0.1] File "/S-m/Lib-ry/Fr-ks/Python.fr-k/Ver-s/2.6/lib/pyth-2.6/plistlib.py", line 251, in writeValue [HTTPChannel,5,127.0.0.1] File "/S-m/Lib-ry/Fr-ks/Python.fr-k/Ver-s/2.6/lib/pyth-2.6/plistlib.py", line 280, in writeDict [HTTPChannel,5,127.0.0.1] File "/S-m/Lib-ry/Fr-ks/Python.fr-k/Ver-s/2.6/lib/pyth-2.6/plistlib.py", line 238, in writeValue [HTTPChannel,5,127.0.0.1] File "/S-m/Lib-ry/Fr-ks/Python.fr-k/Ver-s/2.6/lib/pyth-2.6/plistlib.py", line 171, in simpleElement [HTTPChannel,5,127.0.0.1] File "/S-m/Lib-ry/Fr-ks/Python.fr-k/Ver-s/2.6/lib/pyth-2.6/plistlib.py", line 221, in _escapeAndEncode [HTTPChannel,5,127.0.0.1] exceptions.UnicodeDecodeError: 'ascii' codec can't decode byte 0xd0 in position 0: ordinal not in range(128) [HTTPChannel,5,127.0.0.1] 'Unparseable html in page, removing whatever was already written.' [HTTPChannel,5,127.0.0.1] Removing /Library/Collaboration/Users/durak/weblog/27133.page Any "old" user CAN create, modify, comment, etc. What can you recommend to fix this issue? Hope for your help...

    Read the article

  • Objective-C "miscasting" a string/int using stringWithFormat and %d

    - by user141146
    Hi, I think this is a relatively simple question, but I don't precisely know what's happening. I have a method that tries to build a string using NSString's stringWithFormat It looks like this: NSString *line1 = [NSString stringWithFormat:@"the car is %d miles away", self.ma]; In the above line "self.ma" should be an int, but in my case, I made an error and "self.ma" actually points to a NSString. So, I understand that the line should read NSString *line1 = [NSString stringWithFormat:@"the car is %@ miles away", self.ma]; but my question is what is the %d in the first example doing to my NSString? If I use the debugger, I can see that in once case, "self.ma" equals "32444", but somehow the %d converts it to 1255296. I would've guessed that the conversion of 32444 = 1255296 is some type of base-numbering conversion (hex to dec or something), but that doesn't appear to be the case. Any idea as to what %d is doing to my string? TIA

    Read the article

  • GetVersionEx Not Working on Windows 7?!

    - by Andreas Rejbrand
    On my Windows 7 system, the GetVersionEx Windows API function returns "6.0", indicating Windows Vista, when it should return "6.1". If it matters, I used the following Delphi code: function winver: string; var ver: TOSVersionInfo; begin ver.dwOSVersionInfoSize := SizeOf(ver); if GetVersionEx(ver) then with ver do result := IntToStr(dwMajorVersion) + '.' + IntToStr(dwMinorVersion) + '.' + IntToStr(dwBuildNumber) + ' (' + szCSDVersion + ')'; end; and the string "6.0.6002 (Service Pack 2)" was returned. Isn't this highly odd?

    Read the article

  • python raw_input odd behavior with accents containing strings

    - by Ryan
    I'm writing a program that asks the user for input that contains accents. The user input string is tested to see if it matches a string declared in the program. As you can see below, my code is not working: code # -*- coding: utf-8 -*- testList = ['má'] myInput = raw_input('enter something here: ') print myInput, repr(myInput) print testList[0], repr(testList[0]) print myInput in testList output in eclipse with pydev enter something here: má mv° 'm\xe2\x88\x9a\xc2\xb0' má 'm\xc3\xa1' False output in IDLE enter something here: má má u'm\xe1' má 'm\xc3\xa1' Warning (from warnings module): File "/Users/ryanculkin/Desktop/delete.py", line 8 print myInput in testList UnicodeWarning: Unicode equal comparison failed to convert both arguments to Unicode - interpreting them as being unequal False How can I get my code to print True when comparing the two strings? Additionally, I note that the result of running this code on the same input is different depending on whether I use eclipse or IDLE. Why is this? My eventual goal is to put my program on the web; is there anything that I need to be aware of, since the result seems to be so volatile?

    Read the article

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