Convert Base 100 To Base 60?
Jul 22, 2009Specifically I have fractal hour... in base 100... that does not reflect what the true minutes/seconds left that it represents
View 2 RepliesSpecifically I have fractal hour... in base 100... that does not reflect what the true minutes/seconds left that it represents
View 2 RepliesI am getting following error when I am trying to use Convert.FromBase64String "The input is not a valid Base-64 string as it contains a non-base 64 character, more than two padding characters, or a non-white space character among the padding characters."
Dim payloadBytes = Convert.FromBase64String(payloadBase64)
Basically when my facebook registration form [URL]mphone field has a dash in it and encoded string is posted to other page and I am trying to decode it there which creates this error. Basically I am trying to extract data from Facebook Signed Request.
I can quickly knock together soem code to xlate base 10 to/from bae 13, but I just wondered if something very easy already exists in VB.NET (or even somethign generic, with base N, but right now I am only looking at base 13)
View 1 RepliesDo not know how to convert Me.Base to C# Imports Microsoft.VisualBasic
[Code]...
I was going to build a complex key value and wanted a "counter" like sequential value within it.Then I realized I could "shorten" the length if I used base 64 encoding.I saw something about converting byte arrays to base 64 - but that's not what I'm looking to do.So how to convert a number like 123456 to base 64.
View 24 RepliesHas any one used BITs in VB.NET? If so, do you have code samples? I was looking at SharpBits but I have a VB project that I wanted to use BITS for. Is it possible to use it with my VB.NET program? (.NET 2.0) I was tempted to try to convert each class to VB.NET in the SharpBits.Base folder but figured I'd ask in case someone has headed down this route before.
In case you run across this question. What you can do is in the Sharpbits.Base folder (that you download from codeplex) there is a DLL you can reference in the Bin directory. You can add that into your references to access it. Marking Konrad as answer since he was kind enough to post.
I managed to get sharpbits working with some quick code which I pasted below for anyone who might stumble upon this question. Like I mentioned above add the DLL to your project.
Dim b As New SharpBits.Base.BitsManager
Dim mynewjob As SharpBits.Base.BitsJob = _
b.CreateJob("jobname", SharpBits.Base.JobType.Download)
mynewjob.AddFile("\servershareigfile.zip", "c:igfile.zip")
mynewjob.Resume()
You'll need to write some logic to check for the status of the job. Once it hits "Transferred" status you can then mark it as complete. This will write the file from a .bin to the file name you listed. Something that helped me was installing the Windows Support Tools (you can get it from a Windows 2003 Cd/DVD in the sup tools folder)and using Bitsadmin.exe to view the status of the job while debugging.
take a look at the following code:
[Code]...
I'm retrieving data from Excel and would like to keep my arrays 0 based but Excel returns 1 base. Is there a fairly simple way to return change the array from 1 to 0 base? Or do I just need to create a loop? Here's an example code right here:
[Code]...
I understand that inherited classes can't be converted from base classes. But is there any way to write a conversion sub, so that the base class gets assigned to MyBase, then extra properties are added?[code]...
View 7 RepliesWhen I do this
Public Class cInherits : Inherits Panel
I get this: Base class 'System.Windows.Forms.Panel' specified for class 'MenuButton' cannot be different from the base class 'System.Windows.Forms.UserControl' of one of its other partial types.
How do I inherit?
In old QBasic I could use the LOG function to get the base-10 log of a number. So I would have something like this...
sglFormula = 150 - (LOG(intTemp + 10) * 30)
... the LOG function would give me the log base-10 of a variable (intTemp) plus 10.How do I do this in VB.NET. Do I have to create my own log function and, if so, what would it look like?
What is the base class of .NET?
View 2 Repliesi have a base class which declares the event StatusTextChanged. My child class, of course cannot directly raise this event.
[Code]...
I wonder if I can remove all added event handlers in all the child forms from the one base form in the Closing method. (VB.NET; .NET 2.0)Background: In a project I analyze a memory problem. I verified with the memory profile (see related question) and find out that some forms are not collected by the GC, probably because of the EventHandler non-removed references.
In the project all the forms inherits from the BaseForm. Now I search I way to remove in the OnClosed method foreach Control all the EventHandlers to/from the ChildForms.
When referencing a method's address, should we take into account the overriding or not?
Class B
Inherits A
Overrides Sub Foo
[code].....
To quote from the ConQAT - Continuous Quality Assessment Toolkit website Long-lived software systems are subject to gradual quality decay if no counter measures are taken. Continuous quality control counters this decay through an orchestrated application of constructive and analytic quality assurance techniques. The Continuous Quality Assessment Toolkit ConQAT provides the tool-support required to enact continuous quality control in practice. It supports the rapid development of quality dashboards that integrate diverse quality analysis methods and tools.However before I spend lots of time looking at it, is it usefull for a VB.NET project?
View 1 RepliesWhen you create a webpage in ASP.net, the codebase inherits System.Web.UI.Page Now when I extend the page object to check for SessionExpired for example, I create a new class and inherit from system.web.ui.page, and overwrite some functions. The problem then is that on each page, I have to replace system.web.ui.page with my custompage class. Is there a way to extend a class by adding methods or modifying its methods directly (e.g. add the sessionExpired check to System.Web.UI.Page) ?I'm using .NET 2.0
View 2 RepliesI have classes setup similar to this:
<DataContract()> _
Public MustInherit Class SystemTaskProcessBase
Public MustOverride ReadOnly Property Name() As String
Public MustOverride ReadOnly Property Description() As String
Public MustOverride Property Result() As SystemTaskResult
[Code]...
I need to use these classes on the client system, but also need to be able to create these "tasks" through a management interface. Each class (Task) that inherits the base, could have its own properties that are unique to each class, but at the same time, share the same common base class properties. For example, the above shows a reboot task and a delete file task, the delete file task needs to know which file to delete, so has a property for that. But the reboot task does not need this property. So when the management application is creating these tasks, it shouldn't provide a text box for the file property for the reboot task. There may be more tasks created at a later date with completely different properties.
How would I go about providing the WinForms management application a way to enumerate each class into a ListView for example, and allowing the user to create these tasks and filling in the dynamic properties that each class would have? Desired functionality would be to create a task form that creates dynamic controls available for the properties as needed, depending on the public properties in each class, but at the same time have the base class properties available as well.
know about below queries,
1) How to Call Java base API's Through VB.Net 3.5
2) Is it a feasible approach to call Java API's through VB.Net as these 2 are different platform?
I am using following code before calling my mainform. This code is used to have a Login window before the main application starts.[code]....
View 1 RepliesThere is a lot on the internet about converting a int to base 2 string, but I need to convert it back.
[code...]
I am working on an Electronics convertor to convert inputs between the bases. My question is whether or not their is a way to declare that the input is in a certain base and not the default base 10.
View 6 RepliesAny best practices on how to deal with different versions of base classes.We have made significant changes to the base class but still have lots of code inheriting from the old base class. Could you recommend how we introduce new base class.We'd like all new code to use the new base class. But, we would like the option to have old code still inherit from old base class so we have time to switch and test old classes with new base class.
View 11 RepliesI have a class library that have a lot of classes, in every class I have "Inherits LINQDataContext". And In my xx.designer.vb file I have...
Public Sub New()
MyBase.New(Global.My.MySettings.Default.DbConnectionString, mappingSource)
OnCreated()
End Sub
But I get a lot of "Class 'xxxxx' must declare a 'Sub New' because its base class 'LINQDataContext' has more than one accessible 'Sub New' that can be called with no arguments." errors
I have a base class that contains a fairly large number of parameters in it's New constructor. I have 7 subclasses that inherit the Super base class. My question/issue is, all of the subclasses use the same values for most of the parameters in the New constructor of the base class and these subclasses can be called one after the other. I would like to populate the common values for the superclass and then use those for each of the subclasses, but I can't come up with a good way to do this. If I could figure out how to do this, I wouldn't have to pass all of those parameters in the MyBase.New call for each subclass. I'll try to illustrate with some code .
[Code]...
I have a webservice that is wrapped up by a data access object and is accessed by many different UI controls.
The proxy objects look something like this:
Public Class WebProxyObject1
' Common properties, there are about 10 of these
Public Name As String
[Code]....
In the inherited class I use the base constructor, but I can't use the class's members calling this base constructor. In this example I have a PicturedLabel that knows its own color and has an image. A TypedLabel : PictureLabel knows its type but uses the base color.
The (base) image that uses TypedLabel should be colored with the (base)color, however, I can't obtain this color
Error: Keyword 'this' is not available in the current context`
[Code]...
REF: http:[url].....The above reference is where I got the code below.This code adds buttons to Form1. When a button is clicked a messagebox appears stating what button was clicked. I want to have the ClickHandler fill a RichTextBox on Form1 (I added a RTB to Form1). My problem is I can't do a Dim xForm As New Form1 to fill the RTB from the ButtonArray Class. I can place my file's text in a MessageBox so I know the code I added is correct. I also tried placing a Property method on Form1 and using a Accessor to fill the RTB, however it also requires Dim xForm As New Form1. How can I get my data from files to the RichTextBox on Form1 from the ClickHandler in the ButtonArray Class? See ButtonArray Class Below.
Imports System.IO
Imports System.Text
Imports System.Collections.CollectionBase[code].....
The program below trhows an error in the line "mTable2 = mTable.Copy". The error is: "Unable to cast object of type 'System.Data.DataTable' to type InherintanceQuestion.InheritedTable". This is because mTables is an instance of the InheritedTable class which inherits a DataTable and mTable is a DataTable. So, is there any way I can create the mTable2 to the mTable.copy to the mTable.
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
[code].....
I'd like to check for the value in a datagridview column (firts column) and if it's "YES" then change its row color to red.The following code is not doing the job for me nor is generating an error, Can pls someone tell me what I'm doing wrong?
[Code]...