Daily Archives

Articles indexed Saturday July 7 2012

Page 3/15 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Configuring httpd.conf to handle wildcard domains and multiple scripts?

    - by Steve
    I have a full-blown site like: http://www.example.com (uses index.php) http://www.example.com/scriptA.php http://www.example.com/scriptB.php I now want to have the possibility of setting up subsites like: http://alpha.example.com http://alpha.example.com/scriptA.php http://alpha.example.com/scriptB.php From http://stackoverflow.com/questions/2844004/subdomain-url-rewriting-and-web-apps/2844033#2844033 , I understand that I have to do: RewriteCond %{HTTP_HOST} ^([^./]+)\.example\.com$ RewriteCond %1 !=www RewriteRule ^ index.php?domain=%1 But what about the other scripts like scriptA and scriptB? How do I tell httpd.conf to handle those properly as well? How can I tell httpd.conf that handle everything after the 'forwardslash', exactly as it does on the main site, but pass a parameter flag like ?domain=alpha (Cross posted at: http://stackoverflow.com/questions/11365566/configuring-httpd-conf-to-handle-wildcard-domains-and-multiple-scripts)

    Read the article

  • Canonical url for a home page and trailing slashes

    - by serg
    My home page could be potentially linked as: http://example.com http://example.com/ http://example.com/?ref=1 http://example.com/index.html http://example.com/index.html?ref=2 (the same page is served for all those urls) I am thinking about defining a canonical url to make sure google doesn't consider those urls to be different pages: <link rel="canonical" href="/" /> (relative) <link rel="canonical" href="http://example.com/" /> (trailing slash) <link rel="canonical" href="http://example.com" /> (no trailing slash) Which one should be used? I would just slap / but messing with canonical seems like a scary business so I wanted double check first. Is it a good idea at all for defining a canonical url for a home page?

    Read the article

  • 2D Tile Based Collision Detection

    - by MrPlosion1243
    There are a lot of topics about this and it seems each one addresses a different problem, this topic does the same. I was looking into tile collision detection and found this where David Gouveia explains a great way to get around the person's problem by separating the two axis. So I implemented the solution and it all worked perfectly from all the testes I through at it. Then I implemented more advanced platforming physics and the collision detection broke down. Unfortunately I have not been able to get it to work again which is where you guys come in :)! I will present the code first: public void Update(GameTime gameTime) { if(Input.GetKeyDown(Keys.A)) { velocity.X -= moveAcceleration; } else if(Input.GetKeyDown(Keys.D)) { velocity.X += moveAcceleration; } if(Input.GetKeyDown(Keys.Space)) { if((onGround && isPressable) || (!onGround && airTime <= maxAirTime && isPressable)) { onGround = false; airTime += (float)gameTime.ElapsedGameTime.TotalSeconds; velocity.Y = initialJumpVelocity * (1.0f - (float)Math.Pow(airTime / maxAirTime, Math.PI)); } } else if(Input.GetKeyReleased(Keys.Space)) { isPressable = false; } if(onGround) { velocity.X *= groundDrag; velocity.Y = 0.0f; } else { velocity.X *= airDrag; velocity.Y += gravityAcceleration; } velocity.Y = MathHelper.Clamp(velocity.Y, -maxFallSpeed, maxFallSpeed); velocity.X = MathHelper.Clamp(velocity.X, -maxMoveSpeed, maxMoveSpeed); position += velocity * (float)gameTime.ElapsedGameTime.TotalSeconds; position = new Vector2((float)Math.Round(position.X), (float)Math.Round(position.Y)); if(Math.Round(velocity.X) != 0.0f) { HandleCollisions2(Direction.Horizontal); } if(Math.Round(velocity.Y) != 0.0f) { HandleCollisions2(Direction.Vertical); } } private void HandleCollisions2(Direction direction) { int topTile = (int)Math.Floor((float)Bounds.Top / Tile.PixelTileSize); int bottomTile = (int)Math.Ceiling((float)Bounds.Bottom / Tile.PixelTileSize) - 1; int leftTile = (int)Math.Floor((float)Bounds.Left / Tile.PixelTileSize); int rightTile = (int)Math.Ceiling((float)Bounds.Right / Tile.PixelTileSize) - 1; for(int x = leftTile; x <= rightTile; x++) { for(int y = topTile; y <= bottomTile; y++) { Rectangle tileBounds = new Rectangle(x * Tile.PixelTileSize, y * Tile.PixelTileSize, Tile.PixelTileSize, Tile.PixelTileSize); Vector2 depth; if(Tile.IsSolid(x, y) && Intersects(tileBounds, direction, out depth)) { if(direction == Direction.Horizontal) { position.X += depth.X; } else { onGround = true; isPressable = true; airTime = 0.0f; position.Y += depth.Y; } } } } } From the code you can see when velocity.X is not equal to zero the HandleCollisions() Method is called along the horizontal axis and likewise for the vertical axis. When velocity.X is not equal to zero and velocity.Y is equal to zero it works fine. When velocity.Y is not equal to zero and velocity.X is equal to zero everything also works fine. However when both axis are not equal to zero that's when it doesn't work and I don't know why. I basically teleport to the left side of a tile when both axis are not equal to zero and there is a air block next to me. Hopefully someone can see the problem with this because I sure don't as far as I'm aware nothing has even changed from what I'm doing to what the linked post's solution is doing. Thanks.

    Read the article

  • Is the June 2010 DX SDK really the latest?

    - by Ryan
    I have not been involved in game development, using the DirectX SDK, since around 2008. From the looks of it, the June 2010 release, of the DirectX SDK, is still the latest release. This release is more than two years ago, based on the name. Is this still the latest release, or has there been a naming convention change and I am missing something newer? I've seen mention of it being rolled into a Windows SDK, so I am confused and figured I would come here to ask. Thanks

    Read the article

  • OpenGL ES 2.0 texture distortion on large geometry

    - by Spruce
    OpenGL ES 2.0 has serious precision issues with texture sampling - I've seen topics with a similar problem, but I haven't seen a real solution to this "distorted OpenGL ES 2.0 texture" problem yet. This is not related to the texture's image format or OpenGL color buffers, it seems like it's a precision error. I don't know what specifically causes the precision to fail - it doesn't seem like it's just the size of geometry that causes this distortion, because simply scaling vertex position passed to the the vertex shader does not solve the issue. Here are some examples of the texture distortion: Distorted Texture (on OpenGL ES 2.0): http://i47.tinypic.com/3322h6d.png What the texture normally looks like (also on OpenGL ES 2.0): http://i49.tinypic.com/b4jc6c.png The texture issue is limited to small scale geometry on OpenGL ES 2.0, otherwise the texture sampling appears normal, but the grainy effect gradually worsens the further the vertex data is from the origin of XYZ(0,0,0) These texture issues do not occur on desktop OpenGL (works fine under Windows XP, Windows 7, and Mac OS X) I've only seen the problem occur on Android, iPhone, or WebGL(which is similar to OpenGL ES 2.0) All textures are power of 2 but the problem still occurs Scaling the vertex data - The values of a vertex's X Y Z location are in the range of: -65536 to +65536 floating point I realized this was large, so I tried dividing the vertex positions by 1024 to shrink the geometry and hopefully get more accurate floating point precision, but this didn't fix or lessen the texture distortion issue Scaling the modelview or scaling the projection matrix does not help Changing texture filtering options does not help Disabling mipmapping, or using GL_NEAREST/GL_LINEAR does nothing Enabling/disabling anisotropic does nothing The banding effect still occurs even when using GL_CLAMP Dividing the texture coords passed to the vertex shader and then multiplying them back to the correct values in the fragment shader, also does not work precision highp sampler2D, highp float, highp int - in the fragment or the vertex shader didn't change anything (lowp/mediump did not work either) I'm thinking this problem has to have been solved at one point - Seeing that OpenGL ES 2.0 -based games have been able to render large-scale, highly detailed geometry

    Read the article

  • Blender 2.6: How to Merge the Pros of Meshes and Surfaces

    - by fridojet
    there are two interesting kinds of objects: Meshes and Surfaces. Each of them offers very cool features. Object Type Specific Features Nice Features of Surfaces: (for example) They're as scalable as vector graphics (really nice!) You can build winding things real simply. Nice Features of Meshes: (for example) You can build organic things really good using the Sculpt Mode and a graphic tablet. You can use some special things like Physics. My Question There are things for which Surfaces are better and things for which Meshes are better. But how can I use both the best features of Surfaces and the best features of Meshes on one object at once? For example: How can I use Physics (like on Meshes) on lossless scalable objects (like Surfaces)? Thanks.

    Read the article

  • Deterministic Multiplayer RTS game questions?

    - by Martin K
    I am working on a cross-platform multiplayer RTS game where the different clients and a server(flash and C#), all need to stay deterministically synchronised. To deal with Floatpoint inconsistencies, I've come across this method: http://joshblog.net/2007/01/30/flash-floating-point-number-errors/#comment-49912 which basically truncates off the nondeterministic part: return Math.round(1000 * float) / 1000; Howewer my concern is that every time there is a division, there is further chance of creating additional floatpoint errors, in essence making it worse? . So it occured to me, how about something like this: function floatSafe(number:Number) : Number {return Math.round(float* 1024) / 1024; } ie dividing with only powers of 2 ? What do you think? . Ironically with the above method I got less accurate results: trace( floatSafe(3/5) ) // 0.599609375 where as with the other method(dividing with 1000), or just tracing the raw value I am getting 3/5 = 0.6 or Maybe thats what 3/5 actually is, IE 0.6 cannot really be represented with a floatpoint datatype, and would be more consistent across different platforms?

    Read the article

  • How to deploy Document Set using CAML in SharePoint2010 solution package

    - by ybbest
    In my last post, I showed you how to use Document Set using SharePoint UI in the browser. In this post, I’d like to show you how to create the same Document Set using CAML and SharePoint solution package. You can download the complete solution here. 1. Create the Application Number site column using the SharePoint empty element item template in VS2010 <?xml version="1.0" encoding="utf-8"?> <Elements xmlns="http://schemas.microsoft.com/sharepoint/"> <Field Type="Text" DisplayName="ApplicationNumber" Required="FALSE" EnforceUniqueValues="FALSE" Indexed="FALSE" MaxLength="255" Group="YBBEST" ID="{916bf3af-5ec1-4441-acd8-88ff62ab1b7e}" Name="ApplicationNumber" ></Field> </Elements> 2. Create the Loan Application Form and Loan Contract Form content types. <?xml version="1.0" encoding="utf-8"?> <Elements xmlns="http://schemas.microsoft.com/sharepoint/"> <!-- Parent ContentType: Document (0x0101) --> <ContentType ID="0x0101005dfbf820ce3c49f69c73a00e0e0e53f6" Name="Loan Contract Form" Group="YBBEST" Description="Loan Contract Form" Inherits="TRUE" Version="0"> <FieldRefs> <FieldRef ID="916bf3af-5ec1-4441-acd8-88ff62ab1b7e" Name="ApplicationNumber" DisplayName="ApplicationNumber" /> </FieldRefs> </ContentType> <!-- Parent ContentType: Document (0x0101) --> <ContentType ID="0x010100f3016e3d03454b93bc4d6ab63941c0d2" Name="Loan Application Form" Group="YBBEST" Description="Loan Application Form" Inherits="TRUE" Version="0"> <FieldRefs> <FieldRef ID="916bf3af-5ec1-4441-acd8-88ff62ab1b7e" Name="ApplicationNumber" DisplayName="ApplicationNumber" /> </FieldRefs> </ContentType> </Elements> 3. Create the Loan Application Document Set. 4. Create the Document Set Welcome Page using the SharePoint Module item template. Notes: 1.When creating document set content type , you need to set the  Inherits=”FALSE”  or remove the  Inherits=”TRUE” from the content type definition (default is  Inherits=”FALSE”) . This is the Document Set limitation in the current version of SharePoint2010. Because of this , you also need to manually  attach the event receiver and  Document Set welcome page to your custom Document Set Content Type. 2. Shared Fields are push down only: 3. Not available in SharePoint foundation (only SharePoint Server 2010). 4. You can’t have folders within document sets (you can place document sets in folders though). For a complete limitation and considerations , you can see the references for details. References: Document Set Limitations and Considerations in SharePoint 2010 1 Document Set Limitations and Considerations in SharePoint 2010 2 Document Sets planning (SharePoint Server 2010) Import Document Sets Issue http://msdn.microsoft.com/en-us/library/gg581064.aspx http://channel9.msdn.com/Events/TechEd/NorthAmerica/2010/OSP305 DocumentSet Class

    Read the article

  • Detectig by how much user has scrolled

    - by Sean
    I have an image pop-up ability on my website (see this screenshot), in order to show users the full resolution picture when they click on a smaller version on the page. This is the current CSS that positions it: div#enlargedImgWrapper { position: absolute; top: 30px; left: 55px; z-index: 999; } The problem now is that if I click on an image further down the page, the window still appears in the top left corner of the page, where I can't see it until I scroll back up. I need it to appear relative to the window, whatever its current position relative to the document is. Note: I don't want to use position: fixed; as some images might be taller than the screen, so I want users to be able to scroll along the image as well. My idea was to use JS to change the top value: var scrollValue = ???; document.getElementById('enlargedImgWrapper').style.top = scrollValue+30 + 'px'; How can I detect by how much the user has scrolled down the page (var scrollValue)? Or is there a 'better' way to do this? Thanks!

    Read the article

  • Database Documentation with `SQL Doc 2`

    - by mehdi lotfi
    I use SQL Doc 2 for documentation my database. But this tools not support following expect : Add diagrams in documentation. Add Additional description for each object such as tables, columns and etc. Customize output format. Add custom link for each object. Add Analyze business description of created tables, columns and etc Some time need to explain records of each table such as records of literal tables. How Can support above request in SQL Doc 2? Do exists a tools for documentation database with above request?

    Read the article

  • building website with menu without using frames

    - by kms333
    With Dreamweaver, I use frames to define a left column menu, and clicking on each menu tab would change the html page displayed on the right frame. However, webdesign tools such as kompozer do not support frames. 1 - What is the best way to design a html personal webpage with such menu bars, without using frames ? 2 - If html is not enough, what other scripting languages would you recommend to learn for someone with Java background and have basic knowledge of html and css. 3 - What web-design tools would you recommend to build a personal website ?

    Read the article

  • Javascript Animation Toogle

    - by user1507270
    I am new to JavaScript (I had some lessons in school but those were basically basics of all basics :) ) and I am seeking for help with this animation made from scratch. Here is a code that I wrote: http://jsfiddle.net/bPZeH/1/. What it basically does is that it animates height of one div. What I would like to know is, how to write the function startAnimation(), so that if I click on the div while it is being animated, it will reverse animation (for instance: instead of animating height from 150px to 400px it will stop at the current value and then animate back to 150px). I basically want to make toogle from one value to the other. It would also be okay if it were able to toogle only after the animation has finished, but I would prefer the first option. Thanky you very much.

    Read the article

  • jquery use of :last and val()

    - by dole doug
    I'm trying to run the code from http://jsfiddle.net/ddole/AC5mP/13/ on my machine and the approach I've use is below or here. Do you know why that code doesn't work on my machine. Firebug doesn't help me and I can't solve the problem. I think that I need another pair of eyes :((( <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>jQuery UI Dialog - Modal form</title> <link type="text/css" href="css/ui-lightness/jquery-ui-1.8.21.custom.css" rel="stylesheet" /> <script type="text/javascript" src="js/jquery-1.7.2.min.js"></script> <script type="text/javascript" src="js/jquery-ui-1.8.21.custom.min.js"></script> <script type="text/javascript" > jQuery(function($) { $('.helpDialog').hide(); $('.helpButton').each(function() { $.data(this, 'dialog', $(this).next('.helpDialog').dialog({ autoOpen: false, modal: true, width: 300, height: 250, buttons: { "Save": function() { alert($('.helpText:last').val()); $(this).dialog( "close" ); }, Cancel: function() { $(this).dialog( "close" ); } } }) ); }).click(function() { $.data(this, 'dialog').dialog('open'); return false; }); }); </script> </head> <body> <span class="helpButton">Button</span> <div class="helpDialog"> <input type="text" class="helpText" /> </div> <span class="helpButton">Button 2</span> <div class="helpDialog"> <input type="text" class="helpText" /> </div> <span class="helpButton">Button 3</span> <div class="helpDialog"> <input type="text" class="helpText" /> </div> <span class="helpButton">Button 4</span> <div class="helpDialog"> <input type="text" class="helpText" /> </div> <span class="helpButton">Button 5</span> <div class="helpDialog"> <input type="text" class="helpText" /> </div> </body>

    Read the article

  • Using Pastebin API in Node.js

    - by wiill
    I've been trying to post a paste to Pastebin in Node.js, but it appears that I'm doing it wrong. I'm getting a Bad API request, invalid api_option, however I'm clearly setting the api_option to paste like the documentation asks for. var http = require('http'); var qs = require('qs'); var query = qs.stringify({ api_option: 'paste', api_dev_key: 'xxxxxxxxxxxx', api_paste_code: 'Awesome paste content', api_paste_name: 'Awesome paste name', api_paste_private: 1, api_paste_expire_date: '1D' }); var req = http.request({ host: 'pastebin.com', port: 80, path: '/api/api_post.php', method: 'POST', headers: { 'Content-Type': 'multipart/form-data', 'Content-Length': query.length } }, function(res) { var data = ''; res.on('data', function(chunk) { data += chunk; }); res.on('end', function() { console.log(data); }); }); req.write(query); req.end(); console.log(query) confirms that the string is well encoded and that api_option is there and set to paste. Now, I've been searching forever on possible causes. I also tried setting the encoding on the write req.write(query, 'utf8') because the Pastebin API mentions that the POST must be UTF-8 encoded. I rewrote the thing over and over and re-consulted the Node HTTP documentation many times. I'm pretty sure I completely missed something here, because I don't see how this could fail. Does anyone have an idea of what I have done wrong?

    Read the article

  • Get touches from UIScrollView

    - by Peter Lapisu
    Basically i want to subclass UIScrollView and hande the touches, however, the touch methods dont get called (i searched the web for a solution and i found out people pointing to override the hit test, what i did, but with no result :( ) .h @interface XScroller : UIScrollView @end .m - (UIView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event { UIView *result = nil; for (UIView *child in self.subviews) { if ([child pointInside:point withEvent:event]) { if ((result = [child hitTest:point withEvent:event]) != nil) { break; } } } return result; } - (void) touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { NSLog(@"BEGAN"); [super touchesBegan:touches withEvent:event]; } - (void) touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event { NSLog(@"MOVED"); [super touchesMoved:touches withEvent:event]; } - (void) touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event { NSLog(@"ENDED"); [super touchesEnded:touches withEvent:event]; } - (void) touchesCancelled:(NSSet *)touches withEvent:(UIEvent *)event { NSLog(@"CANCELED"); [super touchesCancelled:touches withEvent:event]; } none of the - (void) touches* methods get called, the scrolling works ok

    Read the article

  • Prevent Javascript Execution in JQuery html()

    - by Mahan
    well i do have a div that contains some more html and a lot of javascript on it <div id="mydiv"> <p>Hello Philippines</p> my first time in Philippines is nice <script type="text/javascript">alert("how was it became nice?");</script> well i experienced a lot of things <script type="text/javascript">alert("and how about your Japan's trip?");</script> well its more nicer ^^ but both countries are good! hahah </div> now what i want there is to put the non-javascript code and javascript code in two separate variables var html = $("#mydiv").html(); but my problem here is my javascript is executing..which makes me stop to create the code i want which is the storing of javascript and non-javascript to two different variables. now my questions is how can i stop the javascript codes from executing when they are get inside the div? how can i store the javascript and non-javascript code into two different variables safely? NOTE: i need the stored javascript for later execution

    Read the article

  • passing data from a client form via jquery ajax dinamicly

    - by quantum62
    i wanna insert specification of members that enter in textboxs of form in the database .i do this operation with jquery ajax when i call webmetod with static value the operation do successfully.for example this code is ok. $.ajax({ type: "POST", url:"MethodInvokeWithJQuery.aspx/executeinsert", data: '{ "username": "user1", "name":"john","family":"michael","password":"123456","email": "[email protected]", "tel": "123456", "codemeli": "123" }', contentType: "application/json; charset=utf-8", dataType: "json", async: true, cache: false, success: function (msg) { $('#myDiv2').text(msg.d); }, error: function (x, e) { alert("The call to the server side failed. " + x.responseText); } } ); but when i wanna use of values that enter in textboxes dynamically error occur.whats problem?i try this two code <script type="text/javascript"> $(document).ready( function () { $("#Button1").click( function () { var username, family, name, email, tel, codemeli, password; username = $('#<%=TextBox1.ClientID%>').val(); name = $('#<%=TextBox2.ClientID%>').val(); family = $('#<%=TextBox3.ClientID%>').val(); password = $('#<%=TextBox4.ClientID%>').val(); email = $('#<%=TextBox5.ClientID%>').val(); tel = $('#<%=TextBox6.ClientID%>').val(); codemeli = $('#<%=TextBox7.ClientID%>').val(); $.ajax( { type: "POST", url: "WebApplication20.aspx/executeinsert", data: "{'username':'username','name':name, 'family':family,'password':password, 'email':email,'tel':tel, 'codemeli':codemeli}", contentType: "application/json;charset=utf-8", dataType: "json", async: true, cache: false, success: function(msg) { alert(msg); }, error: function (x, e) { alert("The call to the server side failed. " + x.responseText); } } ); } ) }) </script> or $(document).ready( function () { $("#Button1").click( function () { var username, family, name, email, tel, codemeli, password; username = $('#<%=TextBox1.ClientID%>').val(); name = $('#<%=TextBox2.ClientID%>').val(); family = $('#<%=TextBox3.ClientID%>').val(); password = $('#<%=TextBox4.ClientID%>').val(); email = $('#<%=TextBox5.ClientID%>').val(); tel = $('#<%=TextBox6.ClientID%>').val(); codemeli = $('#<%=TextBox7.ClientID%>').val(); $.ajax( { type: "POST", url: "WebApplication20.aspx/executeinsert", data: '{"username" : '+username+', "name": '+name+', "family": '+family+', "password": '+password+', "email": '+email+', "tel": '+tel+' , "codemeli": '+codemeli+'}', contentType: "application/json;charset=utf-8", dataType: "json", async: true, cache: false, success: function(msg) { alert(msg); }, error: function (x, e) { alert("The call to the server side failed. " + x.responseText); } } ); } ) })

    Read the article

  • Android JSon Array is not working with Maplocations class

    - by user1505962
    I am developing a map application in android i have made maplocation class to pass latitude and longitude and using Json Array to fetch data from MYSQl to display in map.But When I run application it crashed unfortunantely here is my log cat 07-07 14:02:26.423: E/AndroidRuntime(366): FATAL EXCEPTION: main 07-07 14:02:26.423: E/AndroidRuntime(366): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.icons.draw.view/com.icons.draw.view.DrawIcons}: android.view.InflateException: Binary XML file line #6: Error inflating class com.icons.draw.view.LocationViewers 07-07 14:02:26.423: E/AndroidRuntime(366): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1647) 07-07 14:02:26.423: E/AndroidRuntime(366): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1663) 07-07 14:02:26.423: E/AndroidRuntime(366): at android.app.ActivityThread.access$1500(ActivityThread.java:117) 07-07 14:02:26.423: E/AndroidRuntime(366): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:931) 07-07 14:02:26.423: E/AndroidRuntime(366): at android.os.Handler.dispatchMessage(Handler.java:99) 07-07 14:02:26.423: E/AndroidRuntime(366): at android.os.Looper.loop(Looper.java:130) 07-07 14:02:26.423: E/AndroidRuntime(366): at android.app.ActivityThread.main(ActivityThread.java:3683) 07-07 14:02:26.423: E/AndroidRuntime(366): at java.lang.reflect.Method.invokeNative(Native Method) 07-07 14:02:26.423: E/AndroidRuntime(366): at java.lang.reflect.Method.invoke(Method.java:507) 07-07 14:02:26.423: E/AndroidRuntime(366): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839) 07-07 14:02:26.423: E/AndroidRuntime(366): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597) 07-07 14:02:26.423: E/AndroidRuntime(366): at dalvik.system.NativeStart.main(Native Method) 07-07 14:02:26.423: E/AndroidRuntime(366): Caused by: android.view.InflateException: Binary XML file line #6: Error inflating class com.icons.draw.view.LocationViewers 07-07 14:02:26.423: E/AndroidRuntime(366): at android.view.LayoutInflater.createView(LayoutInflater.java:518) 07-07 14:02:26.423: E/AndroidRuntime(366): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:570) 07-07 14:02:26.423: E/AndroidRuntime(366): at android.view.LayoutInflater.rInflate(LayoutInflater.java:623) 07-07 14:02:26.423: E/AndroidRuntime(366): at android.view.LayoutInflater.inflate(LayoutInflater.java:408) 07-07 14:02:26.423: E/AndroidRuntime(366): at android.view.LayoutInflater.inflate(LayoutInflater.java:320) 07-07 14:02:26.423: E/AndroidRuntime(366): at android.view.LayoutInflater.inflate(LayoutInflater.java:276) 07-07 14:02:26.423: E/AndroidRuntime(366): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:207) 07-07 14:02:26.423: E/AndroidRuntime(366): at android.app.Activity.setContentView(Activity.java:1657) 07-07 14:02:26.423: E/AndroidRuntime(366): at com.icons.draw.view.DrawIcons.onCreate(DrawIcons.java:16) 07-07 14:02:26.423: E/AndroidRuntime(366): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047) 07-07 14:02:26.423: E/AndroidRuntime(366): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1611) 07-07 14:02:26.423: E/AndroidRuntime(366): ... 11 more 07-07 14:02:26.423: E/AndroidRuntime(366): Caused by: java.lang.reflect.InvocationTargetException 07-07 14:02:26.423: E/AndroidRuntime(366): at java.lang.reflect.Constructor.constructNative(Native Method) 07-07 14:02:26.423: E/AndroidRuntime(366): at java.lang.reflect.Constructor.newInstance(Constructor.java:415) 07-07 14:02:26.423: E/AndroidRuntime(366): at android.view.LayoutInflater.createView(LayoutInflater.java:505) 07-07 14:02:26.423: E/AndroidRuntime(366): ... 21 more 07-07 14:02:26.423: E/AndroidRuntime(366): Caused by: java.lang.NullPointerException 07-07 14:02:26.423: E/AndroidRuntime(366): at org.json.JSONTokener.nextCleanInternal(JSONTokener.java:112) 07-07 14:02:26.423: E/AndroidRuntime(366): at org.json.JSONTokener.nextValue(JSONTokener.java:90) 07-07 14:02:26.423: E/AndroidRuntime(366): at org.json.JSONArray.<init>(JSONArray.java:87) 07-07 14:02:26.423: E/AndroidRuntime(366): at org.json.JSONArray.<init>(JSONArray.java:103) 07-07 14:02:26.423: E/AndroidRuntime(366): at com.icons.draw.view.LocationViewers.getMapLocations(LocationViewers.java:102) 07-07 14:02:26.423: E/AndroidRuntime(366): at com.icons.draw.view.LocationViewers.init(LocationViewers.java:65) 07-07 14:02:26.423: E/AndroidRuntime(366): at com.icons.draw.view.LocationViewers.<init>(LocationViewers.java:45) 07-07 14:02:26.423: E/AndroidRuntime(366): ... 24 more And Here is My JSOn Array and loop code to make markers double LAT; double LANG; String INFO; public List<MapLocation> getMapLocations() { if (mapLocations == null) { try{ jArray = new JSONArray(result); JSONObject json_data=null; for(int i=0;i<jArray.length();i++){ json_data = jArray.getJSONObject(i); LAT=json_data.getDouble("lat"); LANG=json_data.getDouble("lang"); INFO=json_data.getString("info"); mapLocations = new ArrayList<MapLocation>(); mapLocations.add(new MapLocation(INFO,LAT,LANG)); } } catch(JSONException e1){ Toast.makeText(getContext(), "No Vehicles Found" ,Toast.LENGTH_LONG).show(); } catch (ParseException e1) { e1.printStackTrace(); } } return mapLocations; } Please Help to Remove this error

    Read the article

  • How to get column value into row header

    - by Dharmendra Mohapatra
    ID amount year 1 300 02-02-2010 00:00 2 400 02-02-2009 00:00 3 200 02-02-2011 00:00 4 300 22-02-2010 00:00 5 400 12-02-2009 00:00 6 500 22-02-2009 00:00 7 600 02-02-2006 00:00 8 700 02-07-2012 00:00 9 500 08-02-2012 00:00 10 800 09-02-2011 00:00 11 500 06-02-2010 00:00 12 600 01-02-2011 00:00 13 300 02-02-2019 00:00 Desired output Y1 Y2 Y3 ........... sum(amount) sum(amount) sum(amount) Please suggest a approach Y1 is the year part of the date so my result column would be 2006 2009 2010 2011 2012 600 1300 800 1900 1200 Thanks. DB- MYSQL, SQL SERVER Thanks.

    Read the article

  • How to disable activerecord cache logging in rails

    - by user1508459
    I'm trying to disable logging of caching in production. Have succeeded in getting SQL to stop logging queries, but no luck with caching log entries. Example line in production log: CACHE (0.0ms) SELECT merchants.* FROM merchants WHERE merchants.id = 1 LIMIT 1 I do not want to disable all logging, since I want logger.debug statements to show up in the production log. Using rails 3.2.1 with Mysql and Apache. Any suggestions?

    Read the article

  • zen of Python vs with statement - philosophical pondering

    - by NeuronQ
    I don't intend to simply waste your time, but: has it occurred to you too, while using Python's with statement that it really is contrary to the 5th line of "The Zen of Python" that goes "Flat is better than nested"? Can any enlightened Python guru share me some of their insights on this? (I always find that one more level of indentation pops up in my code every time I use with instead of f.close()... and it's not like I'm not gonna use try: ... finally: ... anyways and thus the benefits of with still elude me, even as I grow to like and understand Python more and more...)

    Read the article

  • How to know if a std::list has been modified

    - by Nick
    I have this class: class C { public: C* parent; std::list<C> children; }; I can use this class in this way for example: C root; C child; root.children.push_back(child); // or other method of std::list (es: push_front, insert, ...) // Here child.parent is root // How can I set the parent of child? I want to do this work internally to my class without losing the functionality of std::list, is it possible?

    Read the article

  • How to split strings at specific intervals to arrays in javascript

    - by t3st
    how to split strings at specific interveals to arrays in javascript for example: split this string into 4 characters (including space and characters) this is an example should be split,numbers(123),space,characters also included to this ------> 1st array is ------> 2nd array an ------> 3rd array exam ------> 4th array ple ------> 5th array shou ------> 6th array ............ etc till..... ..ed ------> last array

    Read the article

  • Inbreeding-immune database structure

    - by Nick Savage
    I have an application that requires a "simple" family tree. I would like to be able to perform queries that will give me data for an entire family given one id from a member in the family. I say simple because it does not need to take into account adoption or any other obscurities. The requirements for the application are as follows: Any two people will not be able to breed if they're from the same genetic line Needs to allow for the addition of new family lines (new people with no previous family) Need to be able to pull siblings, parents separately through queries I'm having trouble coming up with the proper structure for the database. So far I've come up with two solutions but they're not very reliable and will probably get out of hand quite quickly. Solution 1 involves placing a family_ids field on the people table and storing a list of unique family ids. Each time two people breed the lists are checked against each other to make sure no ids match and if everything checks out will merge the two lists and set that as the child's family_ids field. Example: Father (family_ids: (null)) breeds with Mother (family_ids: (213, 519)) -> Child (family_ids: (213, 519)) breeds with Random Person (family_ids: (813, 712, 122, 767)) -> Grandchild (family_ids: (213, 519, 813, 712, 122, 767)) And so on and so forth... The problem I see with this is the lists becoming unreasonably large as time goes on. Solution 2 uses cakephp's associations to declare: public $belongsTo = array( 'Father' => array( 'className' => 'User', 'foreignKey' => 'father_id' ), 'Mother' => array( 'className' => 'User', 'foreignKey' => 'mother_id' ) ); Now setting recursive to 2 will fetch the results of the mother and father, along with their mother and father, and so on and so forth all the way down the line. The problem with this route is that the data is in nested arrays and I'm unsure of how to efficiently work through the code. If anyone would be able to steer me in the direction of the most efficient way to handle what I want to achieve that would be tremendously helpful. Any and all help is greatly appreciated and I'll gladly answer any questions anyone has. Thanks a lot.

    Read the article

  • rails link path and routing error

    - by Nick5a1
    <%= link_to t('.new', :default => t("helpers.links.new")), new_equipment_path, :class => 'btn btn-primary' %> I have the above code in a view, but am getting the following error when clicking the link: No route matches {:action=>"show", :controller=>"equipment"} My routes file contains: devise_for :users ActiveAdmin.routes(self) devise_for :admin_users, ActiveAdmin::Devise.config resources :equipment resources :workouts root :to => "home#index" match 'workouts/random', :to => 'workouts#random' match ':controller(/:action(/:id))(.:format)' Why is it trying to access the show action?

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >