instruction
stringlengths
71
71.9k
I have an array matrix, for example A(3,3), I want to make a table with header names like, ['force','mass','acceleration'], the second row contains the units (subheader), ['N','Kg','m/s^2'], and the rest of the table contains the elements of A. I want to export this table as a (.dat) file, how can I do that in an effic...
I started learning Python recently and I really like it, so I decided to share one of my first projects mainly in hopes of someone telling me what I can do to make it run faster (threading/multiprocessing?). from requests import get from bs4 import BeautifulSoup from time import time from re import compile print('***P...
I have written a working minimax tree for Tic-Tac-Toe. What I have done so far is create a tree with end node having value 10, 0 or -10 base on win, lose or draw. After I create a tree I then determine the move based on depth first search which bubbles the end node value to root node. Based on the value received at the...
I'm new here and this is my first simple console application that calculates the number of hours left. There's a lot to improve and if you have any suggestions on what things to add or refactor that would be awesome! It's 486 because it's the usual number of hours an internship has. The user presses 1 to enter the nu...
This script is designed to create an Excel spreadsheet from each HTML table from auto-generated index.html file. It needs to be very robust but unfortunately I don't have many example files to test it against. Any feedback on style, possible points of failure, or vulnerabilities would be very appreciated. Powershell f...
I have just learned classes and was practicing some examples from the textbook when I came to a screeching halt. Here's the program I have written, which is complete but not optimal. What this program does is that it inputs information about the company and then lets you display the data or search for a specific set o...
This is a Python document (PDF) downloader I made to download some question papers automatically. However, it is very slow. Any better way to do this? try: import urllib2 from bs4 import BeautifulSoup from time import sleep import os import sys from time import sleep except ImportError: prin...
I was searching for a way to display a List<T> with n elements in a user friendly and easy to handle way within the console application. So I wrote this console-list-pagiation method. Probably there are ways to improve the usability of my approach. public static void ConsolePaging<T>(this IEnumerable<T> Values) { i...
I would like you to take a look at this simple script I wrote that's supposed to emulate the Unix sort [FILE] | uniq -cd command. What's different about my script though is that it also lists line numbers telling the user where occurrences of duplicate lines are located in the file. Please, tell me what you think as we...
I have been using R for stock analysis and machine learning purpose but read somewhere that python is lot faster than R, so I am trying to learn Python for that. I am using Yhat's rodeo IDE (Python alternative for Rstudio), Pandas as a dataframe, and sklearn for machine learning. This is the code I wrote for forecasti...
One of the requirements of a third-party SDK I am integrating with is to sign an identifier string with the identity from a p12 certificate. This code loads a p12 certificate from the application's bundle, opens the cert with the specified key, retrieves the key, signs an input string (the requestorID) with the inform...
I'm mainly wondering about whether or not I have used the (TAP) async/await pattern correctly. I get a bunch of these warnings, "Because this call is not awaited, execution of the current method continues before the call is completed.", however that sounds like exactly what I want. Which is for the server to be able to...
I've been thinking of using this: template <typename T> inline T from_string(const std::string& s){ std::istringstream iss; iss.str(s); T result; iss >> result; return result; } in my code. Then I thought "I shouldn't construct istringstreams all the time", and made it into this: inline std::istringstre...
This is my simple game that gives you a country and has you enter the corresponding capital. What do you think? (Before running it you need to do score.txt.) package com.company; import java.io.File; import java.io.FileNotFoundException; import java.io.PrintWriter; import java.util.Random; import java.util.Scanner; p...
In one site there was one question to make one program where you will be given a positive integer n and we have to calculate the number of such pairs (a, b), where n = a² - b² and both a and b are positive integers. for example 15 = 4² - 1² = 8² - 7². Currently this question is closed and in my case I am still not able...
I'm experienced with JavaScript, but new to refactoring. Sonar specified that the below function is too complex. I'm looking for suggestions on how to simplify it, mainly the conditional statements. _executeWhenReady: function() { if ($('#applyButton').length) { $('#applyButton').on('click', function(e) {...
I'm creating a little proposal for the data access layer using Dapper ORM. The code is based in an generic interface IStore: public interface IStored { int Execute(string Name); int Execute<Output>(string Name, Output Parameters) where Output : class; IEnumerable<Output> ExecuteReader<Output>(string Name) w...
Here, the for loop loops over a arraylist and checks smsc type of batch and submits it to the proper queue. Is there a way to rewrite this piece of code in a better way? Is there any way to eliminate the if/else? for (Batch batch : input.getBatches()){ ArrayList<Messages> arrSentsms = batch.getlist(); String smsc =bat...
I have written a prefix-free compressor that assigns the shortest bit-strings to the most common characters. It works very well for natural language as some characters (SPACE, "a", "e" ...) are much more common than others ("y", "z" ...) This method of compression does not work on random text where each letter is equal...
I have a working VBA script for Excel that converts a matrix of data with multiple records in per row to multiple rows with one record per row. A StackOverflow user told me that the code could use significant improvement, specifically mentioning implicit variants (not quite sure where I went wrong there), difficult to ...
This is basically designed to format/bold/fill whatever cell has a value greater than 0. I would appreciate some help in simplifying it so that it doesn't lag as much. Public Sub basesheet() Dim ws As Worksheet Dim icounter As Long Dim wso As Worksheet Dim rw As Long Dim lastrow As Long Set wso = Sheets("Base sheet(O...
The program is complicated. I didn't call any class because it was hard for me using classes. Did I do something redundant or did I miss something? import java.util.Scanner; public class Gpa { public static void main(String[] args){ int i; Scanner keyboard = new Scanner(System.in); //7th t...
I am working on brushing up my data-structures knowledge, and was hoping to have my code/thoughts reviewed. Thoughts on Generic Array Stack: Insertion/Pop are amortized to \$\mathcal{O}(1)\$. This is because the stack resizing itself should be a rare enough event that it won't increase the overall time. Peek is \$\mat...
This connects to Salesforce to import a report through the enabler4excel add-in. The report overwrites what is currently there on the sheet (2016 Incidents Dashboard). The report contains about 55,000 rows and 10 columns each. I also have 8 columns of formulas (nothing complex) off to the right. The next section autofi...
I'm currently making a mobile phone simulation, using a custom object in an ArrayList. I was wondering if there was any difference in using these two following styles. First style, creating a new instance of Contact in my update method as so: private static void updateContact() { System.out.println("Enter a contact...
I'd appreciate any comments about my Python calculator, ways in which it can be improved and where it's currently lacking. import operator """ Do the actual calculation """ def calculator(operation, operand_1, operand_2): ops = {"+": operator.add, "-": operator.sub, "/": operator.div, "*": operator.mul} return...
This code is a representation of lambda calculus using an AST instead of text. -- beta -- (App (Abst var body) env) -> (Sub body var env) -- eta -- (Abst var (App body var')) -> body -- alpha -- (Sub (Var var) var env) -> env -- (Sub (Var var') var env) -> (Var var') -- (Sub (Abst var body) var env) -> (Abst var bod...
I have a method which uses the same code over and over again. I would like to optimize my code in such a way that there is no repetition in my code. I am sure there is a better way to do things instead of using the if-else statements. private void web_content(final String content1, String content_type1, final String co...
I am using Clojure spec to conform (coerce) a 1 or 2 value of a number type or string into a 1, 2 or :clojure.spec/invalid. (require [[clojure.spec :as s] [clojure.core.match :as m]]) (defn parse-number [n] "Parses a string or number in a safe way." (m/match [n] [_ :guard number?] n [_] (Integer...
How can I improve the speed of the script? $Excel = New-Object -Com Excel.Application $Excel.visible = $True $Excel = $Excel.Workbooks.Add() $wSheet = $Excel.Worksheets.Item(1) $wSheet.Cells.item(1, 1) = "Folder Path:" $wSheet.Cells.Item(1, 2) = "Users/Groups:" $wSheet.Cells.Item(1, 3) = "Permissions:" $wSheet.Cells.I...
This is my first application in Java, it imitates the world-known Ping Pong Game. I have a lot of questions in my mind... I read that the class Timer is not recommended with multiple timers so I use ScheduledThreadPoolExecutor which probably does the same? Is there something better than that? The collision detection in...
I have written code that can compile, execute, generate output and match that output with the actual output of the given code, kind of like this site. Currently, this supports only Java and C++ code. I need some suggestions about design, OO, architecture, packaging or any other suggestion that I could improve on. This ...
This is the first time using the Task Parallel Library and it seems to be performing much slower than I was expecting. The application is simply a web crawler that returns all URLs for a given URL. Here is my method that, depending on the level param, will either download single page links (getSinglePageLinks()) or it ...
I developed a function to send email based on this. Does this code have problems? Also, I'm not sure if this code is thread-safe because of the global payloadText variable. #include <string> #include <curl/curl.h> static std::string payloadText[11]; std::string dateTimeNow(); std::string generateMessageId(); void se...
Here is what I came up with for a binary search of an array. It allows for searching one or many columns to match. It assumes that array being searched is sorted with the same sort priorities as the order in which the parameters are submitted. It seems to work well but any advice on performance or structure would be ap...
I'm not really sure what the preferred way is to deal with records not found in the database. Is it better to write a Find method which returns null or a Get method which raises a RecordNotFoundException? [AuthenticateFilter(UsernameAndSecretKey)] [Route("api/v1/activities/emails/{id}")] [HttpGet] public IHttpActionRes...
Any suggestions to improve? public class FindSmallestMissingPositive { public static void main(String args[]){ int a[] = {3,5,4,-1,1,-1,0}; System.out.println("Smallest Missing positive : "+ findSmPositive(a)); } public static int findSmPositive(int input[]){ int min = input[0];...
This class uses the openweathermap API to receive information about the current weather and forecasts. I am looking for any type of advice, but primary for structure and style improvement suggestions: This method builds the the API URL: private Uri BuildQueryURL(Interval requestType, NameValueCollection parameters) { ...
I'm implementing deep_get functionality to look inside arbitrarily nested Python 2.7 objects. Primarily for further logging. This turned out to have surprising amount of quirks. Here's what I ended up with, would appreciate the feedback as I probably missed a few more things. # coding=utf-8 from __future__ import unico...
Background I've been working on an algorithmic trading platform in Rust and utilizing the newly released futures-rs library to keep everything asynchronous and non-blocking. One issue I've come across with this is that the majority of database interface libraries currently available for Rust are blocking, which poses a...
We are trying to count to 100 on two hands! Input is given like so: LP LR LM LI LT RT RI RM RR RP (i.e. 0111011100) Where: L = Left, R = Right, P = Pinky, R = Ring Finger, M = Middle Finger, I = Index Finger, T = Thumb Our job is to make sure the code is valid according to this counting scheme, and then show w...
I'm new to Scala and I'm trying to write a generic function to convert from Int to any scalar. For example: val res: Float = convertInt[Float](12) val res: Double = convertInt[Double](12) //etc I've achieved the following code: trait FromIntConverter[T]{ def apply(int: Int): T } def convertInt[T](int: Int)(...
Here is a lexer for a grammar I'm designing. After benchmarking with 1MB files and having several iterations of the lexer, I found that coping the file being read into a buffer and lexing that buffer is the fastest. However, I can't seem to get under 0.3 seconds, and in order to process a file I need to load it into a ...
I recently implemented a binary reader/writer for my multiplayer game. Now reading bytes looks like this: static int32_t readInt32(std::vector<uint8_t>& msg, int *off) { if ((*off) > msg.size()) return 0; int32_t result; int size = sizeof (result); memcpy(&result, msg.data() + (*off), size); (*off) += size;...
Project Euler Problem #4: "A palindromic number reads the same both ways. The largest palindrome made from the product of two 2-digit numbers is 9009 = 91 × 99. Find the largest palindrome made from the product of two 3-digit numbers." The code works well enough until trying to find the largest palindrome of two eight ...
Task description: A set of product-thumbnails is shown. The user can filter the shown products by vendor(s). Done by clicking one or multiple buttons. I used jQuery together with the Isotope-plugin: http://isotope.metafizzy.co/ First I had the idea of using iteration for assembling the filter-criterium string: $(fun...
For a game I'm writing using LibGDX framework and Kotlin language, I've decided to make a dev console. This is a WIP line parser. Since there's already a decent amount of code written I've decided to show it here to see what I'm doing wrong and what can be improved. Intention: Parse literals such as true, false, null ...
Scenario A portable controls/widgets library for Xamarin.Forms (PCL Profile 111) contains a combobox/dropdown/picker control where the ItemsSource property is an IEnumerable. The ItemsSource can be populated with any IEnumerable of objects. The combobox displays value by DisplayMemberPath: string The combobox sync...
The code that I wrote is as follows: public class Astack implements StackInterface { private int sz; private Object[] a; private int topPosition = -1; public Astack(int sz){ a = new Object[sz]; this.sz = sz; } public int size(){ return topPosition+1; } public boolean isEmpty(){ if(topPosition == -1){ return ...
I want to make some VHDL code open source. But before I do, I want to make sure that it is as readable as possible. Things to improve upon could for example be naming and the use of comments. The code is adding two binary-coded-decimal numbers. The algorithm behind it will come in the documentation. Note that this isn'...
I have learned a bit of C in university and I'm now learning C++ independently. I'm trying to print out std::vector<std::string> char by char. I know, that in C, strings are arrays and are terminated by '\0' terminator. Can I assume the same thing in c++? I use C++14. This works, but I'm unsure if it's the correct way ...
I rewrote a ActionResult method that will output list of users depending if it is a SuperAdmin, OrganisationAdmin or GroupAdmin. I know there is a lot of things in the codes I still can improve so I would ask the community here the things I should learn and keep in mind when writing codes. You might ask why I have para...
I have written the following routines. Do you know of any better algorithm? Is there any faster way to pad an image for image processing? How can I optimize them for better performance? public class ImagePadder { public static Bitmap Pad(Bitmap image, int newWidth, int newHeight) { int width = image.Wid...
Anyone can tell how to make this code faster? This search takes too much time... 700 000 files for 15 minutes... I will be grateful for each micro optimization! Search Class: using System; using System.Collections.Generic; using System.ComponentModel; using System.IO; using System.Runtime.InteropServices; public class...
I have a console application, which uses Ndesk.Options to parse console arguments, request weather data and print them. I am looking primarily for code style suggestions. This is the code, which parses the console arguments: var argSet = new OptionSet() { { "l|location=", "Can be a city or a zip-code. Add a countr...
I'd like to create a pyqt widget similar to the one Blender uses for representing its nodes After wasting some bounties without getting any answers on Stack Overflow, I thought maybe posting a little piece of code here in Code Review would be a better idea. My goal is designing a powerful node graph widget using pytho...
#include <iostream> using std::cout; using std::endl; int arr[] = {3,4,2,1,-5,116,31,4,0}; void QuickSort(int start,int end); int Partition(int start, int end); void Swap(int * , int *); void PrintArr(); int main(int argc, char* argv[]) { PrintArr(); QuickSort(0, sizeof(arr)/sizeof(int)); PrintA...
I'm making a chess engine that is going to run the function containing this loop many times a second, so I want it to be well optimized. Which of these two implementations would perform faster? This: for(var j = idx-8, ji = 0; ji < 2; j-=8, ji++) { if(b[j] != 0) break; m[m.length] = [idx,j]; } Or this: for(var...
I have written the following routines to convolve two images in the frequency domain which are represented as 2d Complex arrays. How can I optimize my routines for better performance? public static class Convolution { public static Complex[,] Convolve(Complex[,] image, Complex[,] mask) { Complex[,] ...
I have written the following routines to work with digital images in various representations. Can I optimize them for better accuracy and performance? public static partial class ImageDataConverter { #region Bitmap ToBitmap32(int[,] image) //Tested ///Working fine. public static Bitmap ToBitmap32(int[,...
Content of task: Given a string of words and numbers. Extract the expression including: the operator: either addition or subtraction the two numbers that we are operating on Return the result of the calculation. Example: "Panda has 48 apples and loses 4" returns 44 "Jerry has 34 apples and gains 6" returns 40 "lose...
Following up from my previous question where I put up a solution in brute for algorithm to this problem from codechef. Given some number \$K\$ and a list of \$N\$ numbers, count the number of pairs (\$i\$, \$j\$) such that \$1 \le i \lt j \le N\$ and \$|a_i − a_j | \ge K\$. \$1 \le N \le 65000\$ \$1 \le K \le 10^8\$ ...
I just started learning Haskell, and I made a simple program which can calculate factorials and powers: Input: What do you want to do (0=quit, 1=factorial, 2=power) 1 Enter a number: 10 The factorial of 10 is: 3628800 What do you want to do (0=quit, 1=factorial, 2=power) 2 Enter the base number: 2 Enter the exponent: ...
I've defined myself a function for caching requests and their responses in a browser environment; I'm using ClojureScript. (defn make-requester [namespace time-limit fun] (fn [cont & params] (let [cache (ls/get-item namespace) key (pr-str params)] (if (and (contains? cache key) ...
Background This is the first (and only) Go program I've written so far. My employer just formed a small team to make a prototype written in Go ready for production, so I (and everyone else on my team) am learning Go as quickly as I can. We're setting up our documentation, version control, issue tracking, etc... using G...
Thanks for the help so far! Especially all of the people who helped out on part I - seen here. Making a report from payroll details Here's the revisions to the code based on feedback from that thread. The goals of this code are to take payroll details in spreadsheet format, and to make a properly formatted report that ...
As part of a challenge with one of my colleagues, I developed a NodeJS Sudoku solver. It takes an array of all the values of the grid as input (with zeros for absent values), and outputs the same array with zeros filled with the missing numbers. I choose to use ES6 classes because it helped me to reason about the code....
I've recently started working on some projects with react & redux. I understand it is best practice to manage component/UI state inside a component with setState etc. However there are various advantages to fully utilising the global state to do with making components and the application as w whole easier to test, debu...
First attempt at dynamic programming. I want to make this run faster and better. fibonacci.cpp #include "fibonacci.h" std::map<int, unsigned long long int> initializeMap() { std::map<int, unsigned long long int> m; m[0] = 0; m[1] = 1; return m; } std::map<int, unsigned long long int> __fib_result_map...
I have created a simple event manager and I want it to work properly in a multithreaded environment: public enum EventType { EVENT_TYPE_A, EVENT_TYPE_B, EVENT_TYPE_C; } public interface Observer { void onEvent(EventType eventType); } public class ObserverManager { private Set<Observer> m_weakRef...
Problem There are two kangaroos on an x-axis ready to jump in the positive direction (i.e, toward positive infinity). The first kangaroo starts at location x1 and moves at a rate of v1 meters per jump. The second kangaroo starts at location x2 and moves at a rate of v2 meters per jump. Given the starting locat...
Hey guys have a bit of code below I'm looking to optimize, the code is working, just feel it could be shorter as I had to ignore DRY principles sadly - couldn't think of a better way. Objective: Minimize the if ($isMulti) { } else {} statement PHPDoc: /** * Syncs an array key => value pair to database column => value ...
I finally got around to redoing my Temperature conversion program. I incorporated many elements of everyone's comments, and am uploading the finished program. Any new, or problems that I missed? Maybe a few very late here where I am working. Main focus of this redo was keeping my functions short and single purposed. #...
I'd rather not use this long code. I want to retrieve table/rows from database and insert into JavaScript to create a table in HTML. This is what it looks like so far and I'd like to keep the design if possible: https://i.stack.imgur.com/rDUqk.jpg var time = 10 var wrongs = 0; var wrongs2 = 0; var next = 0; var right...
I am trying to come up with the most performant way of calculating the statistical Modes of a std::vector, obeying two conditions: 1) my function should not duplicate memory usage (which would required for most usually mentioned faster methods of calculating mode); 2) my function should be able to handle multi-modality...
This is how I made a cross context join. What do you think? How would you do this better? using (var context = ContextFactory.Create()) { var users = await context .Users.AsNoTracking() .OrderBy(user => user.DisplayName) .Where(user => user...
I'm working on a logger that has a name of the module that called the logger (when I create an instance of a logger in my program, I call LoggingHandler(__name__)) to send all the messages, including info and debug, to the log file, and print the messages specified by max_level to console (so, by default, it will not p...
I've been trying to write an image scaler in C# with a focus on improved performance over the GDI+ scaler. My current bicubic implementation when running with a single thread is slightly slower than the GDI+ HighQualityBicubic interpolation mode, and multi threaded performance is over 3 times faster. Note that this is ...
I'm currently studying the book From Algorithms to Z-Scores: Probabilistic and Statistical Modelling in Computer Science In the first chapter of the book the ALOHA network protocol is introduced as an example of probabilistic modelling. I decided to write a python simulation and run some tests to check the overall pe...
I'm new to object oriented PHP, so I'm sure of the good or bad practices. The below code is working perfectly, I just don't know if it is a bad or good approach to use most of the methods as static and declare class properties as public. Could someone provide me some advise? In users.php <?php class Users{ public $...
I need to perform SQL query which will get products from database based on few dimensions which I will pass in URL. import itertools sql_where = '' dimensions = ['a','b', 'c', 'd', 'e', 'f', 'f2', 'g'] for dimension in dimensions: for onetwo, direction in zip( range(1, 3), itertools.cycle('><') ): globals...
Problem statement : There is a windmill which collects and stores wind data for various cities. The data is maintained in an xml file by the aggregator part of windmill. Now I am trying to implement the publisher part of the mill. The responsibility of publisher is to notify the registered clients for their respective ...
I've created a simple toggle menu in jQuery, which is capable of specifying a breakpoint, but I'm afraid my code is too complicated. How can I make it simpler? I also have a question about performance of code on window resize. I want to invoke a function only once if the window's width is smaller than a given breakpoin...
I'm not that good when it comes to templates, especially when it comes to variadic templates. I want to show you some code where I use both - templates and variadic templates - to call a lua function. I'm proud that it works, and it works great, but I want to get some feedback on what I could've done better. template<t...
I've been working in some tools lately that analize long streams of data and extract frequent patterns, histograms, etc. for personal use. Lately I've been coding a histogram generator; that is, given a long chunked data stream, generate a histogram with all distinct chunks; typical case, given a text, generate a word ...
This is a follow up to my previous question: Serializing objects to delimited files I've added some feature enhancements, and based on suggestions from rolfl in chat, I've fixed up a couple inconsistencies with the serializer. First, if you don't mark any properties with DelimitedColumnAttribute, I added a DelimitedIgn...
Output formatting: Input Format Every line of input will contain a String followed by an integer. Each String will have a maximum of 10 alphabetic characters, and each integer will be in the inclusive range from 0 to 999. Output Format In each line of output there should be two columns: The first column contains t...
I've created a System.Threading.Timer wrapper in C#. The tasks to be triggered when the timer elapses have highly variable execution times. My design criteria are: Provide a strongly typed timer state in the callback Run the timer callback on a periodic basis If the timer's period elapses before the timer callback com...
I have a time, in seconds, which has the possibility to be very large. I wish to convert said time into the "appropriate" rounded, readable format. I already have code which achieves this, however it's not very efficient (and contains a whole bunch of magic numbers): String readable = decayTime + " minutes"; if(decayTi...
I overloaded some C# operators to get a pseudo version of the Brainfuck symbols in the effort of understanding the flow of this language. I got this version: void Main() { /* * Write `Hello World!` * using operators overloading for brainfuck symbols */ var _ = new brainfuck(); _ = ...
Below are two examples of arrays I have, with some given length: For some value z, I want to find the column the value is in. MATLAB code I wrote: if z == 1 column = ceil(length/2); elseif logical(mod(z,2)) column = length - (z-3)/2; else column = z/2; end It is correct I think. But ugly and possibly slow...
I am working on brushing up my data-structures knowledge, and was hoping to have my code/thoughts reviewed. Interface: package dataStructures; import java.util.NoSuchElementException; public interface QueueInterface<E> { /** * Puts an element into the queue and returns this interface to allow method chai...
After reading an exceptional article here about the decorator pattern applied to functions, I saw an opportunity to reduce a lot of boilerplate code in a console application project I've been working lately. The app gathers information about the workstation it is run from, and saves that data to a central database. So...
I'm using jQuery to swap images on hover. There's a main image, and a gallery of thumbs. When the thumb is hovered over/touched, the larger version of it populates the main image, and the smaller version of the original populates the thumb. This happens via swapping src and data- attributes. This all works, but being r...
In each shared library that I build, it need to call __gcov_flush but that call should only be made when building the instrumented binaries for code review. In that case I'm passing -D__CODE_COVERAGE__ option as a compilation flag. And in each .so file. #ifdef __CODE_COVERAGE__ void cscomm_gcov_flush() { __gcov...
I was once asked in an interview to build a factory that makes cars. All cars has common features like price, rating and color and they have some features like fuel injection which can on specific car but not mandatory. Moreover there can be several types of the same feature like fuel-injection v1, v2 ect, and you shou...
I am trying to implement the Repository Pattern with a Unit of work but I don't know if I am on the right direction. This is my Model: public class Resource { public string RessourceUID { get; set; } public string RessourceName { get; set; } public List<Team> Teams { get; set; } public string Loginname ...
Here is my first try at F#. My only functional experience is from JS. This program takes a path as an argument and presents the user with numbered subdirs in that path. The user then selects one of the subdirs by entering it's number and the program opens explorer with the newest subdir of the selected subdir. Any comm...
I need to check number of messages in a jms queue for that i am using queuebrowser. Actually i have 2 queues. I check if there are more then 10 messages in second queue then the first queue should not send messages to the second queue. This is my code snippet connection = connectionFactory.createConnection...
I'm trying to get an array of all "form" objects within a large "masterFormObject" object. Is this the cleanest way to do so, or is there a better way I can check if the form objects themselves are not undefined directly and check both the applicant and account portion of this form object without having two separate bl...