instruction
stringlengths
71
71.9k
I have a program that brute force searches for a combination of inputted array elements by the user and when the program is searching all the for loops are nested for the brute search then I have this test() which looks is responsible for testing out all the possible combinations of the nested for loop to find the the ...
I have written a rolling z-score function myself. Is my implementation of rolling z-score function correct? #x is an xts object and y duration eg rollz(x,25) rollz<-function(x,y){ avg=rollapply(x, y, mean) std=rollapply(x, y, sd) z=(x-avg)/std return(z) } EDIT Here is the description of z-score. A rolling (mov...
I have created a class to keep track of some internal states. You can see it as a very simple implementation of a state machine class State extends Backbone.Model defaults: step: 'start' initialize: -> @stepDefs = [ name : 'start' , name : STAGE_1 precondition: ...
The purpose of the class is to provide an easy way for create and verify a signed license file (or key). I am interested in any improvments / thoughts about the class. Usage: var signer = new LengthSigner(); // creation var properties = new Dictionary<string, string>(); properties.Add("Key1", "Value1"); properties.Add...
I am using a Rails web app on the machine webapp, from which I call an action, that pushes a file to a remote server backend. Due to security reasons, we are using SSH keys and put the public part into user@backend:~/.ssh/authorized_keys. The keys are restricted, so the Rails app does not have full control over user, l...
I've written a simple JavaScript function to find numbers that contain both the attributes of a Triangle (\$ n(n+1)/2 = x \$) and a Square (\$ n^2 = x \$) number. The challenge was given in Matt Parker's Things to Make and Do in the Fourth Dimension. function main() { for (var i = 1; i < 1000000; i++) { var trian...
My code is very simple, it asks for an input then stores the input. I am new to c# and wanted to know if it was possible to both ask and accept the input on one line. using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace ConsoleApplication { c...
api.js 'use strict'; const http = require('http'); module.exports = url => { const options = { host: url, method: 'HEAD', path: '/' }; const req = http.request(options); req.end(); const promise = new Promise((resolve, reject) => { let connected = false; req.on('response', res => { ...
I have written the following code to export to data to a spreadsheet with this result: Please let me know how to improve it. import numpy as np import xlwt #THIS MAY BE GOOD #from pandas import DataFrame amin =2 amax=10 da = 2 names = ['amin', 'amax', 'da'] values = [amin, amax, da] fname='EXPORTexample.xls'; sheetn...
My code takes an input, uses the input to take a number of letters from the start of the alphabet and put them at the end. I intend to use this to create a Caesar style cipher. Is there a way to do this more elegantly? using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.T...
The idea is to improve the usage of larger formulars. Done by adding a little animation to the input-elments. When one of the textboxes is clicked or focussed via tab appears a colored border. Signalling the user which exact box has become active. (function() { var inputs = document.querySelectorAll('input[type=te...
I'm teaching myself programming. I would like to know how I could make this Python3 could more flexibile, for example if I wanted to find students with the 3rd lowest grade, or the lowest, or any other value. Based on this piece of code (that it took me awhile to fathom out) I'm not convinced Python is the best tool fo...
Please keep in mind I am new and still learning when reading the following. What I am doing I have the following code which pulls a sport, tournament and round NR, from a DB table called event where the event is still active. The Problem The code works and does what I want it to do, but my problem is looking at the cod...
I'm not a security expert, but while checking over our AES implementation for our flagship product, I've noticed some strange things, like the output length having a relation with the input length and no apparent use of an IV. @Service public class EncryptionServiceImpl implements EncryptionService { /** The logge...
I created a simple linked list to test what I've learned so far and if I manage everything correctly. If you see syntax errors is't because of copy-paste. I just want to know if i'm making everything in the right way without having leak and memory problems. Node class #include "Node.h" //Constructor. Node::Node(int ...
I've written a Minesweeper program, but my code for generating the buttons is taking much longer than I'd like. Here is the GUI code: this.boardPanel.Controls.Clear(); this.boardValues = new int[mode.size.Width, mode.size.Height]; this.boardFound = new bool[mode.size.Width, mode.size.Height]; ...
Problem: I need to let my web-app users create their own blade layouts. The content shall change based on what is in the database, hence their layouts should become dynamic in nature. With only the content parts changing and layout different as customized by the user. Solution: Save the user's layout code into a databa...
I am new to clojure and I wanted to test out my skills by taking an existing implementation written in Python and writing it in Clojure. Concerns My main concerns are where I use cond and put an upto parameter in the function definitions of isWitness and probablyPrime. I am not sure if that's the best way to loop (I tr...
Alright guys, I know this isn't the proper way of problem solving, But I need some guidance here. Since I am just starting in programming, the code is not really readable. The Winforms program (essentially a glorified Excel sheet) I created is made up from different textboxes (as shown in designer picture below). The t...
I have a huge file (1Gb) with English sentences and I need to filter only those containing the Alice word. Actual tests could be more complex, e.g. matching a verb by its wordforms (go, goes, gone, went, going). To solve the task I have designed a method, which feeds English word as it is ready to a consumer and if tes...
In this post, I asked for an overall review of a script to auto-generate table captions, because it was running relatively slowly. I've used Debug.Print to isolate the problem, and this function takes the longest (at 16 seconds). The purpose of the function is to find the heading of a specified style that the selected...
I have written some code to calculate effects using the Delta method. I have a dataframe dpcp with variables x1, x2, x3, x4 and a matrix of 1000 draws from a multivariate normal, m4[1000,4]. This code works to calculate the effects, but it runs very slowly - it currently takes upwards of 5 hours for only 2000 observat...
I have an ordered list in this format. The data is ordered by path so that the list will never contain a child before the parent in the list. id, path 1, null 2, null 3, 1 4, 1-3 5, 2 6, 2-5 Each entry contains the path it needs to place itself in the tree structure. The catch is that the list doesn't always start wi...
Before I get into describing by problem I'd like to point out I found this question under c++ tag. But the solution of that question is already implemented in my code. I am solving a problem from hackerrank. My code for that problem is logically correct but in some of the cases time limit exceeds. Problem Statement Gi...
After much frustration and leaked memory from working with UserPrincipals and DirectoryEntrys, I have made a wrapper to get the relevant data from these objects and then dispose of them, keeping the data in a form that will be dealt with automatically when it reaches the end of its scope. Side Note: As it stands, I can...
I have two dataframes, df which contains a list of members in addition to the type of contract that they purchased on a given date, df is about 10 000 entries. I have another df_prices which contains the average price of a given contract for a given year and month. df resembles: Member Nbr Date-Joined ...
I’m writing a Rust function for getting a title based on the first line of a file. The files are written in Markdown, and the first line should be a heading that starts with one or more hashes, followed by some text. Examples: # This is a top-level heading ## This is a second-level heading #### Let's jump straight to t...
I've recently learned that as a Java developer my methods throw exceptions way too often, even when the reason for throwing is related to a business rule, when returning an error code instead could perhaps be more suitable. I'm trying to learn how to differentiate real exceptional cases which require throwing exception...
According to my time profiler this is taking 45% of my cpu usage: have tried to optimize, and someone on stack overflow -- recommended to post here. Time profiler says 99% of the time is spent on the closing brace of the world.enumerateChildNodesWithName override func didSimulatePhysics() { world.enumerateChil...
I'm learning Python from Coursera and am doing a class. One of the assignments is as follows: Write a program to read through the mbox-short.txt and figure out who has the sent the greatest number of mail messages. The program looks for 'From ' lines and takes the second word of those lines as the person who sent the ...
I've been messing around with the SE Data Explorer and I've come up with a query that basically returns information about questions that have a high number of views per day, that have few or no answers. SELECT TOP 500 Question.ViewCount, DATEDIFF(dd, CONVERT(date,Question.CreationDate), CONVERT(date,...
Problem from HackerRank:: Problem Statement: There are \$N\$ lines. Each line has an index between \$1\$ and \$N\$. The slope of each line is negative, i.e. it goes from upper-left to lower-right. There are \$Q\$ queries. Each of them is in the format \$L\$ \$R\$ \$x\$ \$y\$, and you should output whether there is any...
The task at hand I have previously asked about how optimizing Project Euler 1. See Generalized Project Euler 1: A sledgehammer to crack a nut. In this question I wanted to explore the next problem: Project Euler 2: Even Fibonacci numbers. Even Fibonacci numbers Each new term in the Fibonacci sequence is generated by a...
I have created a simple Tic Tac Toe game using JavaScript and using jQuery. I have used bootstrap for the UI. I am just a beginner, so some feedback on the JavaScript element would be great. $(document).ready(function(){ // true = player 1 // false = player 2 var pressedIndex; var pressedElement; var status...
Below is a simple C++ abstraction over linux sockets, and a layer of abstraction over a synchronous poll call. The goal was to exploit move semantics to allow the Sockets to be used as value types. socket.h #pragma once #include <cstdint> #include <string> class Socket { public: Socket(){} virtual ~Socket(); ...
I am currently wondering if the following piece of Javascript code could be simplified? I would like to return the correct {},[],"" without having to pass a type as argument. Is it possible? function getObjectProperty(object,field,type){ switch (type){ case "Array": return object && object.hasOwnPrope...
I need to ensure a method is executed only by one thread at a time. Contrary to what most of the synchronization primitives do, I don't need other threads to wait, I want them to return from the method immediately if it is already executed by another thread. Additional complexity is that the method uses async/await cal...
I have made a generic pairing heap library in C. Pairing heaps are one of the several heap variants with better asymptotic running times than standard binary heaps (others include Fibonacci heaps and binomial heaps). However, pairing heaps are the only ones that really do better than binary heaps according to Wikiped...
I am currently in the process of learning WPF Prism and I have four buttons that I want to all go to the same place but with a different value being passed depending on which button has been pressed. Below is the code that I currently have. ApplicationCommands.cs public class ApplicationCommands { public static Co...
I implemented a Python version of KMP followed by Princeton Prof Robert Sedgewick's discussion. However, I got a Time Limit Exceeds error. Per leetcode's explanation, TLE indicates that the solution is correct but it is extremely inefficient when test case with huge input size. If I understand TLE correctly, this means...
A few days ago I found myself learning lolcode. It turns out it's (almost) a real language and capable of handling (pseudo-)serious problems. So, let's try some (pseudo-)serious code this time. Project Euler 14 A Collatz sequence is defined for the set of positive integers: n → n/2 (n is even) n → 3n + 1 (n is odd) Us...
There are buttons on a page, each corresponding to a different code that needs to be sent to PubNub DSN, which is published to my home server to operate specific on/off commands for various lights in home. This is primarily a learning experience for now. I currently have 4 basic buttons on page: <section id="main" role...
Problem: In this problem I had to remove all vertices with degree one from a given graph in rounds and count how many rounds are required to remove all possible vertices with degree 1. e.g. 1-2-3-4 Remove 1 and 4 in round 1. Remove 2 and 3 in round 2. e.g. we can't Remove any vertex here. Total 0 rounds. 1---2 \ / 3...
I have been using the w3 org's JavaScript Best Practices web page's examples for coding an object literal for a game. It is my understanding that I should use this to keep all my variables and arrays that are not associated with/inside functions. I should then use methods to access and update the values and arrays. I w...
I'm working on a screen sharing project, and I receive a small block of images from a Socket constantly. I need to update them on a certain initial desktop bitmap I have. After receiving every block, it copies its pixels according to a specific position (X and Y parameters), which is how the initial image gets updated....
Following on from my last question, I've been continuing to look at what information is available from the SE Data Explorer, I thought it would be interesting to know who else had favorited a question. Which led me to this query: DECLARE @FavoriteType TINYINT = 5; SELECT Votes.UserId AS [User Link], Vot...
I wrote a simple JavaScript function to animate objects on my webpage to fade and slide in from the bottom of the screen when the user scrolls them into view. I did this by using JavaScript to add and remove a CSS class that animates the element to every element with the showOnScroll class. Example element: <content-c...
bool isFileExist(const std::string& fileName) { return !!std::ifstream(fileName.c_str()); } This is a function to check if a file exist. Are there non-obvious problems?
This is my sample code to convert a integer into string. Is it very costly to do the multiple loops of [NSMutableString stringWithFormat:..]? I.e should I just use appendString and get the NSString in reverse order and then do one for loop to reverse this "reverse string". Is there any other faster/more elegant way? NS...
So this is part of my AVL tree implementation, namely the infix representation of the tree. Since I wanted to use a recursive method to stay close to the original algorithm and want to return a list, I have to store the values in a parameter. The smelly part is in getInfix when I reference that parameter to return the ...
A Junit test class is used to test the class LibraryCounter. Reflection was used to test the private methods. This made the code much more complicated. import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.util.logging.Level; import java.util.logging.Logger; import org.junit.T...
Thanks to this post, I was able to create a working piece of javascript that fits my needs. I have a div/ul/li based table where each "row" has 2 values that I want to have the sum for. Currently the code does exactly what I want, but somehow I have the feeling that the javascript is not coded in the most efficient way...
This is my first actual python tool I've written and I'm certainly happy with the way it works, but I'm sure there's better ways to do things in the code. Any ideas on how to speed it up would also be nice too! Code: #!/usr/bin/python import StringIO import getopt import hashlib import sys import os print " " print "P...
I completed this problem for an interview and my solution as rejected; of course no reasons were provided. I opted to use the nearest neighbour algo based on the timeframe allotted and having no indication of the average number of coordinates that will be fed to the function. I didn't want to use an exact solution tha...
My code makes the four tests pass, but I'm worried I'm missing something. Is the code too simple and not encompassing enough? I'm just beginning to learn so any feedback is welcome! Here's the Rspec followed by my code; notice there's no 1-100 requirement like on some other FizzBuzz challenges: describe "fizzbuzz" do ...
Background: I'm trying to learn C++ and I'm doing that by writing some programs by myself. I'm decent with C, but I'm having trouble translating to OOP paradigm. I'm reading from learncpp.com and a book called Thinking in C++. I'm noticing that reading doesn't really help much as much as writing programs and running in...
I don't know if it is any good. I've never done this, thus, I noticed it is kinda slow. Can you suggest improvements? I may use it in actual software in the future. private int secgen(int minvalue, int maxvalue) { Func<int, int, int, int> modular = (a, b, mod) => { long rem; ...
I would love some feedback on my linear finite state machine. I say linear, as it can only handle one state at a time. I am also giving my method of how I -work- with the state machine, as I would love feedback on these bits also! The things I wanted out of this, were: to be able to add x states to the stack, and let ...
How can the following code be made idiomatic in ELisp? Can the temporary f variable be removed? (global-set-key [f3] (lambda () (interactive) (let ((f (ffap-file-at-point))) (start-process "test" "output" "mpv" f))))
For an online screen, I had a question that would take in a vector of strings, and return a vector of strings indicating whether the input string was a valid combination of []{}(), where valid means the braces are matching and not interleaved. There are no empty string inputs. For example, [(())] is valid, but ), {, an...
Challenge Write a program which reads a file containing Morse Code and outputs the conversion. Specifications The first argument is a path to a file. The file contains multiple lines. Each line is a string of morse code. Each letter is separated by a space. Each word is separated by two spaces. Constraints The...
I'm implementing a function that behaves like getline() which reads a line from file descriptor and returns the results without \n. allowed functions, read(), free() and malloc. Please review my code. #include <unistd.h> #include <stdlib.h> #include <string.h> #ifndef GET_C_BUFF_SIZE # define GET_C_BUFF_SIZE 1023 #endi...
I've created a function to calculate the working minutes between two timestamps. I class working minutes as those between 9am - 5pm and not on weekends or national holidays. The holidays are those in the UK. I think the function itself is quite quick, although generating the initial series probably takes a bit of time....
This is my first time building an Android app or even using Java in the first place. All of this code does work, but I'm hoping to optimize it or find out if things could be done more easily than how I've done them. radio.java package com.example.jacob.wutk; import android.media.AudioManager; import android.media.Medi...
I wish to make a file to click on to do the 'usual' tasks I would do to clean/perform maintenance on my mother's computer when I'm not present. I made a script file and took a few command lines from Google. Am I on the right path? <job> <script language="VBScript"> Option Explicit On Error Resume Next Dim WshShell Di...
I'm new to HTML and programming in general and I want to make sure my code is organized and that I'm using the best practices while I go along. So, I made this example layout I would like to convert to HTML5: And this is the HTML5 code I created: <!-- Solutions Section --> <section id="Solutions"> <header> <h1>T...
def bfs(graph, root): visited, queue = [], [root] while queue: vertex = queue.pop(0) for w in graph[vertex]: if w not in visited: visited.append(w) queue.append(w) graph = {0: [1, 2], 1: [2], 2: []} bfs(graph, 0) Does this look like a correct impleme...
I asked similar question at: https://stackoverflow.com/questions/38410982/superfast-regexmatch-in-large-text-file from datetime import datetime startTime = datetime.now() f = open('data.txt', 'r') t = f.read().splitlines() paid = list(set(t)) with open('f.txt') as f: for line in f: for x in paid: ...
I am using the below function for converting the accented character to a standard ASCII user name. function transliterateString($txt) { $transliterationTable = array('á' => 'a', 'Á' => 'A', 'à' => 'a', 'À' => 'A', 'ă' => 'a', 'Ă' => 'A', 'â' => 'a', 'Â' => 'A', 'å' => 'a', 'Å' => 'A', 'ã' => 'a', 'Ã' => 'A', 'ą' => 'a'...
I'm creating a simple android app for pre-highschool students which teaches the very basics of addition or multiplication of integers or decimals. The part of the program in this question is aimed at allowing them to practice without the need of a teacher giving them exercises and checking their results. Note: This is ...
I have this below Data Structure. The output will be like m - n - o - p - q - r - s -t Please review the below code and let me know if any optimization can be done. public class Application { public static Node root = null; public static Node temp = root; public static Node anotherTemp; public stat...
I have code that loading bitmap from file. And searching for black rectangle(5*5). Can you help me to review it? namespace TakeScreen { class Program { static void Main(string[] args) { List<List<Color>> Sequence = new List<List<Color>>(); for (int i = 0; i < 5; i++) ...
Following on from my program to identify files that have common file sizes, I have developed an application that takes the output from that process and then compares each of the files that are the same size in order to identify duplicates which are then written to a '.matched' output file in the form <FullPathFile>|<Fu...
I've written a new malloc implementation similar to dlmalloc and was hoping for feedback on it. The goals for this library are: Easy to read and maintain Be more memory conserving High efficiency and good performance Portability The documentation is here and the code could be found here. /********************** mallo...
I have written several subs which are then called from a main sub. Individual subs run very quickly, most are instantaneous (the DoFind sub takes a few seconds to run due to the large amounts of data in the table) however when I run the main sub it takes up to a minute to execute. Any ideas/tips on why this is the case...
In order to test some software I've written, I need to write values to a test harness with OLE for Process Control (OPC). The problem is, for a larger range of values I'm generating points for (say 10000), this code can take 15 seconds to execute. I need it to work in under 1 second. import OpenOPC import argparse im...
I want to enter names, student numbers and student scores and display this information. I used arrays in this way: #include "stdafx.h" #include <iostream> #include <string> #define size 3 using namespace std; class student{ public: void vrod(); void dis(); int stno,score,i,n; }; void student::vrod(){ cout<<...
I wrote a bot for a Programming Puzzles & Code Gold King of the Hill type of challenge called "Spacewar!". The challenge was written by @El'endiaStarman. The bot is called "Spy". The controller is hosted here, so take a look for the feel. The API is a bit long, so here's a link. The bot's logic: It runs away from the...
I have the following piece of code which hides an element when a specified date was reached. I would like to get some tips about do's and don'ts. Specifically, I'm interested in: improvements brought to this code avoid bad practices And whatever you guys consider I should be careful about. var Timer = (function(){ ...
I have this SELECT statement that inserts into a temp table and it is slow! Right now it takes ~1500 ms to run and only deals with ~7000 rows. As the data grows larger the longer it will take. I am using SQL server 2014. Is there anyway to improve performance of all these case and casts in the statement? select a....
Iron's cookie and session middleware projects seem to be abandoned. I've put together implementations for them, along with a session flash provider. They seem to be working fine. They are all very small, so I'll paste them in their entirety below (each file is linked to a Github repo and each repository also contains a...
I learned Bash a million years ago. I just wrote this simple script used to get the first lot of HTML comments from a file, and spit it out in order to create a README.md file. It is just. So. Ugly. I read bits and pieces over the years, and I am sure it can be improved so much... Here we go: #!/bin/bash IFS='' active...
I have this piece of Ruby code: HTTPCLIENT = HTTPClient.new def read_page(url) HTTPCLIENT.get(url).body end The HTTPClient object is being created and declared as a constant, and thus it can be accessible by methods. I would do this by declaring it as a global variable ($) or as a class variable (@), but I'm not su...
I am trying to get active directory groups with their users, all while disposing of all IDisposable assets when they reach the end of their usefulness. The groups and users are passed into a method that extracts certain properties and adds them to ExpandoObjects. This requires a decent number of nested using blocks. Si...
As I stated in an answer comment on my previous question, the UserIterator has a much larger footprint than I think most people realize. This question is here to further explain the project, the UserIterator's role, and what I'm trying to achieve with this specific piece of the code. If any of you have had experience w...
My site was recently infected and running malicious scripts. Once I discovered this, I cleared everything, the hosting company re-initialized the VPS and I setup my site anew. This is how I run my PHP scripts currently. I have two objectives: To keep my scripts from being directly accessible from the web To never run ...
This is the first real program I've written in Go so have at it! I wrote it because I use a tiling window manager that doesn't have any brightness control functionality (at least not that I know of). package main import ( "fmt" "io/ioutil" "log" "net/http" "strconv" "strings" "os" ) func m...
I recently asked for some feedback on my design for a syncronous wrapper around linux sockets and poll Based on the feedback, I created a new (hopefully more idiomatic) design. socket.h #pragma once #include <cstdint> #include <string> class Socket { public: Socket(){} virtual ~Socket(); Socket(Socket &&o...
This code (an implementation of the path finding Needleman-Wunsch algorithm), given two sequences, correctly aligns and calculates the similarity of them. For example, given two sequences: AAA,CCC or AA,CA it correctly aligns them as ---AAA CCC--- and -AA CA- respectively, while returning the similarity. %...
Having some trouble with a code I'm trying to refactor, where I need to go over a 'tree' of items, filter some invalid items, and create a new array of filtered items which takes properties from both parent and child objects. To demo the problem I made a quick snippet - const items = [ { name: 'Shirley Hardin', ...
I am working on a program that would generate swift classes/ structures for JSON file contents. The link to the application is Json2Model in case you want to contribute directly. I do not know a lot of Swift but this is what I came up with. These classes most likely will not hold any logic they are just data. input.js...
I made this program to find primes and twin pairs. I'd like feedback on anything from formatting to content to technique. In short: how would this be different if it was written by an experienced professional? The program runs five methods: getMax asks for an integer input which is the maximum number below which to fi...
I am working with some wireless communication in Arduino. My data will be wirelessly received like so: 97 97 97 ... ... 979797 is the address of the transmitter. I have written the following code to check the address first before processing the data. My main concern is speed of computation. void printBuffer(const uin...
Looking for suggestions on how to unit test a Spark transformation with ScalaTest. The test class generates a DataFrame from static data and passes it to a transformation, then makes assertion on the passing static data generated in the test class. (The transform creates a second column b defined as col("a").plus(5)....
I've created a little hangman game. It's pretty simple, and not to exciting but I want to know if there's a way I could turn this little game into something more extravagant and more exciting. How can I take this delicate piece of crap machinery into something a little more fun and a bit more complicated? For example: ...
Challenge This is a solution of Project Euler 72 in Java. How may proper reduced fractions \$\dfrac{n}{d}\$ are there, where \$n < d \le 10^6\$? Code public long solve() { int limit = 1000000; int[] phi = IntStream.range(0, limit + 1).toArray(); long result = 0; for (int i = 2; i <= limit; i++) { if (ph...
This week, in an ongoing job search, I was tasked with the following pre-screening question: Make two simultaneous http requests. Use the language and library of your choice. Make sure the results are combined and resolve into a single return. For this I chose JavaScript and jQuery, culminating in the following Gist ...
I had a silly assignment: You are given a binary file FLOATS.DAT of unknown length, type float data has been written in it. Write a program which sorts the data in the file (the output is a sorted file FLOATS.DAT). You need to sort it without loading the file into memory, or by using a temporary file. Use the ...
I want to print a tree in a zigzag manner level-by-level. I'm wondering if there are any logic issues in my code and any further performance improvement ideas by using a smarter algorithm implementation. class Node: def __init__(self, value): self.value = value self.left = None ...
My goal is to read from standard input, break up the input into words (Unicode letters and apostrophes), case-insensitively, and produce a report to standard output, where each line is a word followed by a space followed by its count. The output should be sorted by words. This is my code: using System; using System.Tex...