Search Results

Search found 12214 results on 489 pages for 'video conversion'.

Page 121/489 | < Previous Page | 117 118 119 120 121 122 123 124 125 126 127 128  | Next Page >

  • Runtime error in C code (strange double conversion)

    - by Miro Hassan
    I have a strange runtime error in my C code. The Integers comparison here works fine. But in the Decimals comparison, I always get that the second number is larger than the first number, which is false. I am pretty new to C and programming in general, so this is a complex application to me. #include <stdio.h> #include <stdbool.h> #include <stdlib.h> int choose; long long neLimit = -1000000000; long long limit = 1000000000; bool big(a,b) { if ((a >= limit) || (b >= limit)) return true; else if ((a <= neLimit) || (b <= neLimit)) return true; return false; } void largerr(a,b) { if (a > b) printf("\nThe First Number is larger ..\n"); else if (a < b) printf("\nThe Second Number is larger ..\n"); else printf("\nThe Two Numbers are Equal .. \n"); } int main() { system("color e && title Numbers Comparison && echo off && cls"); start:{ printf("Choose a Type of Comparison :\n\t1. Integers\n\t2. Decimals \n\t\t I Choose Number : "); scanf("%i", &choose); switch(choose) { case 1: goto Integers; break; case 2: goto Decimals; break; default: system("echo Please Choose a Valid Option && pause>nul && cls"); goto start; } } Integers: { system("title Integers Comparison && cls"); long x , y; printf("\nFirst Number : \t"); scanf("%li", &x); printf("\nSecond Number : "); scanf("%li", &y); if (big(x,y)) { printf("\nOut of Limit .. Too Big Numbers ..\n"); system("pause>nul && cls") ; goto Integers; } largerr(x,y); printf("\nFirst Number : %li\nSecond Number : %li\n",x,y); goto exif; } Decimals: { system("title Decimals Comparison && cls"); double x , y; printf("\nFirst Number : \t"); scanf("%le", &x); printf("\nSecond Number : "); scanf("%le", &y); if (big(x,y)) { printf("\nOut of Limit .. Too Big Numbers ..\n"); system("pause>nul && cls") ; goto Decimals; } largerr(x,y); goto exif; } exif:{ system("pause>nul"); system("cls"); main(); } }

    Read the article

  • Doubt on pointer conversion

    - by Simone
    Suppose we have the following code: #include <iostream> struct A { virtual void f() { std::cout << "A::f()" << std::endl; } }; struct B: A { void f() { std::cout << "B::f()" << std::endl; } }; void to_A(void* voidp) { A* aptr = static_cast<A*>(voidp); aptr->f(); } void to_B(void* voidp) { B* bptr2 = static_cast<B*>(voidp); bptr2->f(); } int main() { B* bptr = new B; void* voidp = bptr; to_A(voidp); // prints B::f() to_B(voidp); // prints B::f() } is this code guaranteed to always work as in the code comments or is it UB? AFAIK it should be ok, but I'd like to be reassured.

    Read the article

  • Occasional conversion error using SUM function

    - by user153777
    My app uses sql2000 and a select statement it uses will sometimes fail. Once a week or so the select returns the error 'Error Converting data type varchar to numeric' SQL: sum(case when ISNULL(form_prsn_id, -1) = irpd_prsn_id then convert(dec(11,2), case when valu_value = '' then '0' else isnull (valu_value,'0') end)* case when fmdt_deduction_flag = 'Y' then -1 else 1 end else 0 end) as client_sum The valu_value field is a varchar and stores some numeric and some varchar. But including my join and where clause filter it will always select numeric or empty string. When it is failing I can remove the SUM, see the data and know that its numeric. So why would the SUM function sometimes (say 5% of time) fail on data that is numeric. I wonder if SQL somehow "looks ahead" to ensure it could convert to decimal on more than just the rows returned without the sum. Note I have discovered a fix where I include ( where isNumeric(valu_value) = 1 ) Thanks

    Read the article

  • javascript var assignment conversion to target type

    - by pbhd
    searching for a function, which converts rhs to the type of lhs. e.g. var x=false // x is boolean now; x=assign (x, "true"); //should convert "true" to boolean and return that x=assign (x, 1); // dto, convert 1 to true x=0 // x is number x=assign (x, "123"); // should convert "123" to 123; so such a function can be written, thats not the question. But: Is there somewhere a somehow complete implementation of such a thing? I started with something like that: function assign (v, x) { if (typeof v==typeof x) { return x; } switch (typeof v) { case 'boolean' : { return x=='true'?true:false; } case 'number' : { return parseFloat(x); } } return "xxx"; } var v=true; var x='true'; var r1=assign (v, x); console.log (typeof r1+ " "+r1); v=10; x="123"; var r1=assign (v, x); console.log (typeof r1+ " "+r1); which of course is not complete, but maybe shows what I'm goig for.

    Read the article

  • C# float to decimal conversion

    - by Adrian4B
    Any smart way to convert a float like this: float f = 711989.98f; into a decimal (or double) without loosing precision? I've tried: decimal d = (decimal)f; decimal d1 = (decimal)(Math.Round(f,2)); decimal d2 = Convert.ToDecimal(f);

    Read the article

  • Unicode To ASCII Conversion

    - by Yuvaraj
    Hi all, i creating an small application in Delphi 2009. here i got problem that when i run my application in WindowsXP its working but it is not working in Windows95. i know the problem that 95 will not support Unicode. if anyone knows the solution please tell me. and also i have one more idea that converting Unicode to ASCII. is it possible please tell how to do that. Thanks in Advance Worm Regards, Yuvaraj

    Read the article

  • repairing or retrieving video off a cracked disk

    - by Tori Hisey
    My disk has a thin cracked right through the one side. right around the crack it looks like it has water damage but im pretty sure it was caused from the crack. will tape work for this? its a dvd of us in jamaica swimming with dolphins and i havent even watched it yet, it got ruined in my suitcase. If there is no way to repair it, is there somewhere that i can take it so they might be able to somehow get the video off of it and onto another disk? any suggestions would be helpful. Thanks

    Read the article

  • Python to C# Conversion of RGBA values not working

    - by clangers
    I'm currently converting some python code to C#, and I'm having an issue with the RGBA C# libraries # Original Python Code: d = math.sqrt( (x - size/2.0)**2 + (y - size/2.0)**2 ) rgbVal = int(200*d/md + 50) rgba = (0,0,0, 255 - rgbVal) img.putpixel((x,y), rgba) // My C# Code double d = Math.Sqrt(Math.Pow((x - DotSize / 2.0), 2) + Math.Pow((y - DotSize / 2.0), 2)); int rgbVal = (int) (200 * d / md + 50); Color color = Color.FromArgb(255 - rgbVal, 0, 0, 0); // ** ERROR ** img.SetPixel(x,y, color); At both instances of the code d is equal to 106 and md is equal to 53. However the resulting rgbVal value is 450. This would obviously mean that 255 - 450 is -195, which causes an error to be thrown as each individual value must be between 0 and 255. Anyone have any idea how I can fix this. Please note that the data is the same when running both the python and C# versions.

    Read the article

  • Conversion failed when converting the varchar value to data type int

    - by desi
    *I have a varchar(1000) column declared as field that contains all numbers, as shown below. And I want to execute the following script. I need this to work please Declare @PostalCode varchar(1000)=0 set @PostalCode ='7005036,7004168,7002314,7001188,6998955' Select hl.* From CountryLocation cl INNER JOIN refPostalCodes pc ON pc.PostalCode = hl.PostalCode where pc.Postalcode in (@PostalCode) and pc.notDeleted = 1

    Read the article

  • how to recognize video codec of a file with ffmpeg

    - by GerryMulligan
    I have often problems reading AVI file with my TV dvd player if they are not divx or xvid (DX50,i.e., is not readable). I'd like to make a fast script to recognize the video codec of these files before burn it on cdrom/dvd. The command : ffmpeg -i file.avi give the "container" of the video stream (mpeg4,mpeg2,etc), not the codec. Any hint? Thanks

    Read the article

  • Conversion char[] to char*

    - by sijith
    may be this is a sizzle question but please help void Temp1::caller() { char *cc=Called(); printf("sdfasfasfas"); printf("%s",cc); } char *Temp1::Called() { char a[6]="Hello"; return &a; } Here how to print Hello using printf("%s",cc);

    Read the article

  • Asus V1S, no video signals but boots ok

    - by user52441
    Hey folks! I got a mayor problem with my 3 year old my Asus V1S notebook. After installing VMWare Player an rebooting the screen remained black and there was no POST screen. Also the other video outputs - VGA and HDMI - send no signals. However the maschine boots into Windows 7 properly (sounds waren played) and I can log in by blindly typing my pw. Testend WIN-P and functiom keys but no luck with that. Google is no help here, thats why I basketball you superusers! Please give me hints if you have any idea or if you experienced a similar problem. Thank you so much!

    Read the article

  • Conversion of Single to two UInt16 values in .net

    - by Gio
    In the good old days of C. I could cast a float to an int (assuming 32 bit system), do some bit manipluation ( bitwise and, right shift, ect ), and get the upper and lower 16 bit hex representations of the floating point number, which I could then store in two short values. I'm not seeing an easy way of doing this in C#. System.Convert.ToUInt16 just does a float to int convert (even after I shift right), which leaves a vlaue of 0 if the float is less than 0, which is not the desired effect. //useless leaves me witg a value 0f 0 UIN16 s1 = (UInt16)((System.Convert.ToUInt32(d2) & 0xffff0000) >> 16); //capture the high word UInt16 s2 = (UInt16)(System.Convert.ToUInt32(d2) & 0xffff); //capture the low word A basic cast (UInt32) doesn't work either.

    Read the article

  • Currency Conversion and display fetched from Server

    - by user198725878
    I am fetching the in app purchase items for my app from my web server.the web-server gives the product title, description and price... Currently i am displaying the each product using the product title,description and price.Currently i am showing the currency in $. Now i am having the doubt that , can i display the prices as such?when i referred some URL, it seems that prices needs to be localized. So do i need to display the prices localized which is fetched from my-server? please let me know how should i proceed? Thanks a lot for stopping by..

    Read the article

  • Date Time conversion

    - by Zerotoinfinite
    Hi All, I am getting datetime as 1/2/2010 11:29:30 which I am displaying in a gridview. and I want to convert it to "Feb 1, 2010 at 11:29". Please let me know how to convert it like this. Thanks in advance. Note: I am using asp.net with C#.

    Read the article

  • how to do this conversion?

    - by kumar
    string mvi = Moneys.GetValue(8) as string; if (mvi == null) money.Currency= Convert.ToDecimal(""); /// I am getting exception Here if its null? else money.Currency= Convert.ToDecimal(mvi); /// Currency is Decimal money.Currency= Convert.ToDecimal(""); /// I am getting exception Here if its null? Can any body tell me how to do this? thanks

    Read the article

  • Play video from webserver

    - by Eyla
    Greeting, I'm creating a video play with silverlight 4 and C#. the player is working fine when I set the path for the target folder using this line of code. string FolderPath = this.Context.ApplicationInstance.Server.MapPath(@"~\Video\"); Now I want to place in C:\inetpub\wwwroot and I want to use the IP address of my IIS instead of the folder place. please advice how to modify this line of code to target my IIS. Thank you,

    Read the article

  • Why can’t two programs access my webcam simultaneously?

    - by qdii
    I first launch cheese and my webcam turns on. I then run vlc to grab the output of /dev/video0 but it fails with: [0x7f3ea40012e8] v4l2 demux error: cannot set input 0: Device or resource busy [0x7f3ea40012e8] v4l2 demux error: cannot set input 0: Device or resource busy [0x7f3ea4002168] v4l2 access error: cannot set input 0: Device or resource busy [0x7f3ea4002168] v4l2 access error: cannot set input 0: Device or resource busy [0x7f3eb4000b78] main input error: open of `v4l2:///dev/video0' failed Whatever pair of video programs I run (skype, cheese, vlc, etc.), the result is always the same: the second program can no longer use the webcam when the first one has already grabbed the output. However I find it curious as video4linux states: In general, V4L2 devices can be opened more than once. When this is supported by the driver, users can for example start a "panel" application to change controls like brightness or audio volume, while another application captures video and audio. My webcam is seen in lspci as 058f:a014 Alcor Micro Corp. Asus Integrated Webcam, but I don’t even know what the underlying driver is, so I can’t check whether my problem is driver-related or not. Any input would be more than welcome!

    Read the article

  • How powerful of a PC do you need to edit HD videos?

    - by Xeoncross
    I have a Core2Quad Q8200 (2.3GHz) with 4GB of RAM, a 512MB PCIe video card, and a SATA-2 HD. Yet it still isn't fast enough to edit 720i/p video in Sony Vegas or Adobe Premiere/Aftereffects. My RAM usage never peaks over 1.6GB, but my CPU cores make it to 95% quick! Right now the preview panes in all these programs lag to bad to actually work on the videos. I get to see 1-3 frames every second or two! So how fast do I have to go? At what point will my CPU be fast enough to actually edit these videos? I have to assume that regular people and their regular sub $2k computers can actually work with this footage. Another way to answer this is, how fast is the PC you used to edit videos? Update: I'ts worth noting that now that I have Adobe Pre/AF CS4 I am more interested in getting that working than my older Vegas 6. If you didn't have to re-run RAM preview every, single, time you made one change it would be my answer. But since I like to test many filters and effects before choosing one - I have to re-render a 1-sec section of footage over-and-over and it drives me nuts waiting. Perhaps a motherboard with Dual Xeon chips or something would be able to handle this. It would probably be as much as a dual-crossfire setup and would also speed up other applications.

    Read the article

  • periodically unable to play media

    - by avorum
    So I don't know if this is right place to ask this at all but I've gotten good help here before so I thought I'd ask. For the last year or so periodically my computer would start refusing to play media. In browser players would say they were playing but they weren't. No audio and the video wasn't moving forward although it would show the first frame of the video to be shown. iTunes would act similarly, thinking it was playing without actually playing any music. This persists across browsers, various application categories, etcetera. It can often be fixed by rebooting but it is only a short term solution. Does anyone know of anything that might cause this erratic behavior? I'm using Windows 7 64bit. If additional information would help please ask. Alternatively, if this isn't the right site for this I would greatly appreciate some direction to a site better suited to my question. Thanks in advance for any help.

    Read the article

< Previous Page | 117 118 119 120 121 122 123 124 125 126 127 128  | Next Page >