Categories
Mastering Development

Mulitple Daterangepickers not working on single page

I’m using the daterangepicker library for some filtering on my page. My problem right now is if I add another view into my page that also use the daterangepicker, the daterangepickers on my current page stop working in favour of the other ones. Main View: <div class="form-group date-holder"> <input type="text" readonly placeholder="Date Range" class="date-range-picker form-control" […]

Categories
Mastering Development

Problem in displaying history of my own Browser

I am trying to make a browser. For Displaying history. I’m using local database. Showing Title and Url of site in History. Problem is: I visit the site for once but in history it shows for 2-3 time. My Local database insertion function public void insertHistory(String Title,String Url,String Empty,SQLiteDatabase database) { ContentValues contentValues=new ContentValues(); contentValues.put(“Title”,Title); […]

Categories
Development

Send push-notification using WebSockets after button click

I’m very close to implementing a system in C# which allows me to send a push-notification with the click of a button from an interface written in ASP.net to a C# console application acting as client. This all using WebSockets. After reading a lot of tutorials and reusing code found online I’m already able to […]

Categories
Development

Multiple Textbox Validations in C#

So I have a form with many textboxes which all need to be filled in. I have researched textbox validation but I can only find instructions for validating singular text boxes. Below is the code I have for the singular textbox validation. I was just wondering if it possible to hit all of them at […]

Categories
Development

Need some help debugging a program

I am running into trouble with this program. For some reason I am getting an error Index out of bounds I am not sure why. Any suggestions would be nice. Written in C#. The code I am having problems with is here – I need your help: class MainClass { private static int patternCount; static […]

Categories
Development

Export to Excel with Hyperlink in a cell to another worksheet

I’m exporting data into excel file,I’m trying to create a hyperlink in a specific cell which should navigate to worksheet. Hyper link is getting created, issue is when i click the hyperlink it is not navigating to the specified worksheet. For instance: My Code- string Address = StringConstants.worksheet_Name + “!A1”; Excel.Hyperlink hyperlink = (Excel.Hyperlink)worksheet.Hyperlinks.Add(worksheet.get_Range(“D5”, Type.Missing), […]

Categories
ASP.NET Development

ASP.net Core 2.1 and IdentityServer4 – Client Side and Server Side Cookie Removal

I am working on an Identity Server implementation that makes use of ASP.net Core 2.1 and IdentityServer4 libraries. In the context of OAuth2 protocol, the identity server is implemented in a way to return an AuthorizationCode as soon as the customer provides his/her login credentials through a server provided web-form. The code is returned by […]

Categories
Development HTML

Looping through HtmlNodes and collecting data gives me the same result every time

I have an async method which calls a mapper for turning HTML string into an IEnumerable: public async Task<IEnumerable<MovieRatingScrape>> GetMovieRatingsAsync(string username, int page) { var response = await _httpClient.GetAsync($”/betyg/{username}?p={page}”); response.EnsureSuccessStatusCode(); var html = await response.Content.ReadAsStringAsync(); return new MovieRatingsHtmlMapper().Map(html); } … public class MovieRatingsHtmlMapper : HtmlMapperBase<IEnumerable<MovieRatingScrape>> { // In reality, this method belongs to base class […]

Categories
Development

Task executing a code 2 times instead of five

I have no idea why but my Task is executing a code only 2 times when i made 5 tasks to execute it. for (int i = 0; i< 5; i++) //MainUI { Task.Run(() => { string s = Settings.ComboList[rnd.Next(Settings.ComboList.Count)]; string[] split = s.Split(“:”.ToCharArray()); string username = split[0]; string password = split[1]; twitch.GetOAuth(username, password, nesto, […]