I have got a question concerning Firefox debugging tools. The debugging tools of Google Chrome (the ones called by pressing F12) offer the possibility to search the html of a loaded site (elements -> search).
As this seems not to be possible with Firefox, I'd like to ask yous whether there...
I am using VS 2015, and I have written both a dummy test method and a dummy test code to try hwow it is possible to make sure that an exception is actually thrown by the code.
private void calculate() {
try {
int[] ia = new int[1];
ia[0] = 1...
using System;
using System.Collections.Generic;
using System.Linq;
namespace ConsoleAppDuplicateTest
{
class Program
{
static void Main(string[] args)
{
List<Student> lList = new List<Student>();
lList.Add(new Student("Joana", "Miller", 23))...
I intend to check for duplicate objects contained in a list, and I have planned to use Linq for this purpose. I would like to illustrate how I achieve checking for duplicates by using student objects which have a first name, a second name as well as an age.
Here you can see the solution...
Originally, I wanted to parse through an xml document, and I wanted to store its nodes in a list - what is more, my attempt to do so was crowned with success:
XmlNodeList elemList = doc.GetElementsByTagName("Manage");
List<Manage> mng = new List<Manage>();
...it is these nodes that I am...
I have got a simple XmlReader with the path to my xml-file ans a settings object as constructor arguments. When executing the code, the debugger always tells me that "r" does not exist in the current context. How can this be?
XmlReader r = XmlReader.Create(@"C:\Users\<me>\Desktop\test.xml"...
I have grappled with WPF-applications, and there is one thing that I could not glean from the documentation:
If I have a WPF-Window with a Combo Box „comboBoxCars“ where the user can select, say some cars. I thereafter added a button „clearAll“, and as soon as that button is clicked, the...
Indeed - I somehow missed it. Now this ought to be the last refactoring:
string inputString = "43";
Regex regexDecimal = new Regex(@"^[0-9]*\.?[0-9]+$");
Match matchDecimal = regexDecimal.Match(inputString);
Regex regexAddition = new...
There is still one thing, though, which is fully behind my comprehension: After some further refactoring, I’d like to match an addition with the following Regex.
Regex regex = new Regex(@"^([0-9]*\.[0-9]+)\+([0-9]*\.[0-9]+)$");
Match match = regex.Match(inputString);
if...
I have refactored it like here:
//This is how to match singfle decimals w/o whitespaces.
string inputString = "23.475";
Regex regex = new Regex(@"^[0-9]*\.*[0-9]+$");
Match match = regex.Match(inputString);
//This is how to match sums w/o whitespaces.
string inputString2 =...
I have a string entry as follows: inputString="2;2" which I match against a regular expression.
inputString="2;2";
Regex regex = new Regex(@"\b[0-9]*\.*[0-9]+$");
Match match = regex.Match(inputString);
The problem is: it seems to match inspite of the fact that "2;2" ought not to match since...
I have written a small console application - I want to read in some strings which I parse as doubles. After the user pushed "r", the first double I add to a generic List<Double> is printed out.
My question is the following one - even though I make a typecast, for example if I enter 2.2 as the...
I created a directory “PSScripts“ on my PC – there I wanted to do some powershell stuff. I likewise created a file called “test.ps“ where I wanted to do some coding stuff. I set the programme supposed to open all files with the .ps-extension to powershell, and naively I thought that nothing...
Thank you very much for your advice. I debugged it and I could fix the problem by calling the Clear() method on all three static arrays both before calling the factorizeEntry()-method again and in each of the catch-blocks.
Now I have changed the logic of the factorizeENtry()-method. I still don't understand why it does not factorize number after number after number. I just want to call the method from within itself but after that happens, it somehow clogs. What coulöd be the cause of this?
/// <summary>...
Even though I didn't stumble over an alogorithm on the net, I seem to have found out:
using System;
using System.Collections;
namespace ConsoleApp1
{
class Program
{
private static ArrayList primes = new ArrayList();
private static ArrayList primeFactors = new...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.