Search Results

Search found 2509 results on 101 pages for 'converting'.

Page 30/101 | < Previous Page | 26 27 28 29 30 31 32 33 34 35 36 37  | Next Page >

  • An algorithm for converting a base-10 number to a base-N number.

    - by roja
    Guys, I am looking for a way to convert a base-10 number into a base-N number where N can be large. Specifically i am looking at converting to base-85 and back again. Does anyone know a simple algorithm to perform the conversion? Ideally it would provide something like: to_radix(83992, 85) - [11, 53, 12] Any ideas are appreciated! Roja

    Read the article

  • Where does respository resides in after converting CVS repository into SVN using cvs2svn ?

    - by thetna
    I am using cvs2svn for converting already existing CVS repository into svn repository. While doing it using command line , it makes all the passes and creates a repository in the SVN. But i am not able to find all the files in the particular directory. Where does that repository resides? I used following command to convert the CVS to SVN repository. cvs2svn -s /home/user/Subversion/repos /home/usr/cvsrepo

    Read the article

  • Format a money field in SQL without converting to varchar?

    - by sdmadsen
    I need to be able to display a money field as $XX,XXX.XX, but without converting to varchar using total_eval = '$' + CONVERT(varchar(19),total_eval.opvValueMoney,1) My project uses sorting of the information after I pull this to sort the column and it doesn't sort correctly when the column is a varchar. Is there anyway to do this?

    Read the article

  • Has anyone succeeded in converting files to the mpg-format that a Sony Digital Camera can play?

    - by user645552
    I'm trying to play a mpeg movie on my Sony Cybershot digital camera, it's from a DV-camera converted to MPEG1. But sony refuses to play it with File error. The only files sony can play are from my previous Sony camera. The other way around gives no problem, the movies the camera takes play on various software media players. Has anyone succeeded in converting files to the mpg-format that a Sony Digital Camera can play?

    Read the article

  • Syntax error converting the nvarchar value to a column of data type int.

    - by Phil
    I have 1,2,3,4,5,6,7,8,9 stored as nvarchar inside Level in my db. I then have a dropdownlist with values 1,2,3,4,5,6,7,8,9. When a user makes a selection (i.e 1) (Level.SelectedValue.ToString). This builds an sql query via a param like this: "Select things From MBA_EOI Where level = 1" When I run the select I get the following error: Syntax error converting the nvarchar value '1,2,3,4,5,6,7,8,9' to a column of data type int. I was under the impression that I was dealing with an Nvarchar field and the selected value as string, where does the int conversion come in? p.s I have also tried Level.SelectedItem.ToString

    Read the article

  • Converting "fr_FR" into "French (France)" in both directions. (Objective-C iPhone)

    - by Janice
    I can easily change a short region-code (en_US) into a longer string... but it there an easy way to also move in the other direction? [displayInEnglish displayNameForKey:NSLocaleIdentifier value:regionCountryCode]; "en_US" becomes "English (United States)". "English (United States)" becomes "en_US". I currently store the short region-code in a database.... but when I show some aggregate results... I need to display the longer strings to the user. Or should I just store the longer strings right in the database... and not even worry about "converting" them later? I'm trying to show a "dollars total" for each country. If you were a user... which would you more likely wish to see (for a currency-total list)? A "French" total A "France" total A "French (France)" total A "fr_Fr" total?

    Read the article

  • Fastest way of converting a quad to a triangle strip?

    - by Tina Brooks
    What is the fastest way of converting a quadrilateral (made up of foyr x,y points) to a triangle strip? I'm well aware of the general triangulation algorithms that exist, but I need a short, well optimized algorithm that deals with quadrilaterals only. My current algorithm does this, which works for most quads but still gets the points mixed up for some: #define fp(f) bounds.p##f /* Sort four points in ascending order by their Y values */ point_sort4_y(&fp(1), &fp(2), &fp(3), &fp(4)); /* Bottom two */ if (fminf(-fp(1).x, -fp(2).x) == -fp(2).x) { out_quad.p1 = fp(2); out_quad.p2 = fp(1); } else { out_quad.p1 = fp(1); out_quad.p2 = fp(2); } /* Top two */ if (fminf(-fp(3).x, -fp(4).x) == -fp(3).x) { out_quad.p3 = fp(3); out_quad.p4 = fp(4); } else { out_quad.p3 = fp(4); out_quad.p4 = fp(3); }

    Read the article

  • How do I prevent buffer overflow converting a double to char?

    - by Tommy
    I'm converting a double to a char string: char txt[10]; double num; num = 45.344322345 sprintf(txt, "%.1f", num); and using ".1f" to truncate the decimal places, to the tenths digit. i.e. - txt contains 45.3 I usually use precision in sprintf to ensure the char buffer is not overflowed. How can I do that here also truncating the decimal, without using snprintf? (i.e. if num = 345694876345.3 for some reason) Thanks

    Read the article

  • Converting table based layout into a div/css based one.

    - by nimo9367
    I'm supposed to rewrite the UI for a rather large web application. The thing is that the layout is completely based on tables and if I could somehow, semi automatically, convert the tables into divs it would save me a huge amount of time. What are the best practices when doing something like this? Is this a good idea at all? The application use layout files (containing something similar to helpers) that are parsed into html at runtime and the application itself also output html at specific places. So the work will consist of converting these helpers and the htmloutput code within the application.

    Read the article

  • What is the best way for converting phone numbers into international format (E.164) using Java?

    - by Vihung
    What is the best way for converting phone numbers into international format (E.164) using Java? Given a 'phone number' and a country id (let's say an ISO country code), I would like to convert it into a standard E.164 international format phone number. I am sure I can do it by hand quite easily - but I would not be sure it would work correctly in all situations. Which Java framework/library/utility would you recommend to accomplish this? P.S. The 'phone number' could be anything identifiable by the general public - such as * (510) 786-0404 * 1-800-GOT-MILK * +44-(0)800-7310658 that last one is my favourite - it is how some people write their number in the UK and means that you should either use the +44 or you should use the 0. The E.164 format number should be all numeric, and use the full international country code (e.g.+44)

    Read the article

  • Conversion failed when converting datetime from character string. Linq To SQL & OpenXML

    - by chobo2
    Hi I been following this tutorial on how to do a linq to sql batch insert. http://www.codeproject.com/KB/linq/BulkOperations_LinqToSQL.aspx However I have a datetime field in my database and I keep getting this error. System.Data.SqlClient.SqlException was unhandled Message="Conversion failed when converting datetime from character string." Source=".Net SqlClient Data Provider" ErrorCode=-2146232060 Class=16 LineNumber=7 Number=241 Procedure="spTEST_InsertXMLTEST_TEST" Server="" State=1 StackTrace: at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) I am not sure why when I just take the datetime in the generated xml file and manually copy it into sql server 2005 it has no problem with it and converts it just fine. This is my SP CREATE PROCEDURE [dbo].[spTEST_InsertXMLTEST_TEST](@UpdatedProdData nText) AS DECLARE @hDoc int exec sp_xml_preparedocument @hDoc OUTPUT,@UpdatedProdData INSERT INTO UserTable(CreateDate) SELECT XMLProdTable.CreateDate FROM OPENXML(@hDoc, 'ArrayOfUserTable/UserTable', 2) WITH ( CreateDate datetime ) XMLProdTable EXEC sp_xml_removedocument @hDoc C# code using (TestDataContext db = new TestDataContext()) { UserTable[] testRecords = new UserTable[1]; for (int count = 0; count < 1; count++) { UserTable testRecord = new UserTable() { CreateDate = DateTime.Now }; testRecords[count] = testRecord; } StringBuilder sBuilder = new StringBuilder(); System.IO.StringWriter sWriter = new System.IO.StringWriter(sBuilder); XmlSerializer serializer = new XmlSerializer(typeof(UserTable[])); serializer.Serialize(sWriter, testRecords); db.spTEST_InsertXMLTEST_TEST(sBuilder.ToString()); } Rendered XML Doc <?xml version="1.0" encoding="utf-16"?> <ArrayOfUserTable xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <UserTable> <CreateDate>2010-05-19T19:35:54.9339251-07:00</CreateDate> </UserTable> </ArrayOfUserTable>

    Read the article

  • Converting timestamp to time ago in php e.g 1 day ago, 2 days ago...

    - by cosmicbdog
    hi everyone, i am trying to convert a timestamp of the format: 2009-09-12 20:57:19 and turn it into something like '3 minutes ago' with php. I found a useful script to do this, but I think its looking for a different format to be used as the time variable. The script I'm wanting to modify to work with this format is: function _ago($tm,$rcs = 0) { $cur_tm = time(); $dif = $cur_tm-$tm; $pds = array('second','minute','hour','day','week','month','year','decade'); $lngh = array(1,60,3600,86400,604800,2630880,31570560,315705600); for($v = sizeof($lngh)-1; ($v >= 0)&&(($no = $dif/$lngh[$v])<=1); $v--); if($v < 0) $v = 0; $_tm = $cur_tm-($dif%$lngh[$v]); $no = floor($no); if($no <> 1) $pds[$v] .='s'; $x=sprintf("%d %s ",$no,$pds[$v]); if(($rcs == 1)&&($v >= 1)&&(($cur_tm-$_tm) > 0)) $x .= time_ago($_tm); return $x; } I think on those first few lines its trying to do something that looks like this (different date format math): $dif = 1252809479 - 2009-09-12 20:57:19; How would I go about converting my timestamp into that (unix?) format?

    Read the article

  • 'The RPC server is unavailable' when converting a physical ISA/Forefront TMG machine to virtual (P2V) in SCVMM

    - by Goran B.
    When I try to convert a physical ISA/TMG machine to virtual using SCVMM, i keep getting an error in the Collect machine configuration step ('Scan Now' button): VMM is unable to complete the request. The connection to the agent MACHINE_NAME was lost. Ensure that the computer MACHINE_NAME exists on the network, WMI service and the agent are installed and running and that a firewall is not blocking HTTP and WMI traffic. ID: 3157 Details: The RPC server is unavailable (0x800706BA) Firewall rules allow for RPC traffic from the SCVMM machine to ISA/TMG machine.

    Read the article

  • Alignment requirements: converting basic disk to dynamic disk in order to set up software RAID?

    - by 0xC0000022L
    On Windows 7 x64 Professional I am struggling to convert a basic disk to a dynamic one. Under Disk Management in the MMC the conversion is supposed to be initiated automatically, but it doesn't. My guess: because of using third-party partitioning tools there isn't enough space in front and after the partitions (system-reserved/boot + system volume) to store the required meta-data. When demoting a dynamic disk to a basic disk manually, I noticed that some space seems to be required before and after the partitions. What are the exact alignment requirements that allow the on-board tools in Windows to do the conversion?

    Read the article

  • Converting encoding of multiple files with iconv (Mac OS)?

    - by Ilya Birman
    I need to convert a whole bunch of files from Windows-1251 to UTF-8. After doing 10 of them by hand in BBEdit, I got bored ;-) I found out that there is an iconv CL tool. I tried this: iconv -f WINDOWS-1251 -t UTF-8 inputfile However it seems that iconv just outputs the converted text instead of writing it to file. Also, there is no outputfile parameter for it. How do I write the changes back to original files? Thanks. Edit: Please note, that inputfile value is actually *.txt, so the solution has to work with that.

    Read the article

  • Can I temporarily leave other roles active when converting a 2008 R2 server to a hyper-v host?

    - by Eric
    I currently have a Windows 2008 R2 box that I want to convert to a hyper-v host. Currently I have the following running on it: File Services, Web Server (IIS), and Sql Server 2008 R2 with a few different DBs. In the long term, I'd like to move all of those over to the VMs that will be created. However, in the short term I'd like to leave them running on the server. Are there any complications/problems with leaving them running on the hyper-v server for a day or two? How long will those services typically go down during the addition of the hyper-v role? Right now my plan is to back up everything, enable the hyper-v role, set up VMs, and migrate stuff off of the host. However, if there is a good probability that something may cease to function I might need to migrate everything over to a temporary host before doing the conversion.

    Read the article

  • ffmpeg: converting an avi to a reduced, shareable flv/mp4...

    - by meder
    I recently followed a guide and recompiled my ffmpeg so x264 is enabled. I used some generic settings to convert my 700 MB avi file to a mp4 file, the result was a 407MB mp4 file. The original avi file's settings: Codec: DX50 Resolution: 704x304 Frame rate: 23.976023 Stream 1 Codec: mpga Type: Audio Channels: 2 Sample rate: 48000 Hz Bitrate 179 kb/s Command I used: ffmpeg -i input.avi -acodec libfaac -ab 128k -ac 2 -vcodec libx264 -vpre hq -crf 22 -threads 0 output.mp4 The settings of the output file (output.mp4): Codec: avc1 Resolution: 704x304 Display resolution: 704x304 Frame rate: 11.988011 Stream 1 Codec: mp4a Type: Audio Channels: 2 Sample Rate: 48000 Hz Bits per sample: 16 Bitrate: 1536 kb/s The quality of the output mp4 is pretty nice, it seems as if it's pretty much the same as the original source. However, I'm trying to reduce the filesize and I'm not really sure whether I should go with an flv format or keep it mp4. The advantage the flv would have obviously is that it would be playable with a flash player ( I have come across some swf players which take a flash parameter to play an flv file ).. but maybe I could use the video element, as I'm only going to be displaying this video privately so I don't have to worry about supporting legacy browsers such as IE. Can someone recommend some settings to specify in order for the filesize to be around ~100-150MB or so? I don't mind a reduction in quality, nor do I mind resizing it - I was going to do it initially but I wasn't sure what the guidelines were ( if any ) for dealing with resolution.. since this video's is 704x304 would it still be ok if I forced it into one that isn't perfectly fit for the aspect ratio? I have no clue about that part. I realize that I could have probably specified 28 instead of 22 for the CRF, I'm not sure if I should do that as opposed to maybe specifying smaller resolution, which might make it smaller as well?

    Read the article

  • How can I compare Excel serial dates WITHOUT converting to mm/dd/yy type dates?

    - by dwwilson66
    I have a table that contains a number of values representing Excel serial dates. After a number of unsuccessful attempts to compare fields, my current approach is to do comparisons between serial dates instead of calendar dates. I am trying to summarize the data--by DAY--with formulae. CONSIDER: 41021 some data 41021.625 some data 41021.63542 some data 41022 some data 41022.26042 some data 41022.91667 some data 41023 some data 41023.375 some data DESIRED RESULT: 41021 sum of 41021, 41021.625 and 41021.63542 data 41022 sum of 41022, 41022.26042 and 41022.91667 data 41023 sum of 41023 and 41023.375 data In essence, for all instances of SerialDate.SerialTime, SUM data values associated with SerialDate.* regardless of the *.SerialTime for that date. While I can see how to do this by creating additional dates column formatted as =TEXT(<DateField>,"mm/dd/yyyy") I'm looking for a solution that will allow me to handle this 'conversion' in the formula, e.g.SUMIF((TEXT(<dateRange>,"yy/mm/dd"),=(TEXT(<dateField,"yy/mm/dd")),<dataRange> Make sense? Anyone have any ideas? Thanks

    Read the article

< Previous Page | 26 27 28 29 30 31 32 33 34 35 36 37  | Next Page >