Search Results

Search found 9132 results on 366 pages for 'convert'.

Page 23/366 | < Previous Page | 19 20 21 22 23 24 25 26 27 28 29 30  | Next Page >

  • After Effects: Mac to PC

    - by Tom
    Is it possible to open an After Effects file that's been created on a Mac with PC? I don't know what version the AE was on the Mac side, but I want to oepn it with CS3 on a PC laptop.

    Read the article

  • InvalidCastException in DataGridView

    - by Max Yaffe
    (Using VS 2010 Beta 2 - .Net 4.0 B2 Rel) I have a class, MyTable, derived from BindingList where S is a struct. S is made up of several other structs, for example: public class MyTable<S>:BindingList<S> where S: struct { ... } public struct MyStruct { public MyReal r1; public MyReal r2; public MyReal R1 {get{...} set{...}} public MyReal R2 {get{...} set{...}} ... } public struct MyReal { private Double d; private void InitFromString(string) {this.d = ...;} public MyReal(Double d) { this.d = d;} public MyReal(string val) { this.d = default(Double); InitFromString(val);} public override string ToString() { return this.real.ToString();} public static explicit operator MyReal(string s) { return new MyReal(s);} public static implicit operator String(MyReal r) { return r.ToString();} ... } OK, I use the MyTable as a binding source for a DataGridView. I can load the data grid easily using InitFromString on individual fields in MyStruct. The problem comes when I try to edit a value in a cell of the DataGridView. Going to the first row, first column, I change the value of the existing number. It gives an exception blizzard, the first line of which says: System.FormatException: Invalid cast from 'System.String' to 'MyReal' I've looked at the casting discussions and reference books but don't see any obvious problems. Any ideas?

    Read the article

  • Why Java SimpleDateFormat().parse() is printing weird formate?

    - by MAK
    My input is String formated as the following: 3/4/2010 10:40:01 AM 3/4/2010 10:38:31 AM My code is: DateFormat dateFormat = new SimpleDateFormat("dd/mm/yyyy hh:mm:ss aa"); try { Date today = dateFormat.parse(time); System.out.println("Date Time : " + today); } catch (ParseException e) { e.printStackTrace(); } the output is: Sun Jan 03 10:38:31 AST 2010 Sun Jan 03 10:40:01 AST 2010 I'm not sure from where the day (Sun) came from? or (AST)? and why the date is wrong? I just wanted to keep the same format of the original String date and make it into a Date object. I'm using Netbeans 6.8 Mac version.

    Read the article

  • High-quality PDF to Word conversion in PHP?

    - by cletus
    What's the best way of converting PDF docs to Microsoft Word format in PHP? This can be either as a PHP script or calling a (Linux) executable (with proc_open()). It just needs to be relatively fast and produce quality Word documents (in 97/2000/2003 format). Commercial software is OK.

    Read the article

  • GUID to ByteArray

    - by DutrowLLC
    I just wrote this code to turn a GUID into a byte array. Can anyone shoot any holes in it or suggest something better? public static byte[] getGuidAsByteArray(){ UUID uuid = UUID.randomUUID(); long longOne = uuid.getMostSignificantBits(); long longTwo = uuid.getLeastSignificantBits(); return new byte[] { (byte)(longOne >>> 56), (byte)(longOne >>> 48), (byte)(longOne >>> 40), (byte)(longOne >>> 32), (byte)(longOne >>> 24), (byte)(longOne >>> 16), (byte)(longOne >>> 8), (byte) longOne, (byte)(longTwo >>> 56), (byte)(longTwo >>> 48), (byte)(longTwo >>> 40), (byte)(longTwo >>> 32), (byte)(longTwo >>> 24), (byte)(longTwo >>> 16), (byte)(longTwo >>> 8), (byte) longTwo }; }

    Read the article

  • Why Java SimpleDateFormat().parse() is giving weird formate?

    - by MAK
    My input is String formated as the following: 3/4/2010 10:40:01 AM 3/4/2010 10:38:31 AM My code is: DateFormat dateFormat = new SimpleDateFormat("dd/mm/yyyy hh:mm:ss aa"); try { Date today = dateFormat.parse(time); System.out.println("Date Time : " + today); } catch (ParseException e) { e.printStackTrace(); } the output is: Sun Jan 03 10:38:31 AST 2010 Sun Jan 03 10:40:01 AST 2010 I'm not sure from where the day (Sun) came from? or (AST)? and why the date is wrong? I just wanted to keep the same format of the original String date and make it into a Date object. I'm using Netbeans 6.8 Mac version.

    Read the article

  • Saving page as PDF or as HTML but with all entries

    - by Fincha
    Hello every one :) I wont to create a pdf from a form on my page, but the Problem is, I need it excactly like the page with form, all entires. So I have for example 2 Input Fields, 7 Radio, 2 Checkboxes, and as result i need a PDF with the same sructure, but if someone check the checkbox, it must be saved in pdf. I have tryed to save the html content of the page on submit, and save it first in html file, but the problem is, my selections woundn't be saved. The result must have the same as i would print my form. I hope someone can help. PS: I using PHP and jQuery

    Read the article

  • Reading a Windows 'binary' float into a ASP jscript variable

    - by user89691
    I need to read files produced by a legacy Windows app that stores real numbers (the 8-byte "double" type) in binary - i.e. as a packed array of 8 bytes. I can read the 8 byte group OK but how can I present it to my ASP JScript code such I can get the real number back again. Or to put it another way: Say a file was produced by a Windows (Delphi) program: Assign (f, 'test.bin') ; rewrite (f, 1) ; r := 1234.56E78 ; BlockWrite (f, r, SizeOf (Double)) ; Close (f) ; Inspection of the file will show it contains 8 bytes, being: 94 0E 4C CA C2 97 AD 53 which is the real number in IEEE format. Assuming I can read these 8 bytes back in ASP, is there a simple way of getting the real number back again?

    Read the article

  • Relative to absolute paths in HTML (asp.net)

    - by Jo Asakura
    Hello all, I need to create a newsletters by URL. I to do next: Create a WebClient; Use WebClient's method DownloadData to get a source of page in byte array; Get string from source-html byte array and set it to the newsletter content. But I have some troubles with paths. All elements' sources were relative (/img/welcome.png) but I need absolute (http://www.mysite.com/img/welcome.png). How can I do this? Best regards, Alex.

    Read the article

  • Making a DVD video with a still image and PCM 16bit audio with ffmpeg

    - by João
    I'm trying to make a small video with a still image and a sound file playing in the background to pass it to dvdauthor and create a DVD. The command I'm using is this: ffmpeg -loop_input -i image.jpg -qscale 2 -i song.flac -aspect 4:3 -target pal-dvd -acodec pcm_s16le -shortest output.mpg However, the resulting video file doesn't have sound at all (testing it on VLC Player). I don't know if I can't combine "-acodec pcm_s16le" with "-target pal-dvd" to override the later, or if there is something else wrong with the command. If I try without the "-acodec pcm_s16le" parameter the video and audio works, I can even create a DVD ISO with it. However, the audio stays as AC3. I wanted to include with the video the lossless audio, not a compressed one. I suppose the DVD standart allows to have PCM audio in it, am I right?

    Read the article

  • Opencv: Converting hue image to RGB image

    - by jhaip
    I am trying to show the hue component of the image from my webcam. I have split apart the image into the hue component but I can't figure out how to show the hue component as the pure colors. For example if one pixel of the image was B=189 G=60 R=60 then in HSV, H=0. I don't want the draw image to be the the gray values of hue but the RGB equivalent of the hue or H=0 - B=0 G=0 R=255 IplImage *image, *imageHSV, *imageHue; image = cvQueryFrame(capture); //image from webcam imageHSV = cvCreateImage( cvGetSize(image), IPL_DEPTH_8U, 3 ); imageHue = cvCreateImage( cvGetSize(image), IPL_DEPTH_8U, 1 ); cvCvtColor( image, imageHSV, CV_BGR2HSV ); cvSplit( imageHSV, imageHue, 0, 0, 0 ); I have a feeling there is a simple solution so any help is appreciated.

    Read the article

  • change prototype script to jquery one

    - by steve
    I have this form submit code: Event.observe(window, 'load', init, false); function init() { Event.observe('addressForm', 'submit', storeAddress); } function storeAddress(e) { $('response').innerHTML = 'Adding email address...'; var pars = 'address=' + escape($F('address')); var myAjax = new Ajax.Updater('response', 'ajaxServer.php', {method: 'get', parameters: pars}); Event.stop(e); } How can I change it to work with jQuery? Here is the html form: <form id="addressForm" action="index.php" method="get"> <b>Email:</b> <input type="text" name="address" id="address" size="25"><br> <input name="Submit" value="Submit" type="submit" /> <p id="response"><?php echo(storeAddress()); ?></p> </form> and this is php code at start of document: <?php require_once("inc/storeAddress.php"); ?>

    Read the article

  • How to go about converting this classic asp to asp.net

    - by Phil
    I have some classic asp code that needs converting to asp.net. So far I have tried to achieve this using datareaders and repeaters and had no luck as the menu loops through 4 different record sets, passing along the menuNid before moving to the next record. Please can you tell me what method you would use to conver this code... i.e datareaders? dataset? etc? Thanks <% set RSMenuLevel0 = conn.execute("select id, DepartmentID, GroupingID, Heading, OrderID, Publish, moduleid, url, urltarget " &_ "from T where (DepartmentID = 0 and GroupingID = 0 and Publish <> 0) order by OrderID") %> <% if session("JavaScriptEnabled") = "False" Then %> <% while not RSMenuLevel0.EOF if RSMenuLevel0("Publish") <> 0 then Menu0heading = RSMenuLevel0("Heading") Menu0id = RSMenuLevel0("id") %> <%if RSMenuLevel0("url") > "" and RSMenuLevel0("moduleid") = 0 then%> &nbsp;<a href="http://<%=RSMenuLevel0("url")%>" target="<%=RSMenuLevel0("urltarget")%>"><%=Menu0heading%></a> <%else%> &nbsp;<a href="/default.asp?id=<%=Menu0id%>"><%=Menu0heading%></a> <%end if%> <% end if RSMenuLevel0.MoveNext wend %> <% else %> <ul id="Menu1" class="MM"> <%if home <> 1 then%> <!-- <li><a href="/default.asp"><span class="item">Home</span></a> --> <%end if%> <% numone=0 while not RSMenuLevel0.EOF ' numone = numone + 1 Menu0heading = RSMenuLevel0("Heading") 'itemID = lcase(replace(Menu0heading," ","")) Menu0id = RSMenuLevel0("id") if RSMenuLevel0("url") > "" and RSMenuLevel0("moduleid") = 0 then url = RSMenuLevel0("url") if instr(url,"file:///") > 0 then %> <li><a href="<%=RSMenuLevel0("url")%>" target="<%=RSMenuLevel0("urltarget")%>" <%if numone=1 then%>class="CURRENT"<%end if%>><span class="item"><%=Menu0heading%></span></a> <%else%> <li><a href="http://<%=RSMenuLevel0("url")%>" target="<%=RSMenuLevel0("urltarget")%>" <%if numone=1 then%>class="CURRENT"<%end if%>><span class="item"><%=Menu0heading%></span></a> <%end if%> <%else%> <li><a href="/default.asp?id=<%=RSMenuLevel0("id")%>" <%if numone=1 then%>class="CURRENT"<%end if%>><span class="item"><%=Menu0heading%></span></a> <%end if%> <% set RSMenuLevel1 = conn.execute("select id, DepartmentID, GroupingID, Heading, OrderID, Publish, moduleid, url, urltarget " &_ "from T where (DepartmentID = 0 and GroupingID = " & Menu0id & " and Publish <> 0) order by OrderID") if not RSMenuLevel1.EOF then %> <ul> <% while not RSMenuLevel1.EOF Menu1heading = RSMenuLevel1("Heading") Menu1id = RSMenuLevel1("id") if RSMenuLevel1("url") > "" and RSMenuLevel1("moduleid") = 0 then url = RSMenuLevel1("url") if instr(url,"file:///") > 0 then %> <li><a href="<%=RSMenuLevel1("url")%>" target="<%=RSMenuLevel1("urltarget")%>"><%=Menu1heading%></a> <%else%> <li><a href="http://<%=RSMenuLevel1("url")%>" target="<%=RSMenuLevel1("urltarget")%>"><%=Menu1heading%></a> <%end if%> <%else%> <li><a href="/default.asp?id=<%=RSMenuLevel1("id")%>"><%=Menu1heading%></a> <%end if%> <% set RSMenuLevel2 = conn.execute("select id, DepartmentID, GroupingID, Heading, OrderID, Publish, moduleid, url, urltarget " &_ "from T where (DepartmentID = 0 and GroupingID = " & Menu1id & " and Publish <> 0) order by OrderID") if not RSMenuLevel2.EOF then %> <ul> <% while not RSMenuLevel2.EOF Menu2heading = RSMenuLevel2("Heading") Menu2id = RSMenuLevel2("id") if RSMenuLevel2("url") > "" and RSMenuLevel2("moduleid") = 0 then %> <li><a href="http://<%=RSMenuLevel2("url")%>" target="<%=RSMenuLevel2("urltarget")%>"><%=Menu2heading%></a> <%else%> <li><a href="/default.asp?id=<%=RSMenuLevel2("id")%>"><%=Menu2heading%></a> <%end if%> <% set RSMenuLevel3 = conn.execute("select id, DepartmentID, GroupingID, Heading, OrderID, Publish, moduleid, url, urltarget " &_ "from T where (DepartmentID = 0 and GroupingID = " & Menu2id & " and Publish <> 0) order by OrderID") if not RSMenuLevel3.EOF then %> <ul> <% while not RSMenuLevel3.EOF Menu3heading = RSMenuLevel3("Heading") Menu3id = RSMenuLevel3("id") if RSMenuLevel3("url") > "" and RSMenuLevel3("moduleid") = 0 then %> <li><a href="http://<%=RSMenuLevel3("url")%>" target="<%=RSMenuLevel3("urltarget")%>"><%=Menu3heading%></a></li> <%else%> <li><a href="/default.asp?id=<%=RSMenuLevel3("id")%>"><%=Menu3heading%></a></li> <%end if%> <% RSMenuLevel3.MoveNext wend %> </ul> <% end if RSMenuLevel2.MoveNext %> </li> <% wend %> </ul> <% end if RSMenuLevel1.MoveNext %> </li> <% wend %> </ul> <% end if RSMenuLevel0.MoveNext %> </li> <% wend %> </ul> <% end if %>

    Read the article

  • String of KML needs to be converted to java objects

    - by spartikus
    I have a string of kml coming in on a request object. I have used xjc to create the kml java objects. I am looking for an easy way to create the kml nested java objects from this string. I could parse the string and create each object in the tree by hand but wouldn't it be cool if there was a library or something that would create the java objects for me? Something like KmlType type = parseKML(mykmlStringFromTheRequest); Then type would be a Tree of kml objects. Thanks for the help all.

    Read the article

  • convert a logical partition to a primary partition

    - by ant2009
    Hello, Fedora 14 xfce I have the following partition setup. I would like to know how can I convert the logical partition sda6 to a primary partition. Disk /dev/sda: 320.1 GB, 320072933376 bytes 255 heads, 63 sectors/track, 38913 cylinders, total 625142448 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x1707a8a5 Device Boot Start End Blocks Id System /dev/sda1 2048 1026047 512000 83 Linux /dev/sda2 1026048 205844479 102409216 83 Linux /dev/sda3 205844480 214228991 4192256 82 Linux swap / Solaris /dev/sda4 214228992 625141759 205456384 5 Extended /dev/sda5 214231040 573562879 179665920 83 Linux /dev/sda6 573564928 625141759 25788416 7 HPFS/NTFS Filesystem Size Used Avail Use% Mounted on /dev/sda2 97G 5.0G 91G 6% / tmpfs 494M 176K 494M 1% /dev/shm /dev/sda1 485M 68M 392M 15% /boot /dev/sda5 169G 26G 135G 16% /home # partition table of /dev/sda unit: sectors /dev/sda1 : start= 2048, size= 1024000, Id=83 /dev/sda2 : start= 1026048, size=204818432, Id=83 /dev/sda3 : start=205844480, size= 8384512, Id=82 /dev/sda4 : start=214228992, size=410912768, Id= 5 /dev/sda5 : start=214231040, size=359331840, Id=83 /dev/sda6 : start=573564928, size= 51576832, Id= 7 I would like to convert sda6 to a primary partition, the reason for this it to install windows 7 starter. Many thanks for any suggestions,

    Read the article

  • C# cast string to enum with enum attribute

    - by rubentjeuh
    Hello, i've got the following question: I've got public enum Als { [StringValue("Beantwoord")] Beantwoord = 0, [StringValue("Niet beantwoord")] NietBeantwoord = 1, [StringValue("Geselecteerd")] Geselecteerd = 2, [StringValue("Niet geselecteerd")] NietGeselecteerd = 3, } with public class StringValueAttribute : System.Attribute { private string _value; public StringValueAttribute(string value) { _value = value; } public string Value { get { return _value; } } } And i would like to put the value from the item I selected of a combobox into a int: int i = ((int)(Als)Enum.Parse(typeof(Als), (string)cboAls.SelectedValue)); //<- WRONG Is this possible, and if so, how? (the stringvalue matches the value selected from the combobox) Thanks

    Read the article

  • Setting pixel color of BMP/JPG file in C#.

    - by Jamie
    Hi guys, I'm trying to set a color of given pixel of the image. Here is the code snippet Bitmap myBitmap = new Bitmap(@"c:\file.bmp"); for (int Xcount = 0; Xcount < myBitmap.Width; Xcount++) { for (int Ycount = 0; Ycount < myBitmap.Height; Ycount++) { myBitmap.SetPixel(Xcount, Ycount, Color.Black); } } Every time I get the following exception: Unhandled Exception: System.InvalidOperationException: SetPixel is not supported for images with indexed pixel formats. The exception is thrown both for bmp and jpg files. I have no idea what is wrong. Thank you in advance for the reply! Cheers.

    Read the article

  • icon as an image

    - by Ken
    Hi All, is it possible to use icon file as a image for a button in visual basic? f.e. I have 3 buttons that need to have 3 icons when you click the button the icon of the button needs to be the icon of the form is this posible? btnIcon1 = my.resources.ICO1 btnIcon2 = my.resources.ICO2

    Read the article

  • How to convert Markdown files to Dokuwiki, on a PC

    - by Clare Macrae
    I'm looking for a tool or script to convert Markdown files to Dokuwiki format, that will run on a PC. This is so that I can use MarkdownPad on a PC to create initial drafts of documents, and then convert them to Dokuwiki format, to upload to a Dokuwiki installation that I have no control over. (This means that the Markdown plugin is no use to me.) I could spend time writing a Python script to do the conversion myself, but I'd like to avoid spending time on this, if such a thing exists already. The Markdown tags I'd like to have supported/converted are: Heading levels 1 - 5 Bold, italic, underline, fixed width font Numbered and unnumbered lists Hyperlinks Horizontal rules Does such a tool exist, or is there a good starting point available? Things I've found and considered I initially thought that txt2tags would be helpful, but although it can write both markdown and Dokuwiki, it is very tied to its own specific input format I've also seen Markdown2Dokuwiki, and although I'd certainly be willing to use a sed script, even on a PC, this only supports a tiny, tiny part of Markdown's syntax. python-markdown2 also sounded promising, but it only writes out HTML. pandoc - but it doesn't support Dokuwiki output MultiMarkdown - does not appear to support Dokuwiki output

    Read the article

  • Is there any way to modify a column before it is ordered in MySQL?

    - by George Edison
    I have a table with a field value which is a varchar(255). The contents of the field can be quite varied: $1.20 $2994 $56 + tax (This one can be ignored or truncated to $56 if necessary) I have a query constructed: SELECT value FROM unnamed_table ORDER BY value However, this of course uses ASCII string comparison to order the results and does not use any numerical type of comparison. Is there a way to truly order by value without changing the field type to DECIMAL or something else? In other words, can the value field be modified ('$' removed, value converted to decimal) on the fly before the results are sorted?

    Read the article

  • XML to PDF best approach?

    - by MMAmail.com
    I have some xml files which are used to generate my webpages, however I need to be able to allow the user to select a number of pages then combine them into one PDF. This pdf needs to have different styling to the actual web page.(the content is kept in xml files ;) p.s. the pdf must have table of contents... and will include images taken from the website.

    Read the article

  • calculating a gps coordinate given a point, bearing and distance

    - by user530509
    Hello, I have a problem which draws my back in some project for some time now. Im basically looking to trap a polygon using x,y points drawn by some script ive written. lat1,lon1 are the center gps cords of the polygon and im looking for its surrounding polygon. here is a part of my code in python: def getcords(lat1,lon1,dr,bearing): lat2=asin(sin(lat1)*cos(dr)+cos(lat1)*sin(dr)*cos(bearing)) lon2=lon1+atan2(sin(bearing)*sin(dr)*cos(lat1),cos(dr)-sin(lat1)*sin(lat2)) return [lat2,lon2] my input goes like this: lat1,lon1 - are given in decimal degrees. -dr is the angular computed by dividing the distance in miles by the earth's -raiuds(=3958.82) -bearing between 0-360 degrees. however for the input getcorsds1(42.189275,-76.85823,0.5/3958.82,30) i get [-1.3485899508698462, -76.8576637627568], however [42.2516666666667,-76.8097222222222] is the right answer. as for the angular distance i calculate it simply by dividing the distance in miles by the earth's raiuds(=3958.82). anybody?

    Read the article

< Previous Page | 19 20 21 22 23 24 25 26 27 28 29 30  | Next Page >