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
X

Xarzu

@Xarzu
About
Posts
113
Topics
88
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • How do I check for existance or clear the contents of a SharePoint List from C# code?
    X Xarzu

    Hi Charles, I sure can. Editing it or presenting it in such a way where company information is no there is going to take time. The code first assumes it is creating the list for the first time and when an exception is thrown if the list already exists, it just loads the list. Here is the code

            string listTitle = "TripLegs" ;
    
            string listDescription = "This is a new list created using CSOM";
            Microsoft.SharePoint.Client.List? newList = null;
    

    Next, we use the "using" method and start a block like this:

                using (var authenticationManager = new AuthenticationManager())
                using (var context = authenticationManager.GetContext(site, user, password))
                {
                    context.Load(context.Web, p => p.Title);
                    await context.ExecuteQueryAsync();
                    Console.WriteLine($"Title: {context.Web.Title}");
                    Web web = context.Web;
    
                    // Create a new list
                    ListCreationInformation creationInfo = new ListCreationInformation();
                    creationInfo.Title = listTitle;
                    creationInfo.Description = listDescription;
                    creationInfo.TemplateType = (int)ListTemplateType.GenericList;
                    newList = web.Lists.Add(creationInfo);
    

    THis is when the try catch block is used if an exception is NOT thrown, then we assume that we are dealing with a list that has not been created yet and the use of the ListCreationInformation class is the proper thing to do. The code in the "TRY" block proceeds to create the columns.

                    try
                    {
                        // Load the list and execute the query
                        context.Load(newList);
                        context.ExecuteQuery();
    
                        Console.WriteLine("List created successfully!");
    
    
                        FieldCollection fields = newList.Fields;
    
                        // set up the columns
                        #region ColumnHeaders
    
                        FieldCreationInformation fieldInfo\_1 = new FieldCreationInformation(FieldType.Number)
                        {
                            DisplayName = "TripId",
                            InternalName = "TripId",
                            Group = "Custom Columns",
                            AddToDefaultView = true
                        };
    
    C# database question csharp sharepoint json

  • How do I check for existance or clear the contents of a SharePoint List from C# code?
    X Xarzu

    How do I check for existance or clear the contents of a SharePoint List from C# code?

    I have complete the code that creates a sharepoint List from scratch, creates the columns, and loads the data that I get from an API GET query of an external database.

    How do I:

    check and see if the SharePoint List already exists
    clear the contents of the sharepoint list
    load the list with new data.
    

    Without doing these steps, I am left with creating the list from scratch each time and giving it a unique name each time.

    Is there some source of information on how to do this that I can find online? The Microsoft AI chat bot has given me some code that does not work at all.

    C# database question csharp sharepoint json

  • What are the details regarding project and/or make file in Java?
    X Xarzu

    I am new to Java but I have worked on the Microsoft product stack. Is there a "make" and/or "project" file equivalent in Java and is there such a project file that is only associated with whichever IDE I am using?

    Java java visual-studio data-structures question

  • What are Good Things to Know in a C# Interview?
    X Xarzu

    What are Good Things to Know in a C# Interview?

    Off the top of my head, I have come up with this list:

    * SOLID mythodology.
    * Dependency Injection
    * Levels of Try, Catch, throw, and finally statements and how they work
    * The tenants of Object Oriented Programming such as polymorphism, enacpsulation, etc.
    * Unit Testing (are interfaces used somehow)
    * The difference between an abstract class and interface
    * garbage collection and when to override or overload it
    * difference between override or overload
    * Is there inheritance in C# ?
    * What is an interface used for?

    I am posting this here to see of anyone can add to this list. I am asking about general topics, not specific interview questions.

    C# oop question csharp testing beta-testing

  • What certifications are good to have and worth my time perusing? I am looking to add such things to my resume to make it stand out. I am a software engineer with experience in C#. I am also interested in JavaScript Frameworks and SQL.
    X Xarzu

    What certifications are good to have and worth my time perusing? I am looking to add such things to my resume to make it stand out. I am a software engineer with experience in C#. I am also interested in JavaScript Frameworks and SQL. PluralSight has come recommendations, but I want to know what YOU think. I am not here to advertise for PluralSight and, besides, I do not agree with what they recommend since I have never heard of some of the technologies that they mention. Here is my opinion. First and foremost I think should be JavaScript as far as important languages to master. What sort of certifications are there for demonstrating knowledge of JavaScript. My next post I am going to make is going to be asking what JavaScript books or instructional sources would you recommend. For fun, I have had a look at what Plural Site and Udemy has to offer. I ran a search on Udemy for "Certification" There seems to be a lot of practice certicationi exams for "Scrun Master". I did not konw that was even a thing. Is it? Speaking of Udemy: maybe I should just take a few corses there and put on my resume that I took the course. I wonder if Udemy offers some sort of verification that one takes a course.

    The Lounge csharp javascript database question career

  • Javascript: indicate when item in a list clicked?
    X Xarzu

    function registerHandlers() {
    var as = document.getElementsByTagName('a');
    for (var i = 0; i < as.length; i++) {
    as[i].onclick = function() {
    alert(i);
    return true;
    }
    }
    }

    And HTML:

    In my life, I used the following web search engines:
    Yahoo!
    AltaVista
    Google

    JavaScript javascript html com question

  • How to make code run differently depending on the platform it is running on?
    X Xarzu

    How to make code run differently depending on the platform it is running on? I have a challenge for you. I have an ASP.NET Web Application built in C# with Microsoft Visual Studio 2017. There is a line of code that we have had to include in order for it to run on a localhost when debugging by attaching it to a running process in a web browser. Here is the issue. That line of code is not necessary when the process is running on the server. I can remove that line when I submit the code in TFS. But it would be great if we could make the code somehow ignore that line depending on what platform it is running on. How can you think this could be done?

    C# csharp asp-net visual-studio sysadmin help

  • How do I set a breakpoint in an attached process in visual studio?
    X Xarzu

    The solution is to attach it to the w3wp process, not the iexplorer or any browser process.

    C# question csharp visual-studio debugging

  • How do I set a breakpoint in an attached process in visual studio?
    X Xarzu

    The solution is to attach it to the w3wp process, not the iexplorer or any browser process.

    C# question csharp visual-studio debugging

  • How do I set a breakpoint in an attached process in visual studio?
    X Xarzu

    I have started a local host application and I attached a project in visual studio to this iexplorer process what was running the app. But I am unable to set break points in the code. I have tried to set break points but the errors says: "This breakpoint will not currently be hit. No symbols have been loaded for this document." Please advise.

    C# question csharp visual-studio debugging

  • How exactly is locking performed with IIS and a web.config?
    X Xarzu

    I have a Web Site I am trying to debug and explore. It is used already. It is already in a workable state on the computers of my peers in my development group. I just want to step through the code in debug mode. To do this, according to a peer I work with, I need to start the web site locally and then attack the project I have loaded in Visual Studio to the running project. This brings me to the error I am stumped on. when I open IIS and click on the option to "Browse *.80 (http)" for the website that is listed and has been validated, it launches the website in a browser but it has an error: HTTP Error 500.19 - Internal Server Error The requested page cannot be accessed because the related configuration data for the page is invalid. Detailed Error Information: Module IIS Web Core Notification BeginRequest Handler Not yet determined Error Code 0x80070021 Config Error This configuration section cannot be used at this path. This happens when the section is locked at a parent level. Locking is either by default (overrideModeDefault="Deny"), or set explicitly by a location tag with overrideMode="Deny" or the legacy allowOverride="false". Config File \\?\C:\Users\....\web.config Of course I have modified the path to the web.config to keep this anonymous. The "Config Source:" on the page has a red highlighted line that has the XML node, but this does not seem to be useful information. The "More Information" area at the bottom of the page says: More Information: This error occurs when there is a problem reading the configuration file for the Web server or Web application. In some cases, the event logs may contain more information about what caused this error. View more information » Since the HResult code is 0x80070021, the corresponding Error message listed on this hyperlink page, https://support.microsoft.com/en-us/help/942055/http-error-500-19-error-when-you-open-an-iis-7-0-webpage is: Server Error in Application "application name" HTTP Error 500.19 – Internal Server Error HRESULT: 0x80070021 Description of HRESULT The requested page cannot be accessed because the related configuration data for the page is invalid. The Cause is: This problem can occur when the specified portion of the IIS configuration file is locked at a higher configuration level. The Resolution is: To resolve this problem, unlock the specified section, or do not use it at that level. For more information on configuration locking,

    C# help csharp asp-net visual-studio com

  • What are the settings I need to have in order to run debug in Visual Studio for a program set up in the IIS?
    X Xarzu

    What are the settings I need to have in order to run debug in Visual Studio for a program set up in the IIS? I have a solution in Microsoft Visual Studio which successfully builds a web solution. This is project is in use and has had other developers work on it. So I can safely conclude that the problem I am having once I run the program locally does not have to do with the code itself but must be on my system somehow. When I click to run the program by clicking on the proverbial "Run" button in Visual Studio that is renamed as "ISS Express (Internet Explorer)", the browser displays the error: "Could not load file or assembly 'Extreme.Numerics.Net40.x64.Serial' or one of its dependencies. An attempt was made to load a program with an incorrect format." I ran the MSI file "Extreme.Numerics.Professional.v5.1.x64" because it was first assumed that the Extreme Numeric was not installed. But when I ran this installer, the dialog window showed that it has already been installed because it offered "Change", "Repair" or "Remove". This implies that it has already been installed. I went to the IIS and I clicked on the Web site and the "Basic Settings..." and clicked to test the settings, it passed the authentication and authorization. Please advise. What should I try next or where should I look to get more clues to fix this? What are the settings I need to have in order to run debug in Visual Studio for a program set up in the IIS?

    C# help csharp security visual-studio windows-admin

  • What is a good learning resource for TFS and how to use TFS with Visual Studio?
    X Xarzu

    What is a good learning resource for TFS and how to use TFS with Visual Studio? I want to know how to use Visual Studio to look up the actual version. How do I determine the details of what is already checked in?

    Visual Studio question learning csharp visual-studio tutorial

  • How do I see code that I have just reviewed in TFS in Visual Studio?
    X Xarzu

    How do I see code that I have just reviewed in TFS in Visual Studio? Another developer has made code changes to the project and submitted a code review. I reviewed the code and made the automated"Looks Good" response. I have learned that he did not complete the process to check the code in. How do I go about looking at his changes? He says that it is on his local computer but, then again, I saw the code changes. Please advise.

    Visual Studio question csharp visual-studio code-review

  • Windows 10 Update Issues...
    X Xarzu

    Michael Martin, do you mean "Media Creation Toll from Microsoft"?

    The Lounge help announcement com tutorial question

  • Windows 10 Update Issues...
    X Xarzu

    I got locked in one of those update loops. You know what I mean, probably. My Windows 10 would start an automatic update, then fail, and then reset itself to a previous version. This would happen all of the time. I eventually decided to back everything up on an external drive and simply reinstall Windows 10 from scratch. Then I found out that the CD (or maybe it is a DVD) was lost in our move. I have the ("OEM"?) sticker but the actual product CD has been lost in the move and I can not find it. Does anyone know how I can reinstall the OS with just the product ID etc.? Someone suggest this link as a way to fix the problem: https://www.alphr.com/microsoft/1001411/how-to-fix-windows-update-in-windows-10-if-it-becomes-stuck-1 [quote] How to fix Windows Update in Windows 10 if it becomes stuck We reveal the number of ways to jump-start Windows Update if it decides to stop working Windows Update gets stuck. It's a fact of life. A rubbish fact, mind, but a fact nonetheless. Ever since Windows was capable of updating itself via the internet, it's always got stuck at some point in time. Windows Update being stuck is an inevitability, just like your toast falling butter-side down onto the floor or it always raining on that one day you tell yourself you'll sort the garden out today. [/quote] . . . [quote]How to fix Windows Update: Delete files in Software Distribution This trick, thanks to The Windows Club, involves a little more interaction with your computer’s system settings. It shouldn’t cause any damage to your PC – you’ll only really be deleting temporary Windows Update files – but we’d recommend setting up a System Restore point before going any further. First, you’ll need to stop Windows Update Service and Background Intelligent Transfer Service. Type "win+x" to bring up the WinX menu, and from here select the command prompt (admin). There are two commands you’ll need to type: net stop wuauserv net stop bits Press Enter after you type each one. This will turn off Windows Update Service and Background Intelligent Transfer Service. Next, you’ll need to delete the files in C:\Windows\SoftwareDistribution. Go to the appropriate folder, select all of the files and press Delete. If the files can’t be deleted because they're in use, you’ll need to restart your PC. Turn off the two Windows Update services and then try to delete the files again. Once the folder has been emptied, either restart your computer or manually turn on the Windows Update ser

    The Lounge help announcement com tutorial question

  • What is the format of a SQLConnection connection string?
    X Xarzu

    What is the format of a SQLConnection connection string that is passed in the constructor method? I have run a search engine search online and all I could find so far is examples like: "Data Source=(local);Initial Catalog=AdventureWorks; Integrated Security=SSPI;"; "User Id=sa;Server=localhost;Initial Catalog=Test;" The examples raises questions. Since the SQL Server Management Studio (SSMS) program offers a different set of fields during start up in order to connect to a database, I have to ask how does "Server type, "Server name", "Authentication", "User name" and "Password". Also, is "Catalog" another name for a database table?

    C# database sql-server security question sysadmin

  • { get; set; }
    X Xarzu

    from time to time, I see some sample code that is handed to me that has a code snippet that looks like this: public string Name { get; set; } Does this actually do anything? Does it really make it so that one can set and get the "Name" string variable? I have always thought that what is required is something like this: private string name; public string Name { get { return this.name; } set { this.name = value; } } Am I correct? Please advise.

    C# question

  • How do I declare diverse constructors in C#
    X Xarzu

    In C#, can I declare more than one constructors? If I do create a second constructor in order to pass variables to, how can I do this and, if so, how? Also, if this is allowed, why does Visual Studio show this as a fault? https://tinyurl.com/ydesvncq

    C# question csharp visual-studio com

  • What does ".then" mean in JavaScript?
    X Xarzu

    What does ".then" mean in JavaScript? Consider this snippet of code:

    return ajaxService.request('post', 'api/{ticketId}/alt-forms/getSatelliteMapUrl', geoCodedata, { failureMessage: 'Failed to Geocode SatMap/PDF'})
    .then(function (satelliteMapData, data) {

    Is the ".then" comment attached immediately to the previous "return" statement? If so, how? If not, then would the functionality of this JavaScript bit not be impacted if I put an "alert" statement immediately before the ".then" statement and immediately after the "return" statement?

    JavaScript javascript json 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