Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
J

joon vh

@joon vh
About
Posts
234
Topics
13
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Select * versus Select field1, field2,...,fieldn
    J joon vh

    thanks for your detailed historical reply :) I love CS history. I knew the part about the laziness, that's why I explicitely said in my original post that I was actually in need of all the values, or if I didn't it was Shirley my intention. I had a program that generated 16 MB of traffic at each boot, and when I removed/optimized all of the SELECT *'s it was reduced by 50%. You think it's safe to say that even today, MSSQL still works by the same principle, and it would generally take longer to use the stars?


    Visual Studio can't evaluate this, can you? public object moo { __get { return moo; } __set { moo = value; } }

    IT & Infrastructure database csharp visual-studio help question

  • Row select on DataGridView
    J joon vh

    you could use an event like CellClick or RowEnter, they have DataGridViewCellEventArgs where you can access the ColumnIndex and the RowIndex of the selection.

            private void dataGridView1_RowEnter(object sender, DataGridViewCellEventArgs e)
            {
                // e.RowIndex
                // e.ColumnIndex
            }
    

    Visual Studio can't evaluate this, can you? public object moo { __get { return moo; } __set { moo = value; } }

    C# css database question

  • Row select on DataGridView
    J joon vh

    What event are you using? I used the doubleClick event somewhere in an old app, and it just refers to the SelectedItem in the datagrid. Then if you doubleclick the header, it just opens the record that was selected last.


    Visual Studio can't evaluate this, can you? public object moo { __get { return moo; } __set { moo = value; } }

    C# css database question

  • Suggestions for PC Interfacing projects.
    J joon vh

    I think starting off with a sound recorder or something would be the easiest way. I'm not sure how to do this myself, but I can't think it to be very hard to process sound and f.e. check if it's over a certain volume, and then you can f.e. create an alarm on your laptop :) I write code in C# and I (and everybody else in the C# section) can help you with that portion. If I find the time, I'll check it out.


    Visual Studio can't evaluate this, can you? public object moo { __get { return moo; } __set { moo = value; } }

    Hardware & Devices question

  • Suggestions for PC Interfacing projects.
    J joon vh

    Hmmm this is actually a really fun idea. You could make a bazillion different games, and I can give you some game ideas cause I have plenty of those (not saying they're any good). Some things that spring to my mind - count people/cars passing by in a street with a camera - create an alarm/logger that works on sound recording (or pressure measurements) - put a bunch of heat sensors in a room and calculate a person/objects movement by these measurements - create an application that moves your mouse button as you move your finger in front of the camera, and clicks when you yell "CLICK" hey this is fun. Does your company ask you to do this, and if they do, can I work there too? :p If you want, I could come up with a thousand more, but then you'll have to specify what you're capabilities are (webcam, microphone, fingerprint reader, retinal scan, heat sensor, pressure sensor,...) and if it should be practical or fun :rolleyes:


    Visual Studio can't evaluate this, can you? public object moo { __get { return moo; } __set { moo = value; } }

    Hardware & Devices question

  • How can I Get my Port ID
    J joon vh
                ManagementObjectSearcher searcher = new ManagementObjectSearcher("Select * from WIN32_SerialPort");
                foreach(ManagementObject Port in searcher.Get()) 
                {
                    // use the Port object to get the values you need...
                    Console.Write(Port.GetPropertyValue("Name"));
                }
    

    you need a using and a reference to System.Management. -- modified at 10:40 Wednesday 4th April, 2007 I'm sorry, this of course, is only C# code, if this isn't what you were looking for,.. well then specify :p


    Visual Studio can't evaluate this, can you? public object moo { __get { return moo; } __set { moo = value; } }

    Hardware & Devices question help

  • The Darpa initiative
    J joon vh

    just imagining a funny scenario Scientist: "what if we combine water... with dirt... if we have the correct proportions, we could make a substance that could fit through any hole!" later, at the hostage-site Terrorist: "is that mud coming through the air-vent?"


    Visual Studio can't evaluate this, can you? public object moo { __get { return moo; } __set { moo = value; } }

    The Lounge csharp visual-studio com question

  • Appliction like taskbar
    J joon vh

    I think you're both on different wavelengths here, or on a different axis. Allow me to try and assist. The word 'above' and 'on top' are very ambiguous in this context. One of you is talking about the Z-position of windows, while the other is talking about the Y-position. So what he wants to achieve is his program acting like f.e. the task-bar does (as he specified in his post). When you have the taskbar on your screen, you can set the AlwaysOnTop property, and it behaves accordingly, this is not the issue. What also happens is that when you fullscreen an application, it counts screensize MINUS size of taskbar. So the window doesn't overlap with the taskbar. What he wants is a way to make his program have this behavior too, thus allowing him to place and his program to the sides of the screen, and make other windows not over- or underlap with this when they are maximized. I hope I got it right :p


    Visual Studio can't evaluate this, can you? public object moo { __get { return moo; } __set { moo = value; } }

    C# help json announcement

  • System.IO.Directory.Exists with drive as parameter doesn't work in Vista (?)
    J joon vh

    Im sorry, I downgraded back to Vista (because it wasn't worth it imo on a <3000$ laptop) but I can confirm that it works on XP.


    Visual Studio can't evaluate this, can you? public object moo { __get { return moo; } __set { moo = value; } }

    C# csharp question

  • The first page of thje c# forum is truncated.
    J joon vh

    the problem seems to live in this post: >>> How ToExecute DTS using C#.Net Code behind ?[modified] it's the last post that's displayed, and even the bottom of the page isn't displayed (like ads and stuff). But when I changed the postview from 50 to 25, it the defect post was moved to the next page, and the first page displayed fine. But now when I go to the next page, it's this one that's also bugging. Must be some illegal char that's killing your ASP or something... :p please let us/me know what the problem/solution was, I'm curious.


    Visual Studio can't evaluate this, can you? public object moo { __get { return moo; } __set { moo = value; } }

    Site Bugs / Suggestions csharp html help question

  • DataGridView problem
    J joon vh

    That would only work if the datagridview was databound I think. If there is no underlying datasource/table you have to access the DGV directly. You can also use the datagridview.Click event to capture whether a checkbox was clicked, and get it's new value in the way I described below.


    Visual Studio can't evaluate this, can you? public object moo { __get { return moo; } __set { moo = value; } }

    C# help

  • DataGridView problem
    J joon vh

    Are you just trying to retrieve the data from the datagridview columns? or are you trying to capture them into events. if it's the former, then you can simply do this:

                dataGridView1.Columns.Add("foo", "foo");
                DataGridViewCheckBoxColumn cbc = new DataGridViewCheckBoxColumn();
                cbc.Name = "bar";
                dataGridView1.Columns.Add(cbc);
                dataGridView1.Rows.Add("xyzzy", true);
                dataGridView1.Rows.Add("yzzyx", false);
    
                Console.WriteLine((bool)((dataGridView1.Rows[0].Cells[1]).Value));
                Console.WriteLine((bool)((dataGridView1.Rows[1].Cells[1]).Value));
    

    Cast the value of the cell you need into a bool, and you have the Checked value. ps: please don't randomly place layout tags over text in your post, makes it hard to read.


    Visual Studio can't evaluate this, can you? public object moo { __get { return moo; } __set { moo = value; } }

    C# help

  • Transactions in a stored procedure
    J joon vh

    it seems correct to me, I always use

    	IF @@ERROR <> 0
    	BEGIN
    		ROLLBACK TRANSACTION TRANS
    	END
    
    	COMMIT TRANSACTION TRANS
    

    Visual Studio can't evaluate this, can you? public object moo { __get { return moo; } __set { moo = value; } }

    Database sharepoint database help

  • Updating Database through datagrid
    J joon vh

    is it a datagrid or datagridView?


    Visual Studio can't evaluate this, can you? public object moo { __get { return moo; } __set { moo = value; } }

    Database question csharp database help announcement

  • Select * versus Select field1, field2,...,fieldn
    J joon vh

    I always thought that both approaches would generate the same result through the same process. But obviously that's not the case, unless replacing * by [field1],[field2],... takes 2 seconds on an SQL server :p


    Visual Studio can't evaluate this, can you? public object moo { __get { return moo; } __set { moo = value; } }

    IT & Infrastructure database csharp visual-studio help question

  • Getting a base control from event arg.
    J joon vh

    you have to change everything that calls the event of course. I'll try to make some testcode when I have a minute. If you have some test-code you could send it...


    Visual Studio can't evaluate this, can you? public object moo { __get { return moo; } __set { moo = value; } }

    C# question

  • SARDAR Special
    J joon vh

    I don't really know why everybody is voting you down. This might not be the right place for jokes, and they aren't overly funny, and I might not know what a 'Sardar' is, but they made me smile ;) just like Trey Parker and Matt Stone did last week: "...but that means" "yes... everyone in South Park will die... FOR EVER!"


    Visual Studio can't evaluate this, can you? public object moo { __get { return moo; } __set { moo = value; } }

    The Lounge sharepoint com tools question career

  • Wondering if such a book exists...
    J joon vh

    We were taught Oberon in school. I thought it was horrible, and prefered COBOL or C# (the other two languages we 'learned'. Java is what?) but now that I read this it has finally become clear WHY someone would bother to make this. We were told it was an academic programming language, and it would help us learn the concept of OO and stuff. It really did, but in a horrible way. Thanks for the link. It's really funny that in the introduction of this book, they uproot my entire vision of Oberon because someone has led me into a wrong alley on the subject from day one. Sometimes I wanna become a teacher in CS, because all the teachers I've ever had, were really bad at it. I was taught Nassi-Schneiderman in 4 completely different ways, dangling somewhere between UML-classdiagrams and pseudo-code, and the only thing I know about Java is how to change the background color of a textbox (that's a lie, but it's basically all we were taught).


    Visual Studio can't evaluate this, can you? public object moo { __get { return moo; } __set { moo = value; } }

    The Lounge database question lounge learning

  • Getting a base control from event arg.
    J joon vh

    I think your event should have an (object sender) and you could cast that into a ListView to have a reference. I thought all events always had (object sender), but obviously they don't. You could probably add it manually. protected override void OnDragDrop(object sender, DragEventArgs drgevent)


    Visual Studio can't evaluate this, can you? public object moo { __get { return moo; } __set { moo = value; } }

    C# question

  • Select * versus Select field1, field2,...,fieldn
    J joon vh

    I've never been a SQL genius, nor have I ever been tutored in it. I'm working on an app that needs every bit of data that is in the DB to be put into datasets. Easy, I thought, just use SELECT * ... it keeps your SQL queries clean and easy, and there is no bulk because we need every field anyway. One of my co-programmers called me a retard and told me that SELECT * is a lot slower than the alternative of directly accessing the fields. I put this to the test, but I'm not sure it's representative. Mocked up a simple console app that read from a table with +100 columns and +5000 lines, filled it in a dataset, added the datasets to a list, and then printed out a count of the list (the 25's, also the number of times the test is repeated) (This is printed because I learned that in code optimizing, variables that are never accessed are discarded) Clearly without the * takes longer than just starring. What are some of your thoughts, findings, comments or experiences with this?

    With * : 25    //times test is executed
    00:00:10.8395254          //time it takes in seconds
    Without * : 25
    00:00:10.3142815
    With * : 25
    00:00:10.1382555
    Without * : 25
    00:00:09.9356686
    

    Sorry if this should've been in SQL forum, but it's not really a request for help, I just hope to get a better understanding of selects.


    Visual Studio can't evaluate this, can you? public object moo { __get { return moo; } __set { moo = value; } }

    IT & Infrastructure database csharp visual-studio help question
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups