.Net Code Monkey RSS 2.0
 Saturday, November 15, 2008

Another discovery today, courtesy of Google finding Rik Robinson's Blog is String.TrimStart() and String.TrimEnd().

To trim a leading slash of a string or path use:

myString = myString.TrimStart(new char[]{'\\', '/'}); 

 

To trim a trailing slash of a string or path use:

myString = myString.TrimEnd(new char[]{'\\', '/'}); 

 

I had previously been using a much more long-winded approach. Cheers Rik for bringing that to my attention.

Saturday, November 15, 2008 11:17:15 AM (GMT Standard Time, UTC+00:00)  #    Comments [0] -
.Net | C#

I have recently experienced a JavaScript errror incident when I started using Roles and Membership in a website for the first time.

IE6 reported a syntax error at Line 5 after adding a SiteMapDataSource and Asp.Net Menu controls to the page. The menu would not work I guess due to the JavaScript error.

A quick Google, led me to this page which led me to try adding the following code into my web config

  </system.web>
  
  <!-- Prevent JavaScript Errors, caused by web resource can't be accessed by current user. -->
  <location path="webresource.axd">
    <system.web>
      <authorization>
        <allow users="*"/>
      </authorization>
    </system.web>
  </location> 

</configuration>

This appeared to remove the error, I am assuming by allowing the web resource JavaScript to be accessed by all users.

 

Saturday, November 15, 2008 10:54:42 AM (GMT Standard Time, UTC+00:00)  #    Comments [0] -
.Net | Asp.Net | Authorization | Config Files | Errors | JavaScript | Membership | Roles
 Sunday, November 09, 2008

Issue

Last night I had an issue with my Sony Ericsson W910i, where it could not be closed after it was opened. It would slide a few milimeters, but that was it.

It appears that both of the screws in behind the battery had come loose, and one of them had wound itself right out of it's threaded hole.

Solution

  • Turn the phone off.
  • Turn over and remove battery cover.
  • Remove battery.
  • Check tightness of the two screws, see attached image for location.
    • To tighten the screws you will need:
      • Either a very small Torx driver; smaller than T8, possibly a T6 or T4.
      • Or a very small flat bladed jewellers screwdriver may do it.
  • Check mechanism slides smothly.
  • Replace battery.
  • Replace cover.
  • Turn on phone.

Image

The two arrows in the phone's battery compartment show the location of the two screws.

The arrow on the batter lid shows what the screws looks like.

Summary

I had a quick google for this issue and couldn't find a resolution listed anywhere, so I hope this helps someone in the future.

 

Sunday, November 09, 2008 2:31:55 PM (GMT Standard Time, UTC+00:00)  #    Comments [2] -
Mobile Phone | Sony Erricsson | W910i
Archive
<November 2008>
SunMonTueWedThuFriSat
2627282930311
2345678
9101112131415
16171819202122
23242526272829
30123456
Blogroll
 Clemens Vasters
 Harry Pierson
Passion * Technology * Ruthless Competence
 Joshua Flanagan
A .NET Software Developer
 Michael Schwarz's Blog
Developing applications on the Microsoft platform since Windows 3.1!
 Omar Shahine
Yet another Microsoft blogger
 Scot GU
Scott Guthrie lives in Seattle and builds a few products for Microsoft
 Scott Hanselman
Programming Life and the Zen of Computers
 Tom Mertens
Tom's corner
About the author/Disclaimer

Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.

© Copyright 2009
Duane Wingett
Sign In
Statistics
Total Posts: 21
This Year: 0
This Month: 0
This Week: 0
Comments: 8
Themes
Pick a theme:
All Content © 2009, Duane Wingett
DasBlog theme 'Business' created by Christoph De Baene (delarou)