User Profile

Collapse

Profile Sidebar

Collapse
maylortaylor
maylortaylor
Last Activity: Mar 10 '14, 08:51 PM
Joined: Nov 20 '12
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • maylortaylor
    replied to Remove specific char in string
    Find this online and it did exactly what I wanted

    Code:
    using System.Text.RegularExpressions;
    ...
    string newString = Regex.Replace(oldString, "[^.0-9]", "");
    See more | Go to post

    Leave a comment:


  • maylortaylor
    replied to Remove specific char in string
    Code:
    char[] whitelist = {'1', '2', '3', '4', '5', '6', '7', '8', '9', '0'};
    
                    
                       
                        for (int i = 0; i < whitelist.Count(); i++)
                        {
                            foreach (char c in str)
                            {
                                if (whitelist.Contains(c))
                                {
    ...
    See more | Go to post

    Leave a comment:


  • maylortaylor
    replied to Remove specific char in string
    stuffing!!!..yo u are right. Welp, back to the drawing board. Any pseudo code help?
    See more | Go to post

    Leave a comment:


  • maylortaylor
    replied to Remove specific char in string
    ANSWERED MYSELF:

    Code:
    int index = -1;
                    Boolean flag = false;
                    string NewStr = null;
                    char[] lower = {'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'};
                    char[] upper = {'A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z'};
    ...
    See more | Go to post

    Leave a comment:


  • maylortaylor
    started a topic Remove specific char in string

    Remove specific char in string

    Code:
    int index = -1;
                    string NewStr = null;
                    char[] lower = {'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'};
                    char[] upper = {'A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z'};
    
                    foreach (char c in str)
                    {
    ...
    See more | Go to post

  • maylortaylor
    replied to Filling in DataTable using OleDb
    Fixed it. Went with .Parameters and changed my "*" to "%".
    Code:
     public DataTable FindFullPNusingPartialPN(string _parcelNumber)
                {
    
                    string connString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + ConfigurationManager.AppSettings["TaxCert_Database"];
                    DataTable dt = new DataTable();
    ...
    See more | Go to post

    Leave a comment:


  • maylortaylor
    started a topic Filling in DataTable using OleDb

    Filling in DataTable using OleDb

    For some reason I am having problems doing this simple task. I just want to run a query in Access to select a
    a field from the table that is "like" the string being inputted.

    However, the dataset comes back empty...well not empty, I get a column name but no data. So when I type in
    Code:
    ds.Tables[0].Columns[0].ColumnName
    , I get the column name coming from the database ("ParcelNumber" ).

    When I run...
    See more | Go to post

  • Use Linq to search List<class> and find a range of words

    So this is a very new territory for me and from what I can't find online, it's a new territory for most.

    I am using tessnet2 OCR to read a pdf so I can extract some words/information.

    When tessnet2 reads the file it compiles the results into a class..

    Code:
    public class Word
        {
            public int Blanks;
            public int Bottom;
            public List<Character> CharList;
    ...
    See more | Go to post

  • maylortaylor
    started a topic XML to Dictionary using LINQ

    XML to Dictionary using LINQ

    I'm new to LINQ, so thank you in advance for the help.

    I have this function below which takes in a class (consisting of a string(username ) and class(USER)). The User Class is setup as follows.

    Code:
    public class User
    {
       private string _name;
       public string UserName { get; set; }       
       public List<int> ControlNumber { get; set; }       
       public User()
       {
    ...
    See more | Go to post

  • maylortaylor
    started a topic Dictionary to XML using LINQ

    Dictionary to XML using LINQ

    So I have a function that takes in a Dictionary and returns a XML document with the information. It uses LINQ which I suck at and would like some help reformat the information.

    So far the information comes out like this:

    Code:
    <UserClassDictionary>
       <adolan>
          <ControlNumber>791301</ControlNumber>
       </adolan>
       <afeazell>
          <ControlNumber>790253</ControlNumber>
    ...
    See more | Go to post

  • maylortaylor
    started a topic ForEach Loop logic using KeyValuePairs

    ForEach Loop logic using KeyValuePairs

    I'm new to C#. I'm trying to create a program to audit some of our processors. As you will see below, I have two foreach loops that allow me access to errorOrders(ret urns <<UserName, #of errors>>) and totalOrders (returns <<UserName, #of totalOrders>>).

    However, the problem i'm running into now is that it seems to constantly loop through these two ForEach loops. When i run it, the 'count' on both errorOrders...
    See more | Go to post

  • maylortaylor
    started a topic Select from DataTable

    Select from DataTable

    I have a database table that I'm trying to select from. THe table looks like this:

    ID | Rule | RuleName | RuleID
    (autonumber) (xmlstring) FakeName a984kjg9

    (autonumber) (xmlstring) FakeName1 a4844asdf

    You get the picture....ok, so my problem is that I know nothing of C#.

    I have this so far.

    Code:
    DataTable dtWebRules = new DataTable();
    ...
    See more | Go to post

  • maylortaylor
    replied to OleDbException 'unspecified error'
    in .NET
    Found the problem. My Access Database was corrupted. I just remade it and my program worked fine.
    See more | Go to post

    Leave a comment:


  • maylortaylor
    replied to OleDbException 'unspecified error'
    in .NET
    Is there no one out there that can help me? Is this really that hard of a problem? And yes, Vijay, it's correct.
    See more | Go to post

    Leave a comment:


  • maylortaylor
    started a topic OleDbException 'unspecified error'
    in .NET

    OleDbException 'unspecified error'

    So, i get the OleDBException "unspecifie d error" whenever the function below hits the
    Code:
    dataAdapter.Fill(dataset)
    line.

    I have tried adding
    Code:
    dbcommand.connection.close()
    and
    Code:
    dbcommand.connection.dispose
    () but neither fixed the problem.

    I assume that this error would happen every time i try to connect with the DB but this is just the first function that does so in my code, so this is where the error is first occuring....
    See more | Go to post

  • Ok, i got part of it figured out but now i'm getting some "object refernce" error.

    Code:
    private static List<MenuItem> LoadRules(bool evaluationType)
    		{
    			string path = HttpContext.Current.Server.MapPath(string.Format("/Rules/{0}/{1}/", ip, evaluationType ? "Evaluation" : "Execution"));
                string xmlstring = LoadRuleXmlFromDB();
                File.WriteAllText(path
    ...
    See more | Go to post

    Leave a comment:


  • maylortaylor
    started a topic create xml file from xml stored in a DB

    create xml file from xml stored in a DB

    I have a table in my database that has a 3 fields.

    RuleID | RuleName | Rule

    the ruleID is a randomly generated string of characters, RuleName is the name the user gives to the rule, and the Rule field is about 600 characters long and is just XML text.

    I want to read that Rule field from the database and use it inside the function below.

    Code:
    private static List<MenuItem> LoadRules(bool
    ...
    See more | Go to post

  • maylortaylor
    started a topic Web Rule 3.0 and database management

    Web Rule 3.0 and database management

    First off, i'm a VB programmer, not a C# programmer, so this is probably the biggest issue.

    What i'm trying to do:

    I'm using Web Rule 3.0 to create business rules for our site. I have the rules saving to a table in our database just fine, however, now i am trying to have the context menu that the rules can be selected from read from the database.

    Alot of this is explained on this page - http://rule.codeeffect s.com/Doc/Business-Rule-Toolbar...
    See more | Go to post

  • maylortaylor
    started a topic Pause Console Application

    Pause Console Application

    So, i have a console application that runs perfectly well but it runs too fast to read any of the information on the screen. So what i'm trying to do is one of two things...

    A) create a function that i can call with a key stroke (such as "spacebar") . The function would be something simple like "console.readli ne()" just so the user can willingly pause the console app.

    or

    B) a function...
    See more | Go to post

  • OleDbReader -Object reference not set to an instance of an object

    Code:
     Function AddUsersToDictionary()
            Dim connectionString As String = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" & ConfigurationManager.AppSettings("Database")
            Dim dbConnection As OleDbConnection = New OleDbConnection(connectionString)
    
            Try
                dbConnection.Open()
                Dim queryString As String
                queryString = "SELECT DISTINCT
    ...
    See more | Go to post
No activity results to display
Show More
Working...