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

je_gonzalez

@je_gonzalez
About
Posts
47
Topics
4
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Quality of Code Project diminishing
    J je_gonzalez

    I had a similar experience whenI went to Waterfox 28.0, where ads begun showing up everywhere, and I mean even in my own web site. Apparently a new extension was added (do not recall full name but it had to do with ads). Removed it and issue went away. Next day, issue is back and so is the extension. Finally was able to return to sanity by turning "Update Add-ons automatically" off and removing the extension. And I mean everywhere, I (and my users) got popups in input fields! I wonder if this is what is happening to CP dotheads??

    The Lounge help

  • am i a programmer or not [modified]
    J je_gonzalez

    May I give my two cents? You are clearly not enjoying coding, otherwise you would not contradict yourself in almost every statement. You see a potential way out of your current life situation in technology, and believe that coding is the way to go. Ask yourself this, and use your Internet connectivity to expand your answers: WHat is it that you really like to do for the rest of your life? If you answered programming, what is your second choice? and your third? Now, what is common among those three? And what do you have in your personality that will fit into each one? You may find out that by moving down to your other choices, you can make yourself fit in better. Coding may look simple, but as you have found out, sometimes it is not. It takes not only perseverance, but also productivity, two things that are compeltely contradictory unless you are willing to devote yourself fully to it. It does not matter how many days/months/years/decades of experience you have, as unless you push yourself to the next level, with the same problem f productivity/perseverance, you will not enjoy it. And whatever you decide to do, learn to do one thing well, and that is to communicate well. More than finding bugs, or coding in assembler, you will be compensated by your ability to communicate with all around you.

    .NET (Core and Framework)

  • select upcoming birthday?
    J je_gonzalez

    SELECT * FROM UsersProfile WHERE ((403 + (31 * month(DOB) + day(DOB)) - (31 * month(getdate()) + day(getdate()))) % 403) = (SELECT MIN(((403 + (31 * month(DOB) + day(DOB)) - (31 * month(getdate()) + day(getdate()))) % 403)) FROM UsersProfile)

    Database database sql-server sysadmin tutorial question

  • Which Is Better - Signed or Unsigned Assemblies?
    J je_gonzalez

    Check this: http://www.morganskinner.com/Articles/StrongNameIdentityPermission

    C# question csharp wpf lounge

  • how do i get a node position in an xml file
    J je_gonzalez

    using System.Xml; XmlDocument c_Doc = new XmlDocument(); c_Doc.Load(...) or LoadXml(...); XmlNodeList c_List = c_Doc.DocumentElement.SelectNodes("//*[nombre='???']"); ... or ... c_Doc.DocumentElement.SelectNodes("//item[nombre='???']"); foreach (XmlNode c_Node in c_List) { ... Do the DumpIndex with c_Node and whatever else ... } I am writing this away from my computer, so I cannot check it. Use the first SelectNodes methods to include all nodes, the second if you want to include only the item nodes. Of ccource the ??? needs to be replaced with the name that you are searching for. Anyway, you should be able to get the idea on how to use XPath (If you need to learn more, check the w3schools.com site)

    C# xml tutorial question

  • how do i get a node position in an xml file
    J je_gonzalez

    private string DumpIndex(XmlNode node) { string sAns = ""; if (node.ParentNode != null) { int iPos = -1; foreach (XmlNode c_Node in node.ParentNode.ChildNodes) { iPos++; if (c_Node.Equals(node)) { sAns = this.DumpIndex(node.ParentNode); if (sAns.Length > 0) sAns += "."; sAns += iPos; break; } } } return sAns; }

    C# xml tutorial question

  • Is there a performance difference?
    J je_gonzalez

    If you have access to SQL Query Analyzer, type each statement and then Ctrl + L (Display Extimated Execution Plan). This will display what steps the server will do and when you move the mouse pointer over each step it will tell you the estimated cost in CPU cycles, using the database current stats.

    Database visual-studio com testing beta-testing performance

  • Can someone help?
    J je_gonzalez

    Es posible aprender un buen nivel de español en siete semanas con el curso de Michel Thomas y despues de el cual, una inmersión total el la cultura española.

    C# csharp sales help question learning

  • Mysterious behaviour (freezing)
    J je_gonzalez

    Reason, I cannot give, but fix I can: Replace: if (this.panel1.Controls[i].GetType() == typeof(System.Windows.Forms.UserControl)) this.Controls.RemoveAt(i); With: if (this.panel1.Controls[i].GetType() == typeof(System.Windows.Forms.UserControl)) { this.panel1.Controls[i].Controls.Clear(); this.panel1.Controls.RemoveAt(i); } Ran into this a while back....

    C# graphics question announcement

  • RE: Web Service Startup
    J je_gonzalez

    Your question is not clear as you use "each instance" and yet you seem to want to have a global value. If what you are trying to accomplish is to save yourself from having to re-read a semi-static file, here is what I would try... // THE RESULTANT DATA object myData = null; // THE NAME OF THE FILE string myFileName = @Server.MapPath(@"\dir\filename"); // GET THE INFO System.IO.FileInfo fileInfo = new System.IO.FileInfo(myFileName); // DOES IT EXIST if (fileInfo.Exists) { // THE NAME OF THE DATA KEY string myDataKey = "DATA"; // THE NAME OF THE TIMESTAMP KEY string myTimestampKey = "DATETIME"; // GET THE PREVIOUS TIME STAMP (IF ANY, ELSE A NULL) DateTime myTimestamp = Application[myTimestampKey] as DateTime; // GET THE TIMESTAMP DateTime currentTimestamp = fileInfo.LastWriteTime; // GET THE PREVIOUS DATA (IF ANY, ELSE A NULL) myData = Application[myKey]; // ANY PREVIOUS DATA? if (myData != null) { // DO WE HAVE A TIMESTAMP? if (myTimestamp == null) { // SHOULD NOT HAPPEN, BUT JUST IN CASE (DATA AND NO TIMESTAMP) myData = null; } else { // SAME? if (!myTimestamp.Equals(currentTimestamp)) { // FILE CHANGED, RE-READ myData = null; } } } // ALREADY THERE? if (myData == null) { // GET THE DATA myData = ...; // AND SAVE FOR NEXT TIME Application[myDataKey] = myData; // AND SAVE THE TIMESTAMP Application[myTimestampKey] = currentTimestamp; } } Have fun.....

    C# question csharp performance help

  • generate rtf code of pictures/images
    J je_gonzalez

    public string ImageToRTF(Image img) { RichTextBox rtf = new RichTextBox(); Clipboard.SetDataObject(img); rtf.Paste(); return rtf.Rtf; }

    C# help question

  • Deployment of already installed Appllication in .NET.
    J je_gonzalez

    I had this problem when I was using wildcards in the AssemblyVersion. The way I solved it was as follows: 1. Created a class where the system constants are kept.. namespace myCo.Constants { public class SystemConstants { ... public const string SystemVersion = "2004.03.27.02"; ... } } 2. Included the class in every AssemblyInfo file in the solution, and used the constant in the AssemblyVersion... ... using myCo.Constants; ... ... ... [assembly: AssemblyVersion(myCo.Constants.SystemConstants.SystemVersion)] ... ... 3. In the setup project for the app, I use the version number, converted as follows: SystemVersion in Code Version In Setup 2004.03.27.02 04.03.2702 When the version is changed in the setup project, the system will give you a warning that the ProductCode and PackageCode should also be changed, and if you answer "Yes", the system will update them for you. Also I have the "DetectNewerInstalledVersion" and "RemovePreviousVersions" set to true, that way the new version deletes any previous versions, but does not allow an older version to be installed. Once we went to this procedure, I have never had a single problem with installs. In my app, every time a version is released, a permanent copy of all the source is then archived, and the SystemVersion constant is updated accordingly, so is the setup project Version. Since the SystemVersion is in one place, it is easy to modify all of the assemblies, we have multiple setup projects, which are a bit of a pain, since I do them manually, but I do remember seeing an article here in CP that does the setup projects. Hope this helps...

    .NET (Core and Framework) csharp sysadmin announcement

  • Component Text Property
    J je_gonzalez

    Let's see I was taught not to say RTFM to clients anymore two years before you were born. Yeap, things have changed, now is RTFF, as manuals have given way to forums.

    C# question database design

  • Component Text Property
    J je_gonzalez

    Probably written by a Californian. Heath, I sincerely think that you need to RELAX. It may be the way I type, but you seem to treat things as way too important. There is a radio show here in L.A. (yes, Lala land, home of Arnold the guvernor) where there is a guy who complains about everything and the question that everyone keeps asking him, and I ask you now, is "Who hurt you?". PS: I forgot to admit that the bug in the electrical grid was mine, but being a Californian it was meant to run in the electical grid of Uzbekistan, and make the lights that were left on read out, "HS rules...", damn if I got it wrong again.

    C# question database design

  • Component Text Property
    J je_gonzalez

    And the world will end... Nice to hear from you again!

    C# question database design

  • Component Text Property
    J je_gonzalez

    try public new string Text...

    C# question database design

  • file processing
    J je_gonzalez

    You're welcome. The idea was to give an example, and let you run with it. Next, pass it forward, when you see a question that you have an answer for, give them a hand.

    C# data-structures question

  • Form using too much memory
    J je_gonzalez

    Try using .NET framework 1.1 (This is assuming that you are using 1.0 under XP).

    C# performance question

  • file processing
    J je_gonzalez

    Open Reply to your Private Reply: I agree with you that a lot of people that are interested in becoming a programmer (and even many that "are") do noy belong in this field. Like in any field, you need the drive to look for answers yourself and to read the manual (how old is RTFM now?) and to dig in deeper, and too many are plain too lazy to do so. However, I have met many who do have the drive, and the ability is within them, they just lack that insight of thinking outside themselves, which may be (AND IT IS A BIG MAY BE) triggered by seeing a piece of code. I do not know about you, you may have all the answers and need help from no one, but I have gotten great ideas from reading thru some of these boards (the latest example is the work by Tom Clements on menus here at CP, which gave me insight on how to solve a nasty problem I was facing), and provide the little assistance I humbly do to pay back into the system. Once before I answered someone and it seemed to cause some problem with you, and I apologized, even when I felt that I had done nothing wrong. This time you are telling me not to help people out, and to that my answer is to go play with yourself. I do not believe that this board belongs to you, and if it does, publicly tell everyone so and I will happily go someplace else.

    C# data-structures question

  • file processing
    J je_gonzalez

    The easiest way would be to post your question and have some write the code for you. Here is the code: private string FindSame(params string[] values) { // Default to nothing string sAns = null; // Start out before any valid value int iSame = -1; // Do we have any strings? if (values.Length > 0) { // Setup for looping bool bLoop = true; // Holding area char cChecking = ' '; // Flag bool bCheckingValid; // Loop while (bLoop) { // Move on to next character iSame++; // Reset flag bCheckingValid = false; //Loop thru the strings for (int iValue = values.GetLowerBound(0); iValue <= values.GetUpperBound(0); iValue++) { // Reached the end? if (iValue >= values[iValue].Length) { // No more soup for you bLoop = false; } else { // Do we have something to compare against? if (!bCheckingValid) { // Pick up comparison cChecking = values[iValue][iSame]; // Flag that we got a value bCheckingValid = true; } else { // Compare to string if (cChecking != values[iValue][iSame]) { // Mismatch! bLoop = false; } } } } } // Get the string sAns = values[values.GetLowerBound(0)].Substring(0, iSame); } // Return return sAns; } and here is a sample call: string sSame = this.FindSame( @"c:\dir1\dir2\abc\abcd\file.ext", @"c:\dir1\dir2\abc\efgh\file.ext", @"c:\dir1\dir2\abc\efgh\123\file.ext");

    C# data-structures 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