Daily Archives

Articles indexed Saturday April 24 2010

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

  • Formula for Live Video Streaming Bitrate

    - by MD
    I am simply looking for the formula that should be used here. All the results I've found base "finding the bitrate" off of already existing video. I'm talking about LIVE streaming. (indeterminate length) So, I know some basic parts of it, but I just need to know if I'm right or missing anything. For Kbps: Resolution * Framerate / 1024 Is it really that simple? Audio would be a separate element for our purposes here. Am I missing anything from this formula? (Coming up with a proposal of what amount of bandwidth would be required, relative to possible resolution options, so I just need to be sure that I'm not missing anything or inaccurate about it)

    Read the article

  • Managing persistent data on an Amazon EC2 web server

    - by Derek
    I've just started trying out Amazon's EC2 service for running an asp.net web app which uses a SQL Server 2005 Express database. I have some questions about how to configure and operate it best for reliability, and I'm hoping to tap into some collective wisdom here as this is my first foray into EC2. Here's how I have it configured currently: OS: Windows 2003 SQL Server Express 2005 Web content stored on an EBS Volume (E Drive) Database Data stored on an EBS Volume (E Drive) Database backups to "C Drive" and then copied off to S3. Elastic IP Address attached to the production instance. Now when I make a change to the OS configuration, I make a new AMI using the bundle feature. Unfortunately, I found that this results in significant downtime. While the bundle is created and the new instance is started. It seems that when I'm ready to make a new AMI, I should: Start up a new temporary instance. Detach the EBS volume from the production instance. Detach the IP Address from the production instance. Attach the IP Address to the temporary instance. Attach the EBS volume to the temporary instance. Create an AMI from the production instance. After the production instance restarts, reverse the attach/detach steps to put it back in production. Is this the right order of events to prevent any chance to corrupt the EBS volume? Will the EBS volume become corrupt if I detach it while a database Write is taking place? Should I snapshot the EBS volume of the production instance and attach it to the temporary instance instead? Or could taking a snapshot of the EBS volume while it's in use cause corruption? Any suggestions to improve the reliability and operations?

    Read the article

  • using linq to sql

    - by mazhar
    Well I am new to this orm stuff. We have to create a large project . I read about linq to sql . will it be appropiate to use it in the project of high risk . i found no problem with it personally but the thing is that there will be no going back once started.So i need some feedback from the orm gurus here at the msdn.Will entity framework will be better?( I am in doubt about link to sql because I have read and heard negative feedback here and there) I will be using mvc2 as the framework. So please give the feedback about linq to sql in this regard. q2) Also I am a fan of stored procedure as they are precomputed and fasten up the thing and I have never worked without them.I know that linq to sql support stored procedures but will it be feasible to give up stored procedure seeing the beautiful data access layer generated with little effort as we are also in a need of rapid development. q3) If some changes to some fields required in the database in Link to Sql how will the changes be accommodated in the data access layer.

    Read the article

  • Using Delphi or FFMpeg to create a movie from image sequence

    - by Hein du Plessis
    Hi all My Delphi app has created a squence called frame_001.png to frame_100.png. I need that to be compiled into a movie clip. I think perhaps the easiest is to call ffmpeg from the command line, according to their documentation: For creating a video from many images: ffmpeg -f image2 -i foo-%03d.jpeg -r 12 -s WxH foo.avi The syntax foo-%03d.jpeg specifies to use a decimal number composed of three digits padded with zeroes to express the sequence number. It is the same syntax supported by the C printf function, but only formats accepting a normal integer are suitable. From: http://ffmpeg.org/ffmpeg-doc.html#SEC5 However my files are (lossless) png format, so I have to convert using imagemagick first. My command line is now: ffmpeg.exe -f image2 -i c:\temp\wentelreader\frame_%05d.jpg -r 12 foo.avi But then I get the error: [image2 @ 0x133a7d0]Could not find codec parameters (Video: mjpeg) c:\temp\wentelreader\Frame_C:\VID2EVA\Tools\Mencoder\wentel.bat5d.jpg: could not find codec parameters What am I doing wrong? Alternatively can this be done easily with Delphi?

    Read the article

  • TypeLoadException at startup of WCF

    - by Kelly
    I get the following error long before I hit the breakpoint at Main(). System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information. at System.Reflection.Module._GetTypesInternal(StackCrawlMark& stackMark) at System.Reflection.Assembly.GetTypes() at Microsoft.Tools.SvcHost.ServiceHostHelper.LoadServiceAssembly(String svcAssemblyPath) There is a suggestion that it might be a configuration error, but I don't see it when comparing to a similar, working example. How do I "Retrieve the LoaderExceptions property" when it happens this early? Thanks!

    Read the article

  • C# Winforms vs WPF

    - by m0s
    Hi pros, I am a student and I do freelance here and there when I have opportunity. I believe my strongest language is C#. I don't really know what is going on in real programming world, so I was wondering if WPF did take over WinForms? I know the differences between two and how two can be used simultaneously but, I just don't want to invest my time in learning dying technologies, I hope you understand. So, for windows desktop programming what would you recommend to master WinForms, WPF or maybe both? I also get a lot that desktop programming is dead already and one should only care about learning web programming. Thanks for attention, any comments are greatly appreciated.

    Read the article

  • Configuring multiple distinct WCF binding configurations causes an exception to be thrown

    - by Sandor Drieënhuizen
    I have a set of IIS7-hosted net.tcp WCF services that serve my ASP.NET MVC web application. The web application is accessed over the internet. WCF Services (IIS7) <--> ASP.NET MVC Application <--> Client Browser The services are username authenticated, the account that a client (of my web application) uses to logon ends up as the current principal on the host. I want one of the services to be authenticated differently, because it serves the view model for my logon view. When it's called, the client is obviously not logged on yet. I figure Windows authentication serves best or perhaps just certificate based security (which in fact I should use for the authenticated services as well) if the services are hosted on a machine that is not in the same domain as the web application. That's not the point here though. Using multiple TCP bindings is what's giving me trouble. I tried setting it up like this: <bindings> <netTcpBinding> <binding> <security mode="TransportWithMessageCredential"> <message clientCredentialType="UserName"/> </security> </binding> <binding name="public"> <security mode="Transport"> <message clientCredentialType="Windows"/> </security> </binding> </netTcpBinding> </bindings> The thing is that both bindings don't seem to want live together in my host. When I remove either of them, all's fine but together they produce the following exception on the client: The requested upgrade is not supported by 'net.tcp://localhost:8081/Service2.svc'. This could be due to mismatched bindings (for example security enabled on the client and not on the server). In the server trace log, I find the following exception: Protocol Type application/negotiate was sent to a service that does not support that type of upgrade. Am I looking into the right direction or is there a better way to solve this?

    Read the article

  • how to save current state of application

    - by medma
    hi, I am making an iphone application in which after login we will go through some steps and then finally we make a call from within the app. As we know on making call our app quits so plz suggest me how to resume that state on relaunching the app? 1-login 2-some steps 3-list of numbers 4-call Any help will be appreciated. Thanx..

    Read the article

  • codingBat separateThousands using regex (and unit testing how-to)

    - by polygenelubricants
    This question is a combination of regex practice and unit testing practice. Regex part I authored this problem separateThousands for personal practice: Given a number as a string, introduce commas to separate thousands. The number may contain an optional minus sign, and an optional decimal part. There will not be any superfluous leading zeroes. Here's my solution: String separateThousands(String s) { return s.replaceAll( String.format("(?:%s)|(?:%s)", "(?<=\\G\\d{3})(?=\\d)", "(?<=^-?\\d{1,3})(?=(?:\\d{3})+(?!\\d))" ), "," ); } The way it works is that it classifies two types of commas, the first, and the rest. In the above regex, the rest subpattern actually appears before the first. A match will always be zero-length, which will be replaceAll with ",". The rest basically looks behind to see if there was a match followed by 3 digits, and looks ahead to see if there's a digit. It's some sort of a chain reaction mechanism triggered by the previous match. The first basically looks behind for ^ anchor, followed by an optional minus sign, and between 1 to 3 digits. The rest of the string from that point must match triplets of digits, followed by a nondigit (which could either be $ or \.). My question for this part is: Can this regex be simplified? Can it be optimized further? Ordering rest before first is deliberate, since first is only needed once No capturing group Unit testing part As I've mentioned, I'm the author of this problem, so I'm also the one responsible for coming up with testcases for them. Here they are: INPUT, OUTPUT "1000", "1,000" "-12345", "-12,345" "-1234567890.1234567890", "-1,234,567,890.1234567890" "123.456", "123.456" ".666666", ".666666" "0", "0" "123456789", "123,456,789" "1234.5678", "1,234.5678" "-55555.55555", "-55,555.55555" "0.123456789", "0.123456789" "123456.789", "123,456.789" I haven't had much experience with industrial-strength unit testing, so I'm wondering if others can comment whether this is a good coverage, whether I've missed anything important, etc (I can always add more tests if there's a scenario I've missed).

    Read the article

  • Graph Tour with Uniform Cost Search in Java

    - by user324817
    Hi. I'm new to this site, so hopefully you guys don't mind helping a nub. Anyway, I've been asked to write code to find the shortest cost of a graph tour on a particular graph, whose details are read in from file. The graph is shown below: http://img339.imageshack.us/img339/8907/graphr.jpg This is for an Artificial Intelligence class, so I'm expected to use a decent enough search method (brute force has been allowed, but not for full marks). I've been reading, and I think that what I'm looking for is an A* search with constant heuristic value, which I believe is a uniform cost search. I'm having trouble wrapping my head around how to apply this in Java. Basically, here's what I have: Vertex class - ArrayList<Edge> adjacencies; String name; int costToThis; Edge class - final Vertex target; public final int weight; Now at the moment, I'm struggling to work out how to apply the uniform cost notion to my desired goal path. Basically I have to start on a particular node, visit all other nodes, and end on that same node, with the lowest cost. As I understand it, I could use a PriorityQueue to store all of my travelled paths, but I can't wrap my head around how I show the goal state as the starting node with all other nodes visited. Here's what I have so far, which is pretty far off the mark: public static void visitNode(Vertex vertex) { ArrayList<Edge> firstEdges = vertex.getAdjacencies(); for(Edge e : firstEdges) { e.target.costToThis = e.weight + vertex.costToThis; queue.add(e.target); } Vertex next = queue.remove(); visitNode(next); } Initially this takes the starting node, then recursively visits the first node in the PriorityQueue (the path with the next lowest cost). My problem is basically, how do I stop my program from following a path specified in the queue if that path is at the goal state? The queue currently stores Vertex objects, but in my mind this isn't going to work as I can't store whether other vertices have been visited inside a Vertex object. Help is much appreciated! Josh

    Read the article

  • Apple Quicktime skips during video playback

    - by Steve
    Hi, I'm on Windows XP SP3, and I'm running Apple Quicktime v7.6.5. When viewing MPEG-4 videos, every 30 seconds or so, the playback will halt for 5 seconds, and then resume at a point 10 seconds or so into the future. In essence, it is freezing and skipping. Any ideas how to combat this? My laptop is an NEC Versa, with graphics supplied by a mobile Intel 915gm/gms,910gml express chipset family. Cheers.

    Read the article

  • syntax for Header set Expires

    - by Umair
    Default syntax for Header set Expires is Header set Expires "Wed, 21 May 2010 20:00:00 GMT" and default syntax for ExpiresDefault is ExpiresDefault A2592000 OR ExpiresByType image/gif A60 I want to use such a syntax for Header set Expires, that is I want to pass an expires time in seconds after access. how can i do this ?

    Read the article

  • wcf and windows authentication

    - by darko petreski
    I like to use wcf (windows communication foundation) with windows authentication. Do I need Active directory for this purpose? How the server knows about the identity of the client? If someone can found out the pass of the client that is using the wcf services, can he create the same user name on different computer and use the password to access the wcf services ? Regards, Darko Petreski

    Read the article

  • Is there any memory leak in the normal routine of sqlite3_*()?

    - by reer
    A normal routine of sqlite3_prepare_v2() + sqlite3_step() + sqlite3_finalize() could contain leak. It sound ridiculous. But the test code seems to say it. Or I used the sqlite3_*() wrongly. Appreciate for any reply. __code________________________ include include // for usleep() include int multi_write (int j); sqlite3 *db = NULL; int main (void) { int ret = -1; ret = sqlite3_open("test.db", &db); ret = sqlite3_exec(db,"CREATE TABLE data_his (id INTEGER PRIMARY KEY, d1 CHAR(16))", NULL,NULL,NULL); usleep (100000); int j=0; while (1) { multi_write (j++); usleep (2000000); printf (" ----------- %d\n", j); } ret = sqlite3_close (db); return 0; } int multi_write (int j) { int ret = -1; char *sql_f = "INSERT OR REPLACE INTO data_his VALUES (%d, %Q)"; char *sql = NULL; sqlite3_stmt *p_stmt = NULL; ret = sqlite3_prepare_v2 (db, "BEGIN TRANSACTION", -1, &p_stmt, NULL); ret = sqlite3_step ( p_stmt ); ret = sqlite3_finalize ( p_stmt ); int i=0; for (i=0; i<100; i++) { sql = sqlite3_mprintf ( sql_f, j*100000 + i, "00000000000068FD"); ret = sqlite3_prepare_v2 (db, sql, -1, &p_stmt, NULL ); sqlite3_free ( sql ); //printf ("sqlite3_prepare_v2(): %d, %s\n", ret, sqlite3_errmsg (db)); ret = sqlite3_step ( p_stmt ); //printf ("sqlite3_step(): %d, %s\n", ret, sqlite3_errmsg (db)); ret = sqlite3_finalize ( p_stmt ); //printf ("sqlite3_finalize(): %d, %s\n\n", ret, sqlite3_errmsg (db)); } ret = sqlite3_prepare_v2 (db, "COMMIT TRANSACTION", -1, &p_stmt, NULL ); ret = sqlite3_step ( p_stmt ); ret = sqlite3_finalize ( p_stmt ); return 0; } __result________________________ And I watch the the process's run by top. At first, the memory statistics is: PID PPID USER STAT VSZ %MEM %CPU COMMAND 17731 15488 root S 1104 5% 7% ./sqlite3multiwrite When the printf() in while(1){} of main() prints the 150, the memory statistics is: PID PPID USER STAT VSZ %MEM %CPU COMMAND 17731 15488 root S 1552 5% 7% ./sqlite3multiwrite It sounds that after 150 for-cycles, the memory used by sqlite3multiwrite increase from 1104KB to 1552KB. What does it mean? memory leak or other thing?

    Read the article

  • PHP Array issue - not looping through foreach...

    - by Homer_J
    Ok, Here is the code: function fetch_questions($page) { global $link; $proc = mysqli_prepare($link, "SELECT * FROM tquestions_cwh WHERE page = ?"); mysqli_stmt_bind_param($proc, "i", $page); mysqli_stmt_execute($proc); $rows = array(); stmt_bind_assoc($proc, $rowq); // loop through all result rows while ($proc->fetch()) { // print_r($rowq); $rows[]=$rowq; } mysqli_stmt_close($proc); mysqli_clean_connection($link); return($rows); } I then add this to a php variable, like so: $qs = fetch_questions($page); I then loop through is, like so: foreach($qs as $value){ echo "<tr>".$value['qnum']." is the questions number and the question text is ".$value['qtext'].". The page and q values are ".$value['page']." and ".$value['questions']." respectively.</tr>"; The output, however is this: 8 is the questions number and the question text is I know how what I do fits into my team's objectives. The page and q values are 1 and q8 respectively.8 is the questions number and the question text is I know how what I do fits into my team's objectives. The page and q values are 1 and q8 respectively.8 is the questions number and the question text is I know how what I do fits into my team's objectives. The page and q values are 1 and q8 respectively.8 is the questions number and the question text is I know how what I do fits into my team's objectives. The page and q values are 1 and q8 respectively.8 is the questions number and the question text is I know how what I do fits into my team's objectives. The page and q values are 1 and q8 respectively.8 is the questions number and the question text is I know how what I do fits into my team's objectives. The page and q values are 1 and q8 respectively.8 is the questions number and the question text is I know how what I do fits into my team's objectives. The page and q values are 1 and q8 respectively.8 is the questions number and the question text is I know how what I do fits into my team's objectives. The page and q values are 1 and q8 respectively. Which is not what I want, for information purposes, the array using the print function looks like this: Array ( [0] => Array ( [questions] => q8 [qnum] => 8 [qtext] => I know how what I do fits into my team's objectives [page] => 1 ) [1] => Array ( [questions] => q8 [qnum] => 8 [qtext] => I know how what I do fits into my team's objectives [page] => 1 ) [2] => Array ( [questions] => q8 [qnum] => 8 [qtext] => I know how what I do fits into my team's objectives [page] => 1 ) [3] => Array ( [questions] => q8 [qnum] => 8 [qtext] => I know how what I do fits into my team's objectives [page] => 1 ) [4] => Array ( [questions] => q8 [qnum] => 8 [qtext] => I know how what I do fits into my team's objectives [page] => 1 ) [5] => Array ( [questions] => q8 [qnum] => 8 [qtext] => I know how what I do fits into my team's objectives [page] => 1 ) [6] => Array ( [questions] => q8 [qnum] => 8 [qtext] => I know how what I do fits into my team's objectives [page] => 1 ) [7] => Array ( [questions] => q8 [qnum] => 8 [qtext] => I know how what I do fits into my team's objectives [page] => 1 ) ) Clearly it's not looping through and displaying each row as it should...any advice? Homer.

    Read the article

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