.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Double to Hex Converter

Posted By:      Posted Date: October 23, 2010    Points: 0   Category :.NET Framework

How to Convert Double Number into Hex in vb.net ?

I want to convert "255.68" to 16 byte Hex/

how to do that ?

View Complete Post

More Related Resource Links

.net code converter

For coverting your programming langugae to another languge the below site is very help full


Convert .docx to web page - "the converter cannot complete the task because an internal error occurr


I'm trying to convert docx files to webpages to be published in to a library elsewhere on our sharepoint site. At first I was having no problem, the files were converting, however more recent files have returned the error: the converter cannot complete the task because an internal error occurred

I've tried writing, uploading and converting a simple docx file, and this works which has led me to believe that the problem is something in the docx files that i'm trying to convert. So i tried using word07 to clean the documents up by clicking Office button>prepare>inspect document then removing all the metadata, custom xml etc from the files resave, upload and convert, but still no joy.

I'd simply rewrite the document but the problem is that there are a lot of them.

Any ideas what's going wrong?


Customizing the Converter for Json.NET


Many recently days, I thought about Json.net library that implemented by James. It is really a good library that I have ever used. I really impressed about many Converters that this library expose for user. I can list some converter of json.net at here:

+ BinaryConverter
+ BsonObjectIdConverter
+ DataSetConverter
+ DataTableConverter
+ EntityKeyMemberConverter
+ HtmlColorConverter
+ IsoDateTimeConverter
+ JavaScriptDateTimeConverter
+ KeyValuePairConverter
+ RegexConverter
+ StringEnumConverter
+ XmlNodeConverter

As you see, json.net have many converters, but still not enough for our necessary. So in this post, I try to explorer about 2 converters that I thought it is very useful for us. That are ArrayConverter and Object Converter (it is named by me). In 2 converter, I mainly implement it for return the object's interface, so it can be re-use and extension better. Now this is my code for implement it:
+ CustomObjectCreationConverter

    internal class 

Split List into sub lists of List of size n

Hi all,   I've been playing around for a little bit trying to find the best way of taking a List<double> of variable size and splitting it in to sub-lists of  size n. So maybe a method stub like   public List<List<double>> splitData(int width,List<double> data) { <br/> }<br/> The problem is i cant get my head around how to iterate through the parameter "data" properly when the data.count is not exactly divisible by the parameter "width". I have been trying for loops but i think i need to switch to do whiles.   I'm not massively familiar with LINQ but could anyone advise if LINQ would provide an alternative way of doing it?   Any help much appreciated   John

two adjacent double quotes in json causes blue screen by JavaScriptSerializer

Hello, I am using System.Web.Script.Serialization.JavaScriptSerializer to deserialize  http requests.  I get the blue screen when the contents I am deserializing has two double quotes, for example:  ""country"". Is there a fix for this?  Currently I replace the "" with a special string and then I deserialization, then I put back the "".  I do this for a given field in the object which I've seen comes in with ""s.  The problem is that I should be doing this for all fields in the input json.  This is a lot of extra code to write as I could be deserializing many different types of Json objects.  The "" is needed by the client to specify a quoted string, so I can't ask for the input to be changed. Any help on this subject would be really appreciated. Many thanks.     I am using .Net framework 3.5.

Combobox SelectedValue with Converter and PropertyChangedCallback() is not working together?

Hi, I have a combobox, I want to have a PropertyChangedCallback and at the same time I want to bind selected value with IsEnable property of a Checkbox. Problem is when I add Converter Neither Converter gets called and nor the  PropertyChangedCallbac().   <ComboBox ItemsSource="{Binding Source={StaticResource EnumExportType}}" Name="CB_ExpType" SelectedValue="{Binding Path=ExpType, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged" /> Combobox is binded with static Enum resource EnumExportType. Selected value is Binded with a Dependency Property ExpType which is a Enum.   public ExportType ExpType { get { return (ExportType)GetValue(ExpTypeProperty); } set { SetValue(ExpTypeProperty, value); } } public static readonly DependencyProperty ExpTypeProperty = DependencyProperty.Register("ExpType", typeof(ExportType), typeof(ExportScreen), new FrameworkPropertyMetadata(ExportType.EntireProject, new PropertyChangedCallback(ExportTypeChanged))); this works fine On changing Item from combobox PropertyChangeCallback gets called. Now I want To bind the IsEnabled property of a Checkbox to the ExpType property and I use IValueConverter to convert the ExpType to the correct boolean value. <CheckBox Content="Test" Name="CHK_WithModels" IsEnabled="{Binding ElementName=CB_ExpTyp

double.IsNaN throwing ArithmeticException

I have problem when calling double.IsNaN method. It is throwing an ArithmeticException. With a message like "Overflow or underflow in the arithmetic operation." Any ideas as to what is causing this problem?

double spin text in richtextbox

i want to implement this feature : if i have a following sentence : {my name is james vick and iam a {member|user|visitor} on this {forum|website|site} and iam loving it | iam admin and iam a {supervisor|admin|moderator} on this {forum|website|site} and iam loving it} on a click of button i want to generate this : my name is james vick and iam a member on this site and iam loving it or iam admin and iam a admin on this forum and iam loving it The basic need is to randomly choose words between {|} braces I have been able to do this for inner nest i.e. for {member|user|visitor}. But how to include the outer nest of sentences also i.e. {something blah blah {blah1|blah2} and | something else} ? code for inner nest : Private Sub SimpleButton3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SimpleButton3.Click Dim stringWithTextIn As String = RichTextBox1.Text Dim regex As New Regex("{(.*?)}") Dim r As String = regex.Replace(stringWithTextIn, New MatchEvaluator(AddressOf ReplaceMatch)) RichTextBox2.Text = r End Sub Private Function ReplaceMatch(ByVal m As Match) As String Dim parts = m.Groups(1).Value.Split("|"c) Return parts(r.Next(0, parts.Length)) End Function i know i just have to change the regex but what do i add in it to include outer braces?

bug: subtract value from double returns invalid value!

Dim b as double  = 0.8 Dim a as double = 1 - b a contains the value 0.1999999996 in stead of 0.2 ???????????????????

String StartWith double quote

hi all,my string variable first character starts with " now i want to check whether it has " or not. how to check this from Code Behind.

Mac Panasonic HD Video Converter-Convert HDC-TM700 MTS to DVD

Mac Panasonic HD Video Converter-Convert HDC-TM700 MTS to DVD Do you want to burn DVD on Mac Snow Leopard? The new Panasonic HDC-TM700 camcorder provides 1080/60p and 1080/50p recording with 28Mbps for HD videos. However, when you transfer the .mts videos to iMac, you may notice there is compatibility problem for iMovie, iDVD, Final Cut Pro, FCE4. Aunsoft Video Converter for Mac is the recommended Mac Panasonic HD Video Converter HDC-TM700 and other HD camcorders like Panasonic HDC-SD60, Sony HDR-CX550, Canon HF S200. The Mac Panasonic HD Video Converter does not only convert AVCHD to MOV for iDVD, but also includes simple editing functions like trimming, adjusting brightness. Have a look at the steps below for the easy steps to bring Bring Panasonic HDC-TM700 MTS to iDVD for Burning. Step 1. Load Panasonic HD videos to Aunsoft Video Converter for Mac. Transfer Panasonic HDC-TM700 .mts files from camcorder to Apple hard drive via USB cable. Run Aunsoft Video Converter for Mac as the best Mac Panasonic HD video converter, and click the "Add" button to load .mts videos. Step 2. Choose MOV output. Click the "Format" option, and choose Adobe Premiere/Sony Vegas > MOV (AVC)(*.mov) as output format, and the Mac Panasonic HD video converter will transcode MTS to H.264 MOV for iDVD.     Step 3. Convert MTS to MOV for iDVD. Clic

Mac Video Converter for Sony Bloggie Touch:1080p to iPhone 720p

Mac Video Converter for Sony Bloggie Touch:1080p to iPhone 720p Months ago I wrote the article about iPhone 4 vs Sony Bloggie ultra-compact camcorder, on September 1, 2010 Sony announced Bloggie Touch MHS-TS20 as slim as a phone with 3.0" touch screen. With the 12.8 megapixles Exmor CMOS sensor and F2.8 wide angle lens, Sony Bloggie Touch MHS-TS20 can capture videos and pictures in high quality. According to the specifications announced by Sony, the Bloggie Touch MHS-TS20, as pocket MP4 camcera, will record video in 1920x1080 (29.97p) at 12M, 1280x720 (59.94p) at 6M, and 1280x720 (29.97p) at 4M. While you have already taken videos with 1920x1080 to enjoy the HD quality, you may find the 1080p MP4 is not supported by iPhone 4, as iPhone 4 only supports H.264 MP4 with up to 720p resolution. A quick Sony Bloggie Touch video converter will make it possible to enjoy Bloggie Touch 1080p video on iPhone 4. Aunsoft Video Converter for Mac would help you downscale 1080p video to 720p. No matter you are using Bloggie MHS-CM5, or will use Bloggie Touch MHS-TS20 to shoot 1920x1080 videos, you can follow the steps below on Mac Snow Leopard. Step 1. Transfer Sony videos from camera to computer. There is supplied PMB Portable for Bloggie MHS-CM5 to work with Mac OS X, and there will be Bloggie software embedded on camera, making the camera Mac compatible. It is easy to transfer

Double hop delegation problem

Hi,I have an ASP.NET 2.0 web app which calls a one way web method on a web service. This web method contacts remote servers and pulls back config information to confirm the state of new server builds (settings etc) and inserts the collected data into a SQL database. The web app is supposed to pass through the callers kerberos ticket to the web service and then again to the newly built server which is being checked, all via impersonation and delegation using the calling users administrator privileges.The trouble is, I just can't get the web service to run under the callers context. I have the SPN's set up, delegation turned on in the active directory objects for the computer running the web app and service and the worker process domain user service account. I have windows authentication on and impersonation set to true in both the web app and service's web.config, integrated authentication in IIS, and IE settings are all ok. All has been checked out and passes the tests in DelegConfig, but it still won't work.It appears that any data that's is written to the database is written under the context of the web pool service account, and not the calling users, plus along with the fact that I get access denied messages when trying to collect data from the server says impersonation isn't working.Also, is it possible to run the checks under the calling users

DVD to Dell Streak - Convert DVD to Dell Streak with DVD to Dell Streak Converter

This guide is mainly about how to rip DVD and convert incompatible video to Dell Streak. First, you should know what video formats the Streak supports.   Compatible Dell Streak Video Formats (testing) The Streak's supposed to support H.263/H.264, 3GP, MPEG4, and WMV videos. Like our prototype, the Dell Streak played our MP4V-encoded 480p and 720p video clips (up to 7.4Mbps bit rate) without a hitch, although for some reason it wouldn't open full-length films that were encoded the same way, even at 3Mbps and lower. More disappointingly, we had no luck with any of our H.264 clips despite the bit rate limited to 3.2Mbps, so we do wonder if this codec's supported at all -- maybe Archos can lend Dell a hand? On a brighter note, our WMV clips -- both VGA and 720p -- came out as good as the MP4V videos. Last but not least, YouTube videos looks great on the five-inch screen, but we've noticed a bug: if you have music playing in the background, the YouTube app simply plays video over the music rather than pausing it (like the Nexus One and Desire do). We're certain that Dell's team of talents can easily fix this (and we certainly hope that they're reading this). Because DVD has CSS copyright protection, we need a program to decrypt and rip DVD to Dell Steak. The tool we use is Video Converter Pro, it offers two features: Rip DVD to Dell Streak and Convert Video to Dell S

How to pass double pointers for COM Interop via MethodInfo.Invoke ?

Hello, I need to make COM IntetrOp at runtime using reflections. My native COM Object's exposed methods have some parameters as pointers (DWORD*) and some double pointers (DWORD**) and some are user defined types(e.g SomeUDTType objSmeUDTType) and its pointer to pointer(i.e. SomeUDTType **pSomeUDTType). I need to pass pointers to pointers. For now how can I be able to populate "object" array as pointers to pointers of SomeUDTType. Working Example:      STDMETHODIMP MyCallableMethod(DWORD *value_1,BSTR *bstrName,WESContext **a_wesContext tlbImp.exe generated output:      DTINIDLLib.RuntimeCallingClass.MyCallableMethod(ref uint, ref string, System.IntrPtr) Regards UsmanMutlithreading

How to prevent combobox drop down from expanding on double click

Hi, I have a requirment to toggle the selected item of a combobox on double click. I am able to achieve this using MouseDoubleClick event for combobox. But the issue is, when I double click the popup for the combobox also drops down, which I need to avoid.   How can I do this.   Please help.   Thanks, P
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend