Search Results

Search found 173 results on 7 pages for 'ty rozak'.

Page 1/7 | 1 2 3 4 5 6 7  | Next Page >

  • Creating a voxel chunk with a VBO - How to translate the coordinates of each block and add it to the VBO chunk?

    - by sunsunsunsunsun
    Im trying to make a voxel engine similar to minecraft as a little learning experience and a way to learn some opengl. I have created a chunk class and I want to put all of the vertices for the whole chunk into a single VBO. I was previously only putting each block into a vbo and making a call to render each block. Anyways, I am a bit confused about how I can translate the coordinates of each block in the chunk when I'm putting all vertices into one vbo. This is what I have at the moment. public void putVertices(float tx, float ty, float tz) { float l_length = 1.0f; float l_height = 1.0f; float l_width = 1.0f; vertexPositionData.put(new float[]{ xOffset + l_length + tx, l_height + ty, zOffset + -l_width + tz, xOffset + -l_length + tx, l_height + ty, zOffset + -l_width + tz, xOffset + -l_length + tx, l_height + ty, zOffset + l_width + tz, xOffset + l_length + tx, l_height + ty, zOffset + l_width + tz, xOffset + l_length + tx, -l_height + ty, zOffset + l_width + tz, xOffset + -l_length + tx, -l_height + ty, zOffset + l_width + tz, xOffset + -l_length + tx, -l_height + ty, zOffset + -l_width + tz, xOffset + l_length + tx, -l_height + ty, zOffset + -l_width + tz, xOffset + l_length + tx, l_height + ty, zOffset + l_width + tz, xOffset + -l_length + tx, l_height + ty,zOffset + l_width + tz, xOffset + -l_length + tx, -l_height + ty,zOffset + l_width + tz, xOffset + l_length + tx, -l_height + ty, zOffset + l_width + tz, xOffset + l_length + tx, -l_height + ty, zOffset + -l_width + tz, xOffset + -l_length + tx, -l_height + ty,zOffset + -l_width + tz, xOffset + -l_length + tx, l_height + ty, zOffset + -l_width + tz, xOffset + l_length + tx, l_height + ty, zOffset + -l_width + tz, xOffset + -l_length + tx, l_height + ty, zOffset + l_width + tz, xOffset + -l_length + tx, l_height + ty, zOffset + -l_width + tz, xOffset + -l_length + tx, -l_height + ty, zOffset + -l_width + tz, xOffset + -l_length + tx, -l_height + ty,zOffset + l_width + tz, xOffset + l_length + tx, l_height + ty,zOffset + -l_width + tz, xOffset + l_length + tx, l_height + ty, zOffset + l_width + tz, xOffset + l_length + tx, -l_height + ty, zOffset + l_width + tz, xOffset + l_length + tx, -l_height + ty, zOffset + -l_width + tz }); } public void createChunk() { vertexPositionData = BufferUtils.createFloatBuffer((24*3)*activateBlocks); Random random = new Random(); for (int x = 0; x < CHUNK_SIZE; x++) { for (int y = 0; y < CHUNK_SIZE; y++) { for (int z = 0; z < CHUNK_SIZE; z++) { if(blocks[x][y][z].getActive()) { putVertices(x*2.0f, y*2.0f, z*2.0f); } } } } Whats any easy way to translate the vertices of each block into its correct position? I was previously using glTranslatef with each call to render block but this wont work now. What I am doing now also does not work, the blocks all render in stacks on top of each other and it looks like this: http://i.imgur.com/NyFtBTI.png Thanks

    Read the article

  • PHP: Strange Date Problem

    - by Me-and-Coding
    Hi, I have two users in my database whose birth date is set to: 1985-01-26 And then i have function which when provided the users' date, tells how many days are left in the birthday. Here is the function: function retage($iy,$im,$id) { if(!empty($iy)>0 && intval($im)>0 && intval($id)>0) { $tdo=$iy.'-'.$im.'-'.$id; $tdc=date('Y').'-'.$im.'-'.$id; /*echo "<br/>";*/ $cd=date('Y-n-j'); /*echo "<br/>";*/ if(strtotime($tdc)>strtotime($cd))//coming { $ty=floor((strtotime($tdc)-strtotime($tdo))/(3600*24*365)); $td=floor((strtotime($tdc)-strtotime($cd))/(24*3600)); if($td==1) { $td=round((strtotime($tdc)-strtotime($cd))/(24*3600)).' day to go'; } else { $td=round((strtotime($tdc)-strtotime($cd))/(24*3600)).' days to go'; } $ty='<font color="#C7C5C5">is turning '.$ty.' on <br>'.date('M jS Y',strtotime($tdc)).'</font>'; //return 'is turning '.$ty.' on '.$tdc; } elseif(strtotime($tdc)<strtotime($cd))//past { $ty=floor((strtotime($tdc)-strtotime($tdo))/(3600*24*365)); if($ty>0) { //$td='gone '.floor((strtotime($cd)-strtotime($tdc))/(24*3600)).' days ago'; $ndays=floor((strtotime($cd)-strtotime($tdc))/(24*3600)); if($ndays==1) $td=' gone '.round((strtotime($cd)-strtotime($tdc))/(24*3600)).' day ago'; else $td=' gone '.round((strtotime($cd)-strtotime($tdc))/(24*3600)).' days ago'; $ty='<font color="#C7C5C5">had turned '.$ty.' on <br>'.date('M jS Y',strtotime($tdc)).'</font>'; //return 'had turned '.$ty.' on '.$tdc; } else { $tdc=(date('Y')+1).'-'.$im.'-'.$id; $ty=floor((strtotime($tdc)-strtotime($tdo))/(3600*24*365)); //$td=floor((strtotime($tdc)-strtotime($cd))/(24*3600)).' days to go'; $td=floor((strtotime($tdc)-strtotime($cd))/(24*3600)); if($td==1) { $td=round((strtotime($tdc)-strtotime($cd))/(24*3600)).' day to go'; } else { $td=round((strtotime($tdc)-strtotime($cd))/(24*3600)).' days to go'; } $ty='<font color="#C7C5C5">is turning '.$ty.' on <br>'.date('M jS Y',strtotime($tdc)).'</font>'; //return 'is turning '.$ty.' on '.$tdc; } } else//today { $ty=floor((strtotime($tdc)-strtotime($tdo))/(3600*24*365)); if($ty>0) { $td='today'; $ty='<font color="#C7C5C5">has turned <br>'.$ty.' on today </font>'; //return 'has turned '.$ty.' on today'; } else { $ty='<font color="#C7C5C5">today</font>';$td=''; //return ''; } } } else { $ty='';$td=''; //return ''; } $ta[0]=$ty; $ta[1]=$td ; return $ta; } I use below code to show the days remaining: while($rs=mysql_fetch_array($result)) { if (isset($rs['byear'],$rs['bmonth'],$rs['bdate'])) { $tmptxt = retage($rs['byear'],$rs['bmonth'],$rs['bdate']); echo $tmptxt[1]; } } The strange thing is that for one user, the days remaining is shown correctly eg: gone 120 days ago And for other user having same birth date, this is shown: Jan 1st 1970 -14755 days to go Strange: When I use the same function outside of the loop and test with date 1985-01-26, the correct result is shown. Note: You can check out the function for yourself. Could you please tell what could be wrong there, your help will be highly appreciated. Thanks.

    Read the article

  • PostGres Error When Using Distinct : postgres ERROR: could not identify an ordering operator for ty

    - by CaffeineIV
    ** EDIT ** Nevermind, just needed to take out the parens... I get this error: ERROR: could not identify an ordering operator for type record when trying to use DISTINCT Here's the query: select DISTINCT(g.fielda, g.fieldb, r.type) from fields g LEFT JOIN types r ON g.id = r.id; And the errors: ERROR: could not identify an ordering operator for type record HINT: Use an explicit ordering operator or modify the query. ********** Error ********** ERROR: could not identify an ordering operator for type record SQL state: 42883 Hint: Use an explicit ordering operator or modify the query.

    Read the article

  • Why doesn't the conditional operator correctly allow the use of "null" for assignment to nullable ty

    - by Daniel Coffman
    This will not compile, stating "Type of conditional expression cannot be determined because there is no implicit conversion between 'System.DateTime' and ''" task.ActualEndDate = TextBoxActualEndDate.Text != "" ? DateTime.Parse(TextBoxActualEndDate.Text) : null; This works just fine if (TextBoxActualEndDate.Text != "") task.ActualEndDate = DateTime.Parse(TextBoxActualEndDate.Text); else task.ActualEndDate = null;

    Read the article

  • Why doesn't is operator take in consideration if the explicit operator is overriden when checking ty

    - by Galilyou
    Hey Guys, Consider this code sample: public class Human { public string Value { get; set;} } public class Car { public static explicit operator Human (Car c) { Human h = new Human(); h.Value = "Value from Car"; return h; } } public class Program { public static void Mani() { Car c = new Car(); Human h = (Human)c; Console.WriteLine("h.Value = {0}", h.Value); Console.WriteLine(c is Human); } } Up I provide a possibility of an explicit cast from Car to Human, though Car and Human hierarchically are not related! The above code simply means that "Car is convertible to human" However, if you run the snippet you will find the expression c is Human evaluates to false! I used to believe that the is operator is kinda expensive cause it attempts to do an actual cast that might result in an InvalidCastException. If the operator is trying to cast, then the cast should succeed as there's an operator logic that should perform the cast! What does "is" test? Does test a hierarchical "is-a" relationship? Does test whether a variable type is convertible to a type?

    Read the article

  • Problems with moving 2D circle/box collision detection

    - by dario3004
    This is my first game ever and I'm a newbie in computer physics. I've got this code for the collision detection and it works fine for BOTTOM and TOP collision.It miss the collision detection with the paddle's edge and angles so I've (roughly) tried to implement it. Main method that is called for bouncing, it checks if it bounce with wall, or with top (+ right/left side) or with bottom (+ right/left side): protected void handleBounces(float px, float py) { handleWallBounce(px, py); if(mBall.y < getHeight()/4){ if (handleRedFastBounce(mRed, px, py)) return; if (handleRightSideBounce(mRed,px,py)) return; if (handleLeftSideBounce(mRed,px,py)) return; } if(mBall.y > getHeight()/4 * 3){ if (handleBlueFastBounce(mBlue, px, py)) return; if (handleRightSideBounce(mBlue,px,py)) return; if (handleLeftSideBounce(mBlue,px,py)) return; } } This is the code for the BOTTOM bounce: protected boolean handleRedFastBounce(Paddle paddle, float px, float py) { if (mBall.goingUp() == false) return false; // next position tx = mBall.x; ty = mBall.y - mBall.getRadius(); // actual position ptx = px; pty = py - mBall.getRadius(); dyp = ty - paddle.getBottom(); xc = tx + (tx - ptx) * dyp / (ty - pty); if ((ty < paddle.getBottom() && pty > paddle.getBottom() && xc > paddle.getLeft() && xc < paddle.getRight())) { mBall.x = xc; mBall.y = paddle.getBottom() + mBall.getRadius(); mBall.bouncePaddle(paddle); playSound(mPaddleSFX); increaseDifficulty(); return true; } else return false; } As long as I understood it should be something like this: So I tried to make the "left side" and "right side" bounce method: protected boolean handleLeftSideBounce(Paddle paddle, float px, float py){ // next position tx = mBall.x + mBall.getRadius(); ty = mBall.y; // actual position ptx = px + mBall.getRadius(); pty = py; dyp = tx - paddle.getLeft(); yc = ty + (pty - ty) * dyp / (ptx - tx); if (ptx < paddle.getLeft() && tx > paddle.getLeft()){ System.out.println("left side bounce1"); System.out.println("yc: " + yc + "top: " + paddle.getTop() + " bottom: " + paddle.getBottom()); if (yc > paddle.getTop() && yc < paddle.getBottom()){ System.out.println("left side bounce2"); mBall.y = yc; mBall.x = paddle.getLeft() - mBall.getRadius(); mBall.bouncePaddle(paddle); playSound(mPaddleSFX); increaseDifficulty(); return true; } } return false; } I think I'm quite near to the solution but I'm having big troubles with the new "yc" formula. I tried so many versions of it but since I don't know the theory behind it I can't adjust for the Y axis. Since the Y axis is inverted I even tried this: yc = ty - (pty - ty) * dyp / (ptx - tx); I tried Googling it but I can't seem to find a solution for it. Also this method fails when ball touches the angle and I don't think is a nice way because it just test "one" point of the ball and probably there will be many cases in which the ball won't bounce.

    Read the article

  • Beyond the @Produces annotation, how does Jersey (JAX-RS) know to treat a POJO as a specific mime ty

    - by hal10001
    I see a lot of examples for Jersey that look something like this: public class ItemResource { @GET @Path("/items") @Produces({"text/xml", "application/json"}) public List<Item> getItems() { List<Item> items = new ArrayList<Item>(); Item item = new Item(); item.setItemName("My Item Name!"); items.add(item); return items; } } But then I have trouble dissecting Item, and how Jersey knows how to translate an Item to either XML or JSON. I've seen very basic examples that just return a String of constructed HTML or XML, which makes more sense to me, but I'm missing the next step. I looked at the samples, and one of them stood out (the json-from-jaxb sample), since the object was marked with these types of annotations: @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "", propOrder = { "flight" }) @XmlRootElement(name = "flights") I'm looking for tutorials that cover this "translation" step-by-step, or an explanation here of how to translate a POJO to output as a specific mime type. Thanks!

    Read the article

  • Which of these algorithms is best for my goal?

    - by JonathonG
    I have created a program that restricts the mouse to a certain region based on a black/white bitmap. The program is 100% functional as-is, but uses an inaccurate, albeit fast, algorithm for repositioning the mouse when it strays outside the area. Currently, when the mouse moves outside the area, basically what happens is this: A line is drawn between a pre-defined static point inside the region and the mouse's new position. The point where that line intersects the edge of the allowed area is found. The mouse is moved to that point. This works, but only works perfectly for a perfect circle with the pre-defined point set in the exact center. Unfortunately, this will never be the case. The application will be used with a variety of rectangles and irregular, amorphous shapes. On such shapes, the point where the line drawn intersects the edge will usually not be the closest point on the shape to the mouse. I need to create a new algorithm that finds the closest point to the mouse's new position on the edge of the allowed area. I have several ideas about this, but I am not sure of their validity, in that they may have far too much overhead. While I am not asking for code, it might help to know that I am using Objective C / Cocoa, developing for OS X, as I feel the language being used might affect the efficiency of potential methods. My ideas are: Using a bit of trigonometry to project lines would work, but that would require some kind of intense algorithm to test every point on every line until it found the edge of the region... That seems too resource intensive since there could be something like 200 lines that would have each have to have as many as 200 pixels checked for black/white.... Using something like an A* pathing algorithm to find the shortest path to a black pixel; however, A* seems resource intensive, even though I could probably restrict it to only checking roughly in one direction. It also seems like it will take more time and effort than I have available to spend on this small portion of the much larger project I am working on, correct me if I am wrong and it would not be a significant amount of code (100 lines or around there). Mapping the border of the region before the application begins running the event tap loop. I think I could accomplish this by using my current line-based algorithm to find an edge point and then initiating an algorithm that checks all 8 pixels around that pixel, finds the next border pixel in one direction, and continues to do this until it comes back to the starting pixel. I could then store that data in an array to be used for the entire duration of the program, and have the mouse re-positioning method check the array for the closest pixel on the border to the mouse target position. That last method would presumably execute it's initial border mapping fairly quickly. (It would only have to map between 2,000 and 8,000 pixels, which means 8,000 to 64,000 checked, and I could even permanently store the data to make launching faster.) However, I am uncertain as to how much overhead it would take to scan through that array for the shortest distance for every single mouse move event... I suppose there could be a shortcut to restrict the number of elements in the array that will be checked to a variable number starting with the intersecting point on the line (from my original algorithm), and raise/lower that number to experiment with the overhead/accuracy tradeoff. Please let me know if I am over thinking this and there is an easier way that will work just fine, or which of these methods would be able to execute something like 30 times per second to keep mouse movement smooth, or if you have a better/faster method. I've posted relevant parts of my code below for reference, and included an example of what the area might look like. (I check for color value against a loaded bitmap that is black/white.) // // This part of my code runs every single time the mouse moves. // CGPoint point = CGEventGetLocation(event); float tX = point.x; float tY = point.y; if( is_in_area(tX,tY, mouse_mask)){ // target is inside O.K. area, do nothing }else{ CGPoint target; //point inside restricted region: float iX = 600; // inside x float iY = 500; // inside y // delta to midpoint between iX,iY and tX,tY float dX; float dY; float accuracy = .5; //accuracy to loop until reached do { dX = (tX-iX)/2; dY = (tY-iY)/2; if(is_in_area((tX-dX),(tY-dY),mouse_mask)){ iX += dX; iY += dY; } else { tX -= dX; tY -= dY; } } while (abs(dX)>accuracy || abs(dY)>accuracy); target = CGPointMake(roundf(tX), roundf(tY)); CGDisplayMoveCursorToPoint(CGMainDisplayID(),target); } Here is "is_in_area(int x, int y)" : bool is_in_area(NSInteger x, NSInteger y, NSBitmapImageRep *mouse_mask){ NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; NSUInteger pixel[4]; [mouse_mask getPixel:pixel atX:x y:y]; if(pixel[0]!= 0){ [pool release]; return false; } [pool release]; return true; }

    Read the article

  • Perl to Ruby conversion (multidimensional arrays)

    - by Alex
    I'm just trying to get my head around a multidimensional array creation from a perl script i'm currently converting to Ruby, I have 0 experience in Perl, as in i opened my first Perl script this morning. Here is the original loop: my $tl = {}; for my $zoom ($zoommin..$zoommax) { my $txmin = lon2tilex($lonmin, $zoom); my $txmax = lon2tilex($lonmax, $zoom); # Note that y=0 is near lat=+85.0511 and y=max is near # lat=-85.0511, so lat2tiley is monotonically decreasing. my $tymin = lat2tiley($latmax, $zoom); my $tymax = lat2tiley($latmin, $zoom); my $ntx = $txmax - $txmin + 1; my $nty = $tymax - $tymin + 1; printf "Schedule %d (%d x %d) tiles for zoom level %d for download ...\n", $ntx*$nty, $ntx, $nty, $zoom unless $opt{quiet}; $tl->{$zoom} = []; for my $tx ($txmin..$txmax) { for my $ty ($tymin..$tymax) { push @{$tl->{$zoom}}, { xyz => [ $tx, $ty, $zoom ] }; } } } and what i have so far in Ruby: tl = [] for zoom in zoommin..zoommax txmin = cm.tiles.xtile(lonmin,zoom) txmax = cm.tiles.xtile(lonmax,zoom) tymin = cm.tiles.ytile(latmax,zoom) tymax = cm.tiles.ytile(latmin,zoom) ntx = txmax - txmin + 1 nty = tymax - tymin + 1 tl[zoom] = [] for tx in txmin..txmax for ty in tymin..tymax tl[zoom] << xyz = [tx,ty,zoom] puts tl end end end The part i'm unsure of is nested right at the root of the loops, push @{$tl->{$zoom}},{ xyz => [ $tx, $ty, $zoom ] }; I'm sure this will be very simple for a seasoned Perl programmer, thanks! `

    Read the article

  • VB .Net - Reflection: Reflected Method from a loaded Assembly executes before calling method. Why?

    - by pu.griffin
    When I am loading an Assembly dynamically, then calling a method from it, I appear to be getting the method from Assembly executing before the code in the method that is calling it. It does not appear to be executing in a Serial manner as I would expect. Can anyone shine some light on why this might be happening. Below is some code to illustrate what I am seeing, the code from the some.dll assembly calls a method named PerformLookup. For testing I put a similar MessageBox type output with "PerformLookup Time: " as the text. What I end up seeing is: First: "PerformLookup Time: 40:842" Second: "initIndex Time: 45:873" Imports System Imports System.Data Imports System.IO Imports Microsoft.VisualBasic.Strings Imports System.Reflection Public Class Class1 Public Function initIndex(indexTable as System.Collections.Hashtable) As System.Data.DataSet Dim writeCode As String MessageBox.Show("initIndex Time: " & Date.Now.Second.ToString() & ":" & Date.Now.Millisecond.ToString()) System.Threading.Thread.Sleep(5000) writeCode = RefreshList() End Function Public Function RefreshList() As String Dim asm As System.Reflection.Assembly Dim t As Type() Dim ty As Type Dim m As MethodInfo() Dim mm As MethodInfo Dim retString as String retString = "" Try asm = System.Reflection.Assembly.LoadFrom("C:\Program Files\some.dll") t = asm.GetTypes() ty = asm.GetType(t(28).FullName) 'known class location m = ty.GetMethods() mm = ty.GetMethod("PerformLookup") Dim o as Object o = Activator.CreateInstance(ty) Dim oo as Object() retString = mm.Invoke(o,Nothing).ToString() Catch Ex As Exception End Try return retString End Function End Class

    Read the article

  • Shopping Cart URL Structure

    - by Drew
    In regards to URL structure when it comes to guests and authenticated users, am I able to track traffic associated with both paths, but at the same time track total conversions going through the shopping cart? I have set up the following URL structure: Authenticated users follow this path: /cart /checkout /checkout-confirmation-ty Guests go like such: /cart /checkout-guest /checkout-confirmation-guest-ty can I track the authenticated and guest users separately? is this possible with Google Analytics?

    Read the article

  • Windows 7 Recovery Console File Access Denied

    - by Ty Rozak
    Recently by computer crashed and was stuck in a boot loop. So I created a Windows Recovery CD and booted from that. When I use the command prompt in the recovery console, I cannot see any of my personal files or folders (such a my Users folder with My Documents). Is there a way to access these files? The only reason I would need to fix the computer properly would be to get these files off of the computer and onto a hard drive. Any other fix suggestions would be greatly appreciated. I have tried both system repair and system restore from the Recovery Console, but neither seem to work. Thanks.

    Read the article

  • Javascript Print Script Not Working in IE

    - by TY
    Greets! I'm a noob struggling to learn html and javascript - getting there slowly. I'm trying to print a DIV served up by SimpleModal. The page is at: www.planetsarsfield.com This "Print" function is in the recipe box at the bottom. Everything works great in FF, but it doesn't work at all in IE8. I must be doing something fundamentally wrong but I can't spot it. Any ideas? Cheers, TY ++++++++++++++++++++++++++++++++++++++++++++++++ <script type="text/javascript"> function PrintElem(elem) { Popup($(elem).html()); } function Popup(data) { var mywindow = window.open('', 'basic-modal-content', 'height=400,width=600'); mywindow.document.write('<html><head><title>on the grill... latest recipe</title>'); mywindow.document.write('<link href="PATH/print.css" rel="stylesheet" type="text/css" />') mywindow.document.write('</head><body >'); mywindow.document.write(data); mywindow.document.write('</body></html>'); mywindow.document.close(); mywindow.print(); return true; } </script>

    Read the article

  • SQL Server 2008 need just like crosstab query on XML column?

    - by user1332896
    <abc id="abc1"> <def id="def1"> <ghi att='ghi1'> <mn id="0742d2ea" name="RF" dt="0" df="3" ty="0" /> <mn id="64d9a11b" name="CJ" dt="0" df="3" ty="0" /> <mn id="db72d154" name="FJ" dt="2" df="4" ty="0" /> <mn id="39af9fa1" name="BS" dt="0" df="2" ty="0" /> </ghi> <jkl att='jkl1'> <mn id="0742d2ea" name="RF" dt="1" gl="19" /> <mn id="64d9a11b" name="CJ" dt="0" gl="6" /> <mn id="db72d154" name="FJ" dt="0" gl="0" /> <mn id="39af9fa1" name="BS" dt="0" gl="12" /> <mn id="ac4f566f" name="DJ" dt="0" gl="9" /> <mn id="4bf3ba2f" name="RP" dt="0" gl="16" /> <mn id="db1af021" name="SC" dt="1" gl="10" /> <mn id="c4c93a2d" name="DN" dt="1" gl="15" /> </jkl> </def> </abc> I need this output. Is this possible in SQL Server 2008? id name ghiDT ghiDF ghiTY jklDT jklGL 0742d2ea RF 0 3 0 1 19 64d9a11b CJ 0 3 0 0 6 db72d154 FJ 2 4 0 0 0 39af9fa1 BS 0 2 0 0 12 ac4f566f DJ 0 0 0 0 9 4bf3ba2f RP 0 0 0 0 16 db1af021 SC 0 0 0 1 10 c4c93a2d DN 0 0 0 1 15

    Read the article

  • What could cause a WMV to not play to completion in a browser?

    - by Ty W
    A realtor has had videos created for a community she is selling homes for, the people who made the videos gave them to us in WMV format. I can play these videos without any problem in Windows Media Player, VLC, and Quicktime (via Flip4Mac). I can play the videos from their location at videohomeguide.com in my browser without any trouble. However when I upload the files to our server the video stops at about the 1 minute mark in Safari and FireFox on Mac OS X Snow Leopard. I'm not sure if Windows browsers have the same issue because they are loaded using Windows Media Player. http://carolepaul.com/images/uploads/cottageslsjamestown.wmv <- our server, will fail at 1:09ish. http://www.videohomeguide.com/media/cottageslsjamestown.wmv <- should play to completion (3:27ish) The files generate the same MD5 hash on my desktop and on our server. I used WGET to transfer the files, always downloading from videohomeguide.com. Since the files are identical and are playable using VLC/WMP/Quicktime, and playable in the browsers from videohomeguide.com it seems to me that it is some sort of server config... maybe incorrect headers sent to the browsers? Here are the headers sent and received by FireFox on OS X: http://carolepaul.com/images/uploads/cottageslsjamestown.wmv GET /images/uploads/cottageslsjamestown.wmv HTTP/1.1 Host: carolepaul.com User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.2) Gecko/20100316 Firefox/3.6.2 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Accept-Language: en-us,en;q=0.5 Accept-Encoding: gzip,deflate Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 Keep-Alive: 115 Connection: keep-alive HTTP/1.1 200 OK Date: Mon, 29 Mar 2010 20:43:20 GMT Server: Apache/1.3.41 (Unix) PHP/5.2.6 FrontPage/5.0.2.2635 mod_psoft_traffic/0.2 mod_ssl/2.8.31 OpenSSL/0.9.8b Last-Modified: Wed, 02 Dec 2009 18:08:46 GMT Etag: "1e7919c-198eadc-4b16ad2e" Accept-Ranges: bytes Content-Length: 26798812 Keep-Alive: timeout=10, max=200 Connection: Keep-Alive Content-Type: video/x-ms-wmv

    Read the article

  • Nvidia Optimus shows Nvidia card is always active in Windows 8

    - by Ty Underwood
    I have loaded the new Asus Nvidia driver for my Asus Ux32VD that I have installed Windows 8 on. It has an Nvidia 620m and Intel hd 4000 integrated graphics. The problem is that the Optimus activity icon in my system tray shows that the Nvidia card is always active, though it shows that it is not doing anything. I can force the system to prefer the Intel graphics, and after rebooting, the Nvidia card will shut off, but then all the programs will be overridden and use the Intel graphics. Is anyone else having problems with Optimus in Windows 8? My battery life is really suffering because I'm always idling my Nvidia card while also presumably running the Intel card. Any suggestions would be appreciated.

    Read the article

  • How to do a "where in values" in LINQ-to-Entities

    - by Ty
    Does anybody know how to apply a "where in values" type condition using LINQ-to-Entities? I've tried the following but it doesn't work: var values = new[] { "String1", "String2" }; // some string values var foo = model.entitySet.Where(e = values.Contains(e.Name)); I believe this works in LINQ-to-SQL though? Any thoughts?

    Read the article

  • How to force asdoc run in English

    - by ty
    My operation system is Window XP in Chinese. I'm running flex sdk asdoc in command line. Asdoc picks up the system default language. How can I force it to be run in English language environment?

    Read the article

  • .NET Setting a cookie in a WebBrowser control

    - by ty
    I am loading a website using a WebBrowser's Navigate function, and I want the browser to load the page with a cookie I've given it. The following code doesn't work: wb.Navigate(url, null, null, "Cookie: " + cookie + "\n"); What am I doing wrong? Will I have to use InternetSetCookie? This doesn't seem like the best solution. Thanks!

    Read the article

  • Web-based game in Python + Django and client browser polling

    - by ty
    I am creating a text-based game that implements a basic model in which multiple (10+) players interact with data and one moderator watches them and sets certain environmental statistics that affect gameplay. Recently I have begun to familiarize myself with Django. It seems to me that it would be an excellent tool for creating a game quickly, particularly because the nature of my game depends largely on sets of data (which lends itself quite well to a database). I am wondering how to "push" changes made by the game moderator to the players (for example, the moderator can decide to display an image to all players). The game is turn-based, not real-time, but certain messages need to be pushed out in roughly real-time. My thoughts: I could have each player's browser poll a status periodically (say, every 30 seconds) to see if there is a message from a moderator. But this forces a lag and means different players might receive it at different times. And reducing this interval to <10 seems like a bad idea for the server. Is there a better way to inform clients of changes? Would you suggest something other than using a web framework like Django? Thanks!

    Read the article

1 2 3 4 5 6 7  | Next Page >