« first day (1285 days earlier)      last day (3667 days later) » 

10:00 PM
thats why i dont get which is correct to use. (there are diffrent ones i found on google)
 
Write your own. Don't copy code.
 
i only added the "if (SW1.ElapsedMilliseconds != 0)" :-)
im not good at math. i will say this
 
Good for you for avoiding the division by zero, but you should probably add an else clause.
 
@KendallFrey -
State
 Harbor 1
  Ship A
   Cargo i
    Crate I
    Crate II
   Cargo ii
    Crate I
    Crate II
  Ship B
   Cargo i
    Crate I
    Crate II
   Cargo ii
    Crate I
    Crate II
 Harbor 2
  Ship C
   Cargo i
    Crate I
    Crate II
   Cargo ii
    Crate I
    Crate II
  Ship D
   Cargo i
    Crate I
    Crate II
   Cargo ii
    Crate I
    Crate II
 
@jyrka Try writing something that you think should work, even if it only goes up to KB
@TravisJ yawn
sorry, that's boring to me :P
 
10:04 PM
Is there another way to count, I have an anonymous type I'm trying to just do a .Count which I can't do, it requires Count<>
 
@KendallFrey -
Start ->
 Stage
   Start
 
confuzzled
 
in KB i can make it work maybe. but i dont get how to change the Bytes/s, KB/s, MB/s, GB/s ..
 
@Greg generic type inference should work, can you show an example?
 
Start opens the start menu again, except for the already visible menus already open
 
10:05 PM
I dunno what you mean
 
@jyrka Do a conversion, 8 bits equals 1 byte, and so on
 
This will be a unique way of creating menus though
 
			var document = new HtmlDocument();
			document.LoadHtml(File.ReadAllText("Consultant.html"));

			var table = document.DocumentNode.Descendants()
				.First(x => x.InnerText == "Name")
				.MoveToParent(x => x.Name == "table");

			var rowMapping = new List<List<string>>();
			foreach (var row in table.Descendants("tr").Skip(1)) {
				var columnMapping = new List<string>();
				foreach (var column in row.Descendants("td")) {
					columnMapping.Add(Regex.Replace(HtmlEntity.DeEntitize(column.InnerText).Trim(), @"\s+", " "));
 
Start
 Stage 1
  Start
 Stage 2
  Stage
Selecting the start menu from stage 2 will only show
Start
 Stage 1
  Start
 
@TravisJ The last part, with all the Console.WriteLine it writes it out, but it basically does a column for each value, I need 4 columns total.
 
10:06 PM
As a child menu sitting below stage 2
 
@TravisJ You're probably overthinking this
 
I lied, I need six.
 
@KendallFrey - You wanted a complex menu
 
This menu will simply show another menu when one of its items is clicked
There are no 'visible' menus
 
So what are you asking us for again?
 
10:08 PM
Just a tree of options to narrow down a selection or something
Like selecting a make, model, year, color of car
 
Does anyone know of a good visual diagram animator?
 
@jyrka You can equate 8 bits equal 1 byte, 1024 bytes = 1 kb, 1024 kilobytes = 1 megabyte, 1024 megabytes = 1 gigabyte.
@TravisJ You talking to me or Kendall?
 
@Greg He probably doesn't need bits to worry about, bytes will work for now
:P
 
@Greg - Re-write this line of code:
var datas = rowMapping.Select(x => Data.Parse(x)).ToArray();
and make it take advantage of the fact that each rowMapping contains a column mapping
 
@TravisJ Add the .count on the end of the array.
@TravisJ I'm trying to decipher an example @RoelvanUden built for me.
 
10:10 PM
Man, I can't even do anything, I have too much adrenaline in my system.
!!youtube find me something random
 
@KendallFrey - So you are curious what type of menu to create, or you are curious of a structure of data to make a menu out of
 
just need a sample data set to prototype with
 
@TravisJ Yeah, I'm not sure where count would go in that.
 
@KendallFrey - jsfiddle.net/9pFz5
 
10:15 PM
what the devil is that
 
A sample data set with nested information
It defines a state machine
 
I should have known better than to ask the internet for interesting things.
 
@KendallFrey If I understood better, I would help you.
The only thing I could think of would be a menu that rotates like a mobile device for the date. Except it is vertical. Then with each selection a sub-menu could appear.
 
I not asking how to make a menu, lol
 
I meant horizontal.
 
10:20 PM
Just asking for a menu to make
 
I'm giving you one.
 
fuck this I'm outta here
 
A menu that is horizontal across the application, it kind of rounds a little bit. It slides left to right or right to left. Then when you go over choices it will have a sub-menu.
@TravisJ What do you mean rewrite that line?
 
lmfao I don't need help making a menu system, just the menu to test it with
 
@Greg - When you parse it you flatten all the rows to one data point it seems (which is why you get 1 as opposed to many (5))
 
10:22 PM
So rather then have it converted to an array...
The array flattens it correct?
 
@KendallFrey - That data was a large set of nested information so you could test your menu with it. =/
@Greg - You need an array with an array so that when you iterate you can iterate the nested array also and then get your 5 values
 
The reason I asked is so I could get something small, fun, and interesting
 
@Greg -
foreach(col)
 foreach(row)
 
Oh, I would need to use the rowMapping variable .
 
@KendallFrey -
Vehicles
 1967 Ford Mustang Shelby GT500 fastback
  Gone in 60 seconds
 1981 DeLorean DMC 12
  Back To The Future
 1963 Volkswagen Beetle
  Herbie
 1969 Dodge Charger
  The Dukes of Hazzard
 1982 Pontiac Firebird Trans Am
  Night Rider
 1972 Ferrari 365 GTS/4
  Miami Vice
@KendallFrey - Like that?
 
10:27 PM
@TravisJ He left.
@TravisJ I'm an idiot, I don't get- Blah, fuck.
 
Sup everyone, I bring a fun question
I'm trying to make a conversion to a custom type I make ( a class )
That should return the correct enum value
This is what I have
 
@Greg - Maybe I misunderstood. Is the data not formatted properly, or are you just not getting all of the data?
 
        public Layout(DataRow Layout)
        {
            if (Layout.Table.Columns.Contains(registro))
                _registro = Convert.ToString(Layout[registro]);

            if (Layout.Table.Columns.Contains(ordem))
                _ordem = Convert.ToInt16(Layout[ordem]);

            if (Layout.Table.Columns.Contains(campo))
                _campo = Convert.ToString(Layout[campo]);

            if (Layout.Table.Columns.Contains(inicio))
                _inicio = Convert.ToInt16(Layout[inicio]);
For some reason, it tryes to cast but nothing happens. The operator method doesn't get called
Am I doing something wrong or am I simply forgetting something ?
 
@TravisJ In the example it builds for the Console. The problem though, is it returns all the data but each piece of data goes into the same column.
@TravisJ So I get all of the data, but even when I add the delimiter they all get their own column.
 
In what way do they "get their own column"?
 
10:38 PM
@TravisJ better
 
@TravisJ You open the document, and their all in their own column.
Rather then be Username, First, Last, Email, Address, and Phone it is the values one after each other.
In his example he just simply has it as a Console.WriteLine. But if I use the StreamWriter to write each property out, like he has it it doesn't keep the columns.
 
It is hard for me to know why without being able to debug :(
 
I hate blind debugging.
 
@TravisJ I'll send you the file / app that Roel sent me. So maybe you could help.
using HtmlAgilityPack;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Text.RegularExpressions;

namespace Extract {
	static class Extensions {
		public static HtmlNode MoveToParent(this HtmlNode node, Func<HtmlNode, bool> predicate) {
			node = node.ParentNode;
			while (node != null) {
				if (predicate(node)) return node;
				node = node.ParentNode;
			}
			return null;
		}
	}

	class Data {
		public string Username { get; set; }
That is what he sent me...
But I can't get the stupid columns :(
 
does it run in linqpad?
 
10:51 PM
@TravisJ Yeah, it runs and works. But the Console output doesn't hold the columns, it just feeds shit out.
 
The type or namespace name 'HtmlAgilityPack' could not be found
 
Install-Package HtmlAgilityPack from NuGet
 
I only have vs web on this computer :(
 
Oh. :(
 
I use linqpad here for console apps as long as they are generic in nature
 
10:53 PM
@RoelvanUden It doesn't match columns...
Do you see anything wrong with the implementation that would cause it not to grab the proper column
 
11:16 PM
I read it, it all makes sense but there is obviously something stupid.
 
11:26 PM
@TravisJ What you up to?
 
@Greg - Winding down, takin off in 30 mins
 
Yeah, I'm off now.
I feel like I did nothing though.
This stupid page isn't rendering right, so I was all stoked when Roel offered to help. But it still doesn't work correctly, so I'm not sure what I'm doing to do.
I'll catch you later.
 
@Greg - C ya
 

« first day (1285 days earlier)      last day (3667 days later) »