Search Results

Search found 28563 results on 1143 pages for 'strange but true'.

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

  • mod_rewrite - strange [R] behavior

    - by Tal
    Hello! I'm doing something very simple with mod_rewrite and it's behaving strange. It's behaving as if I'm using the [R] option, but I'm not. Here's a simple test for a .htaccess file: RewriteEngine on RewriteRule ^page1$ page2 This should redirect a request for page1 to page2, but leave the URL in the web browser still pointing to page1. That doesn't happen though. It actually switches the URL to page2, as if I were using this code: RewriteRule ^page1$ page2 [R] Why's it doing that? That's not the default behavior. I'm using a pre-configured machine I got for EC2, so it's probably something in the apache configuration I'm not aware of. Googling has been futile. Help? This is Apache 2.12 btw.

    Read the article

  • Inherited varibles are not reading correctly when using bitwise comparisons

    - by Shawn B
    Hey, I have a few classes set up for a game, with XMapObject as the base, and XEntity, XEnviron, and XItem inheriting it. MapObjects have a number of flags, one of them being MAPOBJECT_SOLID. My problem is, that XEntity is the only class that correctly detects MAPOBJECT_SOLID. Both Items are Environs are always considered solid by the game, regardless of the flag's state. What is important, is that Environs and Item should almost never be solid. Here are the relevent code samples: XMapObject: class XMapObject : public XObject { public: Uint8 MapObjectType,Location[2],MapObjectFlags; XMapObject *NextMapObject,*PrevMapObject; XMapObject(); void CreateMapObject(Uint8 MapObjectType); void SpawnMapObject(Uint8 MapObjectLocation[2]); void RemoveMapObject(); void DeleteMapObject(); void MapObjectSetLocation(Uint8 Y,Uint8 X); void MapObjectMapLink(); void MapObjectMapUnlink(); }; XEntity: class XEntity : public XMapObject { public: Uint8 Health,EntityFlags; float Speed,Time; XEntity *NextEntity,*PrevEntity; XItem *IventoryList; XEntity(); void CreateEntity(Uint8 EntityType,Uint8 EntityLocation[2]); void DeleteEntity(); void EntityLink(); void EntityUnlink(); Uint8 MoveEntity(Uint8 YOffset,Uint8 XOffset); }; XEnviron: class XEnviron : public XMapObject { public: Uint8 Effect,TimeOut; void CreateEnviron(Uint8 Type,Uint8 Y,Uint8 X,Uint8 TimeOut); }; XItem: class XItem : public XMapObject { public: void CreateItem(Uint8 Type,Uint8 Y,Uint8 X); }; And lastly, the entity move code. Only entities are capable of moving themselves. Uint8 XEntity::MoveEntity(Uint8 YOffset,Uint8 XOffset) { Uint8 NewY = Location[0] + YOffset, NewX = Location[1] + XOffset; if((NewY >= 0 && NewY < MAPY) && (NewX >= 0 && NewX < MAPX)) { XTile *Tile = GetTile(NewY,NewX); if(Tile->MapList != NULL) { XMapObject *MapObject = Tile->MapList; while(MapObject != NULL) { if(MapObject->MapObjectFlags & MAPOBJECT_SOLID) { printf("solid\n"); return 0; } MapObject = MapObject->NextMapObject; } } if(Tile->Flags & TILE_SOLID && EntityFlags & ENTITY_CLIPPING) { return 0; } this->MapObjectSetLocation(NewY,NewX); return 1; } return 0; } What is wierd, is that the bitwise operator always returns true when the MapObject is an Environ or an Item, but it works correctly for Entities. For debug I am using the printf "Solid", and also a printf containing the value of the flag for both Environs and Items. Any help is greatly appreciated, as this is a major bug for the small game I am working on.

    Read the article

  • ASP.NET MVC Html.ValidationSummary(true) does not display model errors

    - by msi
    I have some problem with Html.ValidationSummary. I don't want to display property errors in ValidationSummary. And when I set Html.ValidationSummary(true) it does not display error messages from ModelState. When there is some Exception in controller action on string MembersManager.RegisterMember(member); catch section adds an error to the ModelState: ModelState.AddModelError("error", ex.Message); But ValidationSummary does not display this error message. When I set Html.ValidationSummary(false) all messages are displaying, but I don't want to display property errors. How can I fix this problem? Here is the code I'm using: Model: public class Member { [Required(ErrorMessage = "*")] [DisplayName("Login:")] public string Login { get; set; } [Required(ErrorMessage = "*")] [DataType(DataType.Password)] [DisplayName("Password:")] public string Password { get; set; } [Required(ErrorMessage = "*")] [DataType(DataType.Password)] [DisplayName("Confirm Password:")] public string ConfirmPassword { get; set; } } Controller: [HttpPost] public ActionResult Register(Member member) { try { if (!ModelState.IsValid) return View(); MembersManager.RegisterMember(member); } catch (Exception ex) { ModelState.AddModelError("error", ex.Message); return View(member); } } View: <% using (Html.BeginForm("Register", "Members", FormMethod.Post, new { enctype = "multipart/form-data" })) {%> <p> <%= Html.LabelFor(model => model.Login)%> <%= Html.TextBoxFor(model => model.Login)%> <%= Html.ValidationMessageFor(model => model.Login)%> </p> <p> <%= Html.LabelFor(model => model.Password)%> <%= Html.PasswordFor(model => model.Password)%> <%= Html.ValidationMessageFor(model => model.Password)%> </p> <p> <%= Html.LabelFor(model => model.ConfirmPassword)%> <%= Html.PasswordFor(model => model.ConfirmPassword)%> <%= Html.ValidationMessageFor(model => model.ConfirmPassword)%> </p> <div> <input type="submit" value="Create" /> </div> <%= Html.ValidationSummary(true)%> <% } %>

    Read the article

  • setOpaque(true/false); Java

    - by Trizicus
    In Java2D when you use setOpaque I am a little confused on what the true and false does. For example I know that in Swing Opaque means that when painting Swing wont paint what is behind the component. Or is this backwards? Which one is it? Thanks

    Read the article

  • MvcBuildViews true with Entity Framework in ASP.NET MVC 2

    - by Alper Ozcetin
    Hi everybody, In VS 2010, changing true in a MVC2 project's .csproj file causes an error if you are using Entity Framework. Could not load type 'System.Data.Entity.Design.AspNet.EntityDesignerBuildProvider'. C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config\web.config 129 I want to build views while I'm debugging, and I also want my project compile! Any ideas? Thanks.

    Read the article

  • JasperPrintManager.printReport(jasperPrint,true)

    - by user121196
    I have a print button in jsp page that prints a report created in jasper. What does calling JasperPrintManager.printReport(jasperPrint,true) in a jsp page actually do? I imagine it has to invoke a javascript command to bring up the print dialog and sends the data to it. It is not working for me. any idea?

    Read the article

  • bgiframe:true in jquery ui:dialog ie6

    - by duskandawn
    Hello All, I am learning to use the jquery ui:dialog. And when i go to this link for the example for a modal dialog, in ie6 http://jqueryui.com/demos/dialog/#modal The resizing of the dialog doesnt work. I try to replicate the same scenario by myself, with the bgiframe:true option, the resizing still doesnt work. I know there is an iframefix out there to put in the jquery.ui.resizable.js it still doesnt work. I am using jquery-1.4.2.js Any ideas

    Read the article

  • when executing Powershell Script from Ruby "Can't convert true into String" error

    - by Ozie Harb
    I am trying to execute a powershell script from Ruby, I have entered the below command: scriptPath = system('powershell \"C:\\Scripts\\DB_Setup.ps1\"') The ruby Script is handling exceptions when an error is raised to stop the script as below command: rescue => ex message = "\nscript on server '#{`hostname`.strip()}' terminated unexpectedly:\n\nMessage: '#{ex.message}" raise ex Output Error: script on server 'TestDB1' terminated unexpectedly: Message: 'can't convert true into String' Thanks

    Read the article

  • Inno Setup: Set default value for desktop icon-check box to true

    - by MB
    I am struggling with getting Inno Setup to set the check box to true whether a desktop icon should be created. The documentation has not been any helpful concerning this issue as well as Googlism and Stackoverflow. [Tasks] Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked My thought was a value like "checked" for "Flags" but the documentation told me, that Flags isn't responsible for this.

    Read the article

  • AS3 computeSpectrum fft true

    - by cr1ms0n3cho
    I am just trying to understand what the values sent back from computeSpectrum(bytes,true,0) mean. I have values ranging from 0 to 1 for each float i read from the byte array but does each value represent a range of Hz Thanks!

    Read the article

  • ruby write newline character to file but do not interpret as a true newline

    - by thomas
    I am trying to write a ruby string to a file in such a way that any newline characters embedded in the string remain embedded. This is being written out to a file which will then be processed by another tool. An example is below. I want this: 1 [label="this is a\ntest"] \n (second \n is a true newline) I have tried this: string = '1 [label="this is a\ntest"]' + "\n" Any thoughts?

    Read the article

  • flash's "useHandCursor = true" not working for Chrome on Mac

    - by fucrate
    I'm developing a flash game using the default SimpleButton object for my buttons and the hand cursor is working just fine on PC Chrome and Firefox and Safari for Mac, but Chrome on Mac is not letting me swap the default cursor for the hand cursor. I've even set useHandCursor to true for every button I add a click event to and am still getting nothing. We've got no other rollover events, so it's important that the cursor switch. Anyone else run into this and have a lil-fixy / workaround?

    Read the article

  • Strange behaviour with mediaplayer and seekTo

    - by Mathias Lin
    I'm implementing a custom video player because I need custom video controls. I have an app with only one activity, which on startup shall start playing a video right away. Now, the problem I have is: I don't want the video to start from the beginning, but from a later position. Therefore I do a seekTo(16867). Since seekTo is asynchronous, I place the start call of the mediaplayer (player.start()) in the onSeekComplete of the onSeekCompleteListener. The strange behaviour I experience though is that I can see/hear the video playing from the beginning for a few millisecs before it actually plays from/jumps to the position I seeked to. But - on the other hand - the Log output I call before the player.start returns the correct position 16867, where I seeked to. Below is the relevant code section, the complete class is at http://pastebin.com/jqAAFsuX (I'm on Nexus One / 2.2 StageFright) private void playVideo(String url) { try { btnVideoPause.setEnabled(false); if (player==null) { player=new MediaPlayer(); player.setScreenOnWhilePlaying(true); } else { player.stop(); player.reset(); } url = "/sdcard/myapp/main/videos/main.mp4"; // <--- just for test purposes hardcoded here now player.setDataSource(url); player.setDisplay(holder); player.setAudioStreamType(AudioManager.STREAM_MUSIC); player.setOnCompletionListener(this); player.setOnPreparedListener(this); player.setOnSeekCompleteListener(new MediaPlayer.OnSeekCompleteListener() { public void onSeekComplete(MediaPlayer mediaPlayer) { Log.d("APP", "current pos... "+ player.getCurrentPosition() ); player.start(); // <------------------ start video on seek completed player.setOnSeekCompleteListener(null); } }); player.prepareAsync(); } catch (Throwable t) { Log.e(TAG, "Exception in btnVideoPause prep", t); } } public void onPrepared(MediaPlayer mediaplayer) { width=player.getVideoWidth(); height=player.getVideoHeight(); if (width!=0 && height!=0) { holder.setFixedSize(width, height); progressBar.setProgress(0); progressBar.setMax(player.getDuration()); player.seekTo(16867); // <------------------ seeking to position } btnVideoPause.setEnabled(true); }

    Read the article

  • Add LINQ Auto-Generated Value Marker [Column(IsDbGenerated=true)] in Buddy Class

    - by Alex
    Hello, is it possible to decorate a field of a LINQ generated class with [Column(IsDbGenerated=true)] using a buddy class (which is linked to the LINQ class via [MetadataType(typeof(BuddyMetadata))]) ? My goal is to be able to clear and repopulate the LINQ ORM designer without having to set the "Auto Generate Value" property manually every time to re-establish the fact that certain columns are autogenerated. Thanks!

    Read the article

  • The one true domain model - a fallacy?

    - by James L
    I've just finished working for a client which has burnt millions on a project to come up with the 'one true domain model' for their business. This was the project's sole deliverable. What are your thoughts on this? Is a single version of the truth realistic?

    Read the article

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