Search Results

Search found 42 results on 2 pages for 'adeel amin'.

Page 1/2 | 1 2  | Next Page >

  • MVC 2 Validation without BuddyClasses

    - by Muhammad Adeel Zahid
    Hello EveryOne, i m using asp.NET MVC 2 for my current project and i need to validate form fields both on client and server side. for that i started with DataAnnotations. Now, i figure out that i have to write buddy class for every model or i have to go to designer generated code and put my annotations there (not a good idea though). if someone can suggest me a solution that helps me avoid writing those buddy classes and get the same functionality. Regards Adeel

    Read the article

  • Movement and Collision with AABB

    - by Jeremy Giberson
    I'm having a little difficulty figuring out the following scenarios. http://i.stack.imgur.com/8lM6i.png In scenario A, the moving entity has fallen to (and slightly into the floor). The current position represents the projected position that will occur if I apply the acceleration & velocity as usual without worrying about collision. The Next position, represents the corrected projection position after collision check. The resulting end position is the falling entity now rests ON the floor--that is, in a consistent state of collision by sharing it's bottom X axis with the floor's top X axis. My current update loop looks like the following: // figure out forces & accelerations and project an objects next position // check collision occurrence from current position -> projected position // if a collision occurs, adjust projection position Which seems to be working for the scenario of my object falling to the floor. However, the situation becomes sticky when trying to figure out scenario's B & C. In scenario B, I'm attempt to move along the floor on the X axis (player is pressing right direction button) additionally, gravity is pulling the object into the floor. The problem is, when the object attempts to move the collision detection code is going to recognize that the object is already colliding with the floor to begin with, and auto correct any movement back to where it was before. In scenario C, I'm attempting to jump off the floor. Again, because the object is already in a constant collision with the floor, when the collision routine checks to make sure moving from current position to projected position doesn't result in a collision, it will fail because at the beginning of the motion, the object is already colliding. How do you allow movement along the edge of an object? How do you allow movement away from an object you are already colliding with. Extra Info My collision routine is based on AABB sweeping test from an old gamasutra article, http://www.gamasutra.com/view/feature/3383/simple_intersection_tests_for_games.php?page=3 My bounding box implementation is based on top left/bottom right instead of midpoint/extents, so my min/max functions are adjusted. Otherwise, here is my bounding box class with collision routines: public class BoundingBox { public XYZ topLeft; public XYZ bottomRight; public BoundingBox(float x, float y, float z, float w, float h, float d) { topLeft = new XYZ(); bottomRight = new XYZ(); topLeft.x = x; topLeft.y = y; topLeft.z = z; bottomRight.x = x+w; bottomRight.y = y+h; bottomRight.z = z+d; } public BoundingBox(XYZ position, XYZ dimensions, boolean centered) { topLeft = new XYZ(); bottomRight = new XYZ(); topLeft.x = position.x; topLeft.y = position.y; topLeft.z = position.z; bottomRight.x = position.x + (centered ? dimensions.x/2 : dimensions.x); bottomRight.y = position.y + (centered ? dimensions.y/2 : dimensions.y); bottomRight.z = position.z + (centered ? dimensions.z/2 : dimensions.z); } /** * Check if a point lies inside a bounding box * @param box * @param point * @return */ public static boolean isPointInside(BoundingBox box, XYZ point) { if(box.topLeft.x <= point.x && point.x <= box.bottomRight.x && box.topLeft.y <= point.y && point.y <= box.bottomRight.y && box.topLeft.z <= point.z && point.z <= box.bottomRight.z) return true; return false; } /** * Check for overlap between two bounding boxes using separating axis theorem * if two boxes are separated on any axis, they cannot be overlapping * @param a * @param b * @return */ public static boolean isOverlapping(BoundingBox a, BoundingBox b) { XYZ dxyz = new XYZ(b.topLeft.x - a.topLeft.x, b.topLeft.y - a.topLeft.y, b.topLeft.z - a.topLeft.z); // if b - a is positive, a is first on the axis and we should use its extent // if b -a is negative, b is first on the axis and we should use its extent // check for x axis separation if ((dxyz.x >= 0 && a.bottomRight.x-a.topLeft.x < dxyz.x) // negative scale, reverse extent sum, flip equality ||(dxyz.x < 0 && b.topLeft.x-b.bottomRight.x > dxyz.x)) return false; // check for y axis separation if ((dxyz.y >= 0 && a.bottomRight.y-a.topLeft.y < dxyz.y) // negative scale, reverse extent sum, flip equality ||(dxyz.y < 0 && b.topLeft.y-b.bottomRight.y > dxyz.y)) return false; // check for z axis separation if ((dxyz.z >= 0 && a.bottomRight.z-a.topLeft.z < dxyz.z) // negative scale, reverse extent sum, flip equality ||(dxyz.z < 0 && b.topLeft.z-b.bottomRight.z > dxyz.z)) return false; // not separated on any axis, overlapping return true; } public static boolean isContactEdge(int xyzAxis, BoundingBox a, BoundingBox b) { switch(xyzAxis) { case XYZ.XCOORD: if(a.topLeft.x == b.bottomRight.x || a.bottomRight.x == b.topLeft.x) return true; return false; case XYZ.YCOORD: if(a.topLeft.y == b.bottomRight.y || a.bottomRight.y == b.topLeft.y) return true; return false; case XYZ.ZCOORD: if(a.topLeft.z == b.bottomRight.z || a.bottomRight.z == b.topLeft.z) return true; return false; } return false; } /** * Sweep test min extent value * @param box * @param xyzCoord * @return */ public static float min(BoundingBox box, int xyzCoord) { switch(xyzCoord) { case XYZ.XCOORD: return box.topLeft.x; case XYZ.YCOORD: return box.topLeft.y; case XYZ.ZCOORD: return box.topLeft.z; default: return 0f; } } /** * Sweep test max extent value * @param box * @param xyzCoord * @return */ public static float max(BoundingBox box, int xyzCoord) { switch(xyzCoord) { case XYZ.XCOORD: return box.bottomRight.x; case XYZ.YCOORD: return box.bottomRight.y; case XYZ.ZCOORD: return box.bottomRight.z; default: return 0f; } } /** * Test if bounding box A will overlap bounding box B at any point * when box A moves from position 0 to position 1 and box B moves from position 0 to position 1 * Note, sweep test assumes bounding boxes A and B's dimensions do not change * * @param a0 box a starting position * @param a1 box a ending position * @param b0 box b starting position * @param b1 box b ending position * @param aCollisionOut xyz of box a's position when/if a collision occurs * @param bCollisionOut xyz of box b's position when/if a collision occurs * @return */ public static boolean sweepTest(BoundingBox a0, BoundingBox a1, BoundingBox b0, BoundingBox b1, XYZ aCollisionOut, XYZ bCollisionOut) { // solve in reference to A XYZ va = new XYZ(a1.topLeft.x-a0.topLeft.x, a1.topLeft.y-a0.topLeft.y, a1.topLeft.z-a0.topLeft.z); XYZ vb = new XYZ(b1.topLeft.x-b0.topLeft.x, b1.topLeft.y-b0.topLeft.y, b1.topLeft.z-b0.topLeft.z); XYZ v = new XYZ(vb.x-va.x, vb.y-va.y, vb.z-va.z); // check for initial overlap if(BoundingBox.isOverlapping(a0, b0)) { // java pass by ref/value gotcha, have to modify value can't reassign it aCollisionOut.x = a0.topLeft.x; aCollisionOut.y = a0.topLeft.y; aCollisionOut.z = a0.topLeft.z; bCollisionOut.x = b0.topLeft.x; bCollisionOut.y = b0.topLeft.y; bCollisionOut.z = b0.topLeft.z; return true; } // overlap min/maxs XYZ u0 = new XYZ(); XYZ u1 = new XYZ(1,1,1); float t0, t1; // iterate axis and find overlaps times (x=0, y=1, z=2) for(int i = 0; i < 3; i++) { float aMax = max(a0, i); float aMin = min(a0, i); float bMax = max(b0, i); float bMin = min(b0, i); float vi = XYZ.getCoord(v, i); if(aMax < bMax && vi < 0) XYZ.setCoord(u0, i, (aMax-bMin)/vi); else if(bMax < aMin && vi > 0) XYZ.setCoord(u0, i, (aMin-bMax)/vi); if(bMax > aMin && vi < 0) XYZ.setCoord(u1, i, (aMin-bMax)/vi); else if(aMax > bMin && vi > 0) XYZ.setCoord(u1, i, (aMax-bMin)/vi); } // get times of collision t0 = Math.max(u0.x, Math.max(u0.y, u0.z)); t1 = Math.min(u1.x, Math.min(u1.y, u1.z)); // collision only occurs if t0 < t1 if(t0 <= t1 && t0 != 0) // not t0 because we already tested it! { // t0 is the normalized time of the collision // then the position of the bounding boxes would // be their original position + velocity*time aCollisionOut.x = a0.topLeft.x + va.x*t0; aCollisionOut.y = a0.topLeft.y + va.y*t0; aCollisionOut.z = a0.topLeft.z + va.z*t0; bCollisionOut.x = b0.topLeft.x + vb.x*t0; bCollisionOut.y = b0.topLeft.y + vb.y*t0; bCollisionOut.z = b0.topLeft.z + vb.z*t0; return true; } else return false; } }

    Read the article

  • Automatically generating Regex from set of strings residing in DB C#

    - by Muhammad Adeel Zahid
    Hello Everyone i have about 100,000 strings in database and i want to if there is a way to automatically generate regex pattern from these strings. all of them are alphabetic strings and use set of alphabets from English letters. (X,W,V) is not used for example. is there any function or library that can help me achieve this target in C#. Example Strings are KHTK RAZ given these two strings my target is to generate a regex that allows patterns like (k, kh, kht,khtk, r, ra, raz ) case insensitive of course. i have downloaded and used some C# applications that help in generating regex but that is not useful in my scenario because i want a process in which i sequentially read strings from db and add rules to regex so this regex could be reused later in the application or saved on the disk. i m new to regex patterns and don't know if the thing i m asking is even possible or not. if it is not possible please suggest me some alternate approach. Any help and suggestions are highly appreciated. regards Adeel Zahid

    Read the article

  • Positioning problem in VIsta when Aero Theme is enabled

    - by Adeel Rehman
    Hi, I have a Windows form which has tab pages. On a Tab Page, I have a Combo Box. When I click the combobox a drop down opens up just below the combo box to give the impression of a drop down. The drop down is a windows form and this is how I set its position Popup.Location = control.PointToScreen(parentcontrol.PointToClient(new System.Drawing.Point(0, control.Height))); Popup = drop down that opens below the combo box (Windows Form) control = my combo box (Combo Box) parentcontrol = the windows form on which the control is present (Parent Form) Problem:- The X coordinate is not plotted correctly on the screen with Aero theme enabled. This works perfectly fine on XP (with some variance in y due to tablelayout panel i assume). But when i use the same code on Vista with Aero theme enabled the x-cordinate wanders away about 20-30 pixels. If I Turn Aero theme off on Vista, it works fine. I have found the X and Y coordiantes calculated in both cases are the same. But the way Vista draws these coordinates on the screen (when aero theme is enabled) is different. Is there any solution to this problem? Thanks, Adeel Rehman.

    Read the article

  • Storing User Information in Session with aspNetMembershipProvider

    - by Muhammad Adeel Zahid
    Hi Everyone, i m developing an application in .NET mvc2. i m using aspnetMembershipProvider for User registration and related activities. i need some custom information about user that i stored in a separate table (sysUser for example) and linked it to aspnetUser table through foreign key. after Login i need to fetch user's credentials from sysUser table and push it to the session. For this Account controller's Logon method seemed best to me and i pasted following code in my Logon ActionResult if (!ValidateLogOn(userName, password)) { return View(); } FormsAuth.SignIn(userName, rememberMe); ApplicationRepository _ApplicationRepository = new ApplicationRepository(); MembershipUser aspUser = Membership.GetUser(userName); SessionUser CurrentUser = _ApplicationRepository.GetUserCredentials(aspUser.ProviderUserKey.ToString()); //Session["CurrentUser"] = CurrentUser; if (!String.IsNullOrEmpty(returnUrl)) { return Redirect(returnUrl); } else { return RedirectToAction("Index", "Home"); } The code is working perfectly for me and put my desired information in the session but the thing is that if a user selects Remember me and on his next visit he won't have to Log in and i would not find my desired information in the Session. Can anyone guide me where should i put my code that stores the user information in the session. any Help is Highly appreciated Regards Adeel

    Read the article

  • ambient values in mvc2.net routing

    - by Muhammad Adeel Zahid
    Hello Everyone, i have following two routes registered in my global.asax file routes.MapRoute( "strict", "{controller}.mvc/{docid}/{action}/{id}", new { action = "Index", id = "", docid = "" }, new { docid = @"\d+"} ); routes.MapRoute( "default", "{controller}.mvc/{action}/{id}", new { action = "Index", id = "" }, new { docConstraint = new DocumentConstraint() } ); and i have a static "dashboard" link in my tabstrip and some other links that are constructed from values in db here is the code <ul id="globalnav" class = "t-reset t-tabstrip-items"> <li class="bar" id = "dashboard"> <%=Html.ActionLink("dash.board", "Index", pck.Controller, new{docid =string.Empty,id = pck.PkgID }, new { @class = "here" })%> </li> <% foreach (var md in pck.sysModules) { %> <li class="<%=liClass%>"> <%=Html.ActionLink(md.ModuleName, md.ActionName, pck.Controller, new { docid = md.DocumentID}, new { @class = cls })%> </li> <% } %> </ul> Now my launching address is localhost/oa.mvc/index/11 clearly matching the 2nd route. but when i visit any page that has mapped to first route and then come back to dash.board link it shows me localhost/oa.mvc/7/index/11 where 7 is docid and picked from previous Url. now i understand that my action method is after docid and changing it would not clear the docid. my question here is that can i remove docid in this scenario without changing the route. regards adeel

    Read the article

  • Dynamic Permissions for roles in Asp.NET mvc

    - by Muhammad Adeel Zahid
    Hello, we have been developing a web application in asp.net mvc. we have scenarios where many actions on web page are dependent upon role of a specific user. For example a memo page has actions of edit, forward, approve, flag etc. these actions are granted to different roles and may be revoked at some later stage. what is the best approach to implement such scenarios in Asp.net mvc framework. i have heard about windows workflow foundation but really have no idea how it works. i m open to any suggestions. regards

    Read the article

  • Why My Adsense Account is not accepted

    - by Muhammad Adeel Zahid
    I have created a blog on blogger few days ago and created two blog entries on it. when i try creating AdSense account with blog's address it does not accept the application due to PageType. i have searched around on the net and found that its probably due to duplicate or insufficient content on the blog but either of my blog entry is more than 2,000 words and i have literally typed 80 percent of its content with only few code blocks copied from other sites. Below is content of email i received as response to my application. Hello, Thank you for your interest in Google AdSense. Unfortunately, after reviewing your application, we're unable to accept you into AdSense at this time. We did not approve your application for the reasons listed below. Issues: - Page Type Further detail: Page Type: In order to participate in Google AdSense, publishers' websites and application information must satisfy the following guidelines: Your website must be your own top-level domain (www.example.com and not www.example.com/mysite). You must provide accurate personal information with your application that matches the information on your domain registration. Your website must contain substantial, original content. Your site must comply with Google AdSense program policies: https://www.google.com/adsense/policies" which include Google's webmaster quality guidelines: http://www.google.com/support/webmasters/bin/answer.py?answer=35769#quality . If your site satisfies the above criteria in the future, please resubmit your application and we'll review it as soon as possible My Personal credentials are also same as they appear in my google account. i can't figure out the problem. Any Help/Suggestion is highly appreciated. regards

    Read the article

  • How can I optimise ext4 for reliability?

    - by amin
    As ext4 was introduced as more reliable than ext3 with block journals, is there any chance to suppose it 100% reliable? What if enabling block journaling on it, which is disabled by default? As friend's guide to explain my case in more detail: I have an embedded linux device, after installation keyboard and monitor is detached and it works standalone. My duty is to make sure it has reliable file-system so with errors there is no way for manual correct faults on device. I can't force my customer to use a ups with each device to ensure no fault by power-failure. What more can ext4 offer me besides block journaling? Thanks in advance.

    Read the article

  • Tiny program to register work hours

    - by amin
    Hi dear ubuntu users. I'm searching for a tiny application to register my working hours so when I come to work and power on my pc it register my entrance and as a power off my pc it register me left. I know it's as simple as adding a note in gedit but I want it automated, phproject has a timer application as you start a task you push start and as you finish calculate time to register fot task , I'm searching for such small timer. thanks

    Read the article

  • how to make ext4 more reliable?

    - by amin
    hi dears as ext4 introduced more reliable than ext3 with block journals, is there any chance to suppose it 100% reliable? what if enabling block journaling on it, which is disabled by default? as friend's guide to explain my case in more detail: i have an embedded linux device, after installation keyboard and monitor is detached and it works standalone. my duty is to make sure it has reliable file-system so with errors there is no way to fsck on device. i can't force my customer to use a ups with each device to ensure no fault by power-failure. what can you offer me more than enabling block journaling? thanks in advance

    Read the article

  • How can I optimise ext4 for reliability?

    - by amin
    As ext4 was introduced as more reliable than ext3 with block journals, is there any chance to suppose it 100% reliable? What if enabling block journaling on it, which is disabled by default? As friend's guide to explain my case in more detail: I have an embedded linux device, after installation keyboard and monitor is detached and it works standalone. My duty is to make sure it has reliable file-system so with errors there is no way for manual correct faults on device. I can't force my customer to use a ups with each device to ensure no fault by power-failure. What more can ext4 offer me besides block journaling? Thanks in advance.

    Read the article

  • ubuntu 12.10 graphic does not works correctly

    - by Amin
    I have installed Ubuntu 12.10 but my graphic does not works correctly. I used this command to installation: sudo apt-get install fglrx fglrx-amdcccle fglrx-dev But after the restarting my system, the side panel and upper one does not appear any more! I guessed it maybe that I used some incompatible packages so I removed the graphic card driver by this command: sudo apt-get purge fglrx fglrx-amdcccle fglrx-dev and tried it from graphical way from system setting > Software Sources > Aditional drivers and choosed the second option then applied change. But the resault waas such as before way!! I belive it is because of the Ubuntu does not know my graphic card. I am using VAIO VPCEA2TGX (N/A) and my graphic cart version is Mobility Radeon HD 5400 Series if it is matter. So now what is the exact problem and what I have to solve this?

    Read the article

  • Sharing same properties of ViewController for iPhone Stroryboard and iPad Story Board

    - by Ruhul Amin
    I'm developing a universal application. in the first view, I have the login screen for the user. In iPhone storyBoard, I have added 2 text field and one button( login check). I have added properties in ViewController.h file by dragging those objects(Ctrl key + Dragg) to .h file. I have added code for login check and it is working fine for iPhone. This is the code in ViewController.h @property (strong, nonatomic) IBOutlet UITextField *txtUserId; @property (strong, nonatomic) IBOutlet UITextField *txtUserPwd; @property (strong, nonatomic) IBOutlet UIButton *btnLogin; In the iPad storyBoard, I have added 2 text field( userid and password) and i button for login. So now, I want to bind those objects with the veriable which I declared already in ViewController.h file in case of iPhone. My questions: 1. What is the right way to bind properties for both storyboard? 2. Am I on the right direction or should I think in a different way to do it? I am new with iPhone development. Please help. Thanks. --Amin

    Read the article

  • dynatree: how can i select child node programmatically

    - by Muhammad Adeel Zahid
    hello everyone i m using jquery's dynaTree in my application and i want to select the all the child nodes programmably when a node is selected. the structure of my tree is as follows <div id = "tree"> <ul> <li>package 1 <ul> <li>module 1.1 <ul> <li> document 1.1.1</li> <li> document 1.1.2</li> </ul> </li> <li>module 1.2 <ul> <li>document 1.2.1</li> <li>document 1.2.2</li> </ul> </li> </ul> </li> <li> package 2 <ul> <li> module 2.1 <ul> <li>document 2.1.1</li> <li>document 2.1.1</li> </ul> </li> </ul> </li> </ul> </div> now what i want is that when i click on tree node with title "package 1" all its child nodes i.e (module 1.1, document 1.1.1, document 1.1.2, module 1.2, document 1.2.1, document 1.2.2) should also be selected below is the approach i tried to use $("#tree").dynatree({ onSelect: function(flag, dtnode) { // This will happen each time a check box is selected/deselected var selectedNodes = dtnode.tree.getSelectedNodes(); var selectedKeys = $.map(selectedNodes, function(node) { //alert(node.data.key); return node.data.key; }); // Set the hidden input field's value to the selected items $('#SelectedItems').val(selectedKeys.join(",")); if (flag) { child = dtnode.childList; alert(child.length); for (i = 0; i < child.length; i++) { var x = child[i].select(true); alert(i); } } }, checkbox: true, onActivate: function(dtnode) { //alert("You activated " + dtnode.data.key); } }); in the if(flag) condition i get all the child nodes of element that is selected by user and it gives me the correct value that i can see from alert(child.length) statement. then i run the loop to select all the children but loop never goes beyond the statement var x = child[i].select(true); and i can never see the statement alert(i) being executed. the result of above statement is that if i select package 1, module 1.1 and document 1.1.1 is also selected but never does it execute alert(i) statement neither other children of package 1 are selected. in my view when first time child[i].select(true) statement is executed it also triggers the on select event of its children thus making a recursion kind of thing is my thinking correct? no matter recursion or what why on earth does it not complete the loop and execute very next instruction alert(i). please help me in solving this problem. i m dying to see that alert any suggestion and help is highly appriciated thanks Adeel

    Read the article

  • running csync2 in stand-alone server mode gives error

    - by amin
    I installed csync2 on two ubuntu node as documentation in http://oss.linbit.com/csync2/paper.pdf. when i use a one-shot command csync2 -xv every thing goes well. but when i try to run csync2 in stand-alone server mode i get error: Server error: Address already in use. i searched over net and no documentation found on this problem, even tracing code and grep in files didn't get any result of problem source. do you have any idea?

    Read the article

  • Having trouble Getting "RTSP over HTTP"

    - by Muhammad Adeel Zahid
    There is an axis camera that is connected to our site (camba.tv) through axis one click connection component (which acts as proxy). We can communicate with this camera only through http by setting the proxy to our OCCC server's address. If we want to get RTSP streams (h.264) we are only left with "RTSP over HTTP" option. For this I have followed axis VAPIX 3 documentation section 3.3. I issue requests through fiddler but don't get any response. But when i put the URL (axrtsphttp://1.00408CBEA38B/axis-media/media.amp) in windows media player (with proxy set to OCCC server 212.78.237.156:3128) the player is able to get RTSP stream over HTTP after logging in. I have created a request trace of communication between camera and windows media player through wireshark and the request that brings the stream looks like http://1.00408cbea38b/axis-media/media.amp HTTP/1.1 x-sessioncookie: 619 User-Agent: Axis AMC Host: 1.00408CBEA38B Proxy-Connection: Keep-Alive Pragma: no-cache Authorization: Digest username="root",realm="AXIS_00408CBEA38B",nonce="000a8b40Y0100409c13ac7e6cceb069289041d8feb1691",uri="/axis-media/media.amp",cnonce="9946e2582bd590418c9b70e1b17956c7",nc=00000001,response="f3cab86fc84bfe33719675848e7fdc0a",qop="auth" HTTP/1.0 200 OK Content-Type: application/x-rtsp-tunnelled Date: Tue, 02 Nov 2010 11:45:23 GMT RTSP/1.0 200 OK CSeq: 1 Content-Type: application/sdp Content-Base: rtsp://1.00408CBEA38B/axis-media/media.amp/ Date: Tue, 02 Nov 2010 11:45:23 GMT Content-Length: 410 v=0 o=- 1288698323798001 1288698323798001 IN IP4 1.00408CBEA38B s=Media Presentation e=NONE c=IN IP4 0.0.0.0 b=AS:50000 t=0 0 a=control:* a=range:npt=0.000000- m=video 0 RTP/AVP 96 b=AS:50000 a=framerate:30.0 a=transform:1,0,0;0,1,0;0,0,1 a=control:trackID=1 a=rtpmap:96 H264/90000 a=fmtp:96 packetization-mode=1; profile-level-id=420029; sprop-parameter-sets=Z0IAKeNQFAe2AtwEBAaQeJEV,aM48gA== RTSP/1.0 200 OK CSeq: 2 Session: 3F4763D8; timeout=60 Transport: RTP/AVP/TCP;unicast;interleaved=0-1;ssrc=060922C6;mode="PLAY" Date: Tue, 02 Nov 2010 11:45:24 GMT RTSP/1.0 200 OK CSeq: 3 Session: 3F4763D8 Range: npt=0- RTP-Info: url=rtsp://1.00408CBEA38B/axis-media/media.amp/trackID=1;seq=7392;rtptime=4190934902 Date: Tue, 02 Nov 2010 11:45:24 GMT [Binary Stream Content] But when i copy this request to fiddler, I only get 200 status code with content-type set to application/x-rtsp-tunneled and there is no stream data. The only thing i do different with stream is to use Basic in authorization header instead of Digest and I do not get 401 (Un authorized) status code. Can anyone explain what's happening here? How can I write request sequences to get stream in fiddler? If it is needed, I can upload the wireshark request dump somewhere.

    Read the article

  • VMWare steals IP addresses

    - by Ishan Amin
    I'm having a peculiar problem, that I think I have narrowed down to VMware. For the past one year, every once in a while we lose internet connection and not all users (about 10 users) go down at the same time, its usually one-by-one. First someone will call me and say "Internet is down" and then we would go reset the router and modem and switch and it would be working again for a while, then go down again without any pattern or replicatable sequence. We'd go repeat the steps again to get everyone in the office running again. We called our Internet Service Provider and they constantly say, We see your modem and we see your router and from thier end everything is OK. we replaced our router and switch and modem, twice! Last friday, it dawned upon me, that everytime we turn on a VMware machine, this sequence of taking everyone down starts, which also explains the message that my users get for "IP Conflict Found" So we do alot of VMware testing and lo and behold, it takes my Internet down. My Yahoo and Gtalk would continue working but www is down when the VMware machines are started. I do use bridged networking to all the VMware machines, but I dont know what else to set it at. now, sorry for this long rambling but anyone have any clue on how to stop this? thanks IA

    Read the article

  • Trouble with AABB collision response and physics

    - by WCM
    I have been racking my brain trying to figure out a problem I am having with physics and basic AABB collision response. I am fairly close as the physics are mostly right. Gravity feels good and movement is solid. The issue I am running into is that when I land on the test block in my project, I can jump off of it most of the time. If I repeatedly jump in place, I will eventually get stuck one or two pixels below the surface of the test block. If I try to jump, I can become free of the other block, but it will happen again a few jumps later. I feel like I am missing something really obvious with this. I have two functions that support the detection and function to return a vector for the overlap of the two rectangle bounding boxes. I have a single update method that is processing the physics and collision for the entity. I feel like I am missing something very simple, like an ordering of the physics vs. collision response handling. Any thoughts or help can be appreciated. I apologize for the format of the code, tis prototype code mostly. The collision detection function: public static bool Collides(Rectangle source, Rectangle target) { if (source.Right < target.Left || source.Bottom < target.Top || source.Left > target.Right || source.Top > target.Bottom) { return false; } return true; } The overlap function: public static Vector2 GetMinimumTranslation(Rectangle source, Rectangle target) { Vector2 mtd = new Vector2(); Vector2 amin = source.Min(); Vector2 amax = source.Max(); Vector2 bmin = target.Min(); Vector2 bmax = target.Max(); float left = (bmin.X - amax.X); float right = (bmax.X - amin.X); float top = (bmin.Y - amax.Y); float bottom = (bmax.Y - amin.Y); if (left > 0 || right < 0) return Vector2.Zero; if (top > 0 || bottom < 0) return Vector2.Zero; if (Math.Abs(left) < right) mtd.X = left; else mtd.X = right; if (Math.Abs(top) < bottom) mtd.Y = top; else mtd.Y = bottom; // 0 the axis with the largest mtd value. if (Math.Abs(mtd.X) < Math.Abs(mtd.Y)) mtd.Y = 0; else mtd.X = 0; return mtd; } The update routine (gravity = 0.001f, jumpHeight = 0.35f, moveAmount = 0.15f): public void Update(GameTime gameTime) { Acceleration.Y = gravity; Position += new Vector2((float)(movement * moveAmount * gameTime.ElapsedGameTime.TotalMilliseconds), (float)(Velocity.Y * gameTime.ElapsedGameTime.TotalMilliseconds)); Velocity.Y += Acceleration.Y; Vector2 previousPosition = new Vector2((int)Position.X, (int)Position.Y); KeyboardState keyboard = Keyboard.GetState(); movement = 0; if (keyboard.IsKeyDown(Keys.Left)) { movement -= 1; } if (keyboard.IsKeyDown(Keys.Right)) { movement += 1; } if (Position.Y + 16 > GameClass.Instance.GraphicsDevice.Viewport.Height) { Velocity.Y = 0; Position = new Vector2(Position.X, GameClass.Instance.GraphicsDevice.Viewport.Height - 16); IsOnSurface = true; } if (Collision.Collides(BoundingBox, GameClass.Instance.block.BoundingBox)) { Vector2 mtd = Collision.GetMinimumTranslation(BoundingBox, GameClass.Instance.block.BoundingBox); Position += mtd; Velocity.Y = 0; IsOnSurface = true; } if (keyboard.IsKeyDown(Keys.Space) && !previousKeyboard.IsKeyDown(Keys.Space)) { if (IsOnSurface) { Velocity.Y = -jumpHeight; IsOnSurface = false; } } previousKeyboard = keyboard; } This is also a full download to the project. https://www.box.com/s/3rkdtbso3xgfgc2asawy P.S. I know that I could do this with the XNA Platformer Starter Kit algo, but it has some deep flaws that I am going to try to live without. I'd rather go the route of collision response via an overlay function. Thanks for any and all insight!

    Read the article

  • How to get twitter user timeline in C# using Twitterizer

    - by Adeel
    i have the following code. Twitter t1 = new Twitter("twitteruser","password"); TwitterUser user = t1.User.Show("username"); if (user != null) { TwitterParameters param = new TwitterParameters(); param.Add(TwitterParameterNames.UserID, user.ID); TwitterStatusCollection t =t1.Status.UserTimeline(param); } In the above code, I want to get user timeline. I am using Twitterizer API. The twitter documentation for getting timeline of user is Here I have checked the fiddler whats going on. In fiddler the request is : http://api.twitter.com/1/direct_messages.xml?user_id=xxxxx while i am expecting http://twitter.com/statuses/user_timeline.format Is anything left which i miss.

    Read the article

  • VMWare steals IP addresses [closed]

    - by Ishan Amin
    I'm having a peculiar problem, that I think I have narrowed down to VMware. For the past one year, every once in a while we lose internet connection and not all users (about 10 users) go down at the same time, its usually one-by-one. First someone will call me and say "Internet is down" and then we would go reset the router and modem and switch and it would be working again for a while, then go down again without any pattern or replicatable sequence. We'd go repeat the steps again to get everyone in the office running again. We called our Internet Service Provider and they constantly say, We see your modem and we see your router and from thier end everything is OK. we replaced our router and switch and modem, twice! Last friday, it dawned upon me, that everytime we turn on a VMware machine, this sequence of taking everyone down starts, which also explains the message that my users get for "IP Conflict Found" So we do alot of VMware testing and lo and behold, it takes my Internet down. My Yahoo and Gtalk would continue working but www is down when the VMware machines are started. I do use bridged networking to all the VMware machines, but I dont know what else to set it at. now, sorry for this long rambling but anyone have any clue on how to stop this? thanks IA

    Read the article

  • XStream or Simple

    - by Adeel Ansari
    I need to decide on which one to use. My case is pretty simple. I need to convert a simple POJO/Bean to XML, and then back. Nothing special. One thing I am looking for is it should include the parent properties as well. Best would be if it can work on super type, which can be just a marker interface. If anyone can compare these two with cons and pros, and which thing is missing in which one. I know that XStream supports JSON too, thats a plus. But Simple looked simpler in a glance, if we set JSON aside. Whats the future of Simple in terms of development and community? XStream is quite popular I believe, even the word, "XStream", hit many threads on SO. Thanks.

    Read the article

  • Glassfish: Defining Custom JNDI Names for Session Beans

    - by Adeel Ansari
    Background: Want to use GF3 in development, where as actual SIT, UAT, and production is using WAS. Problem: With the remote session beans everything is good to go, as GF3 gives a non-standard JNDI name, which is same as what WAS suggests, i.e. an absolute class name. Now for the local session beans WAS use the same absolute class name but with the prefix, i.e. ejblocal:. Whereas GF3 doesn't give any non-standard JNDI name for local session beans. GF3 came up with only portable name, java:global/..I need to find a way so I can use the same names for both. I am using EJB 3.0, WAS 7.9, and Glassfish 3. Don't have any xml confiuration for ejbs. Using Spring to inject the bean in Struts2 actions. With remote interfaces both servers are okay and agreed on a single convention, but for locals they differ. Is there any solution for this? Or just sun-ejb-jar.xml will solve it? Thanks.

    Read the article

1 2  | Next Page >