I’m not a hacker, I don’t see the good that can come from it really. But, I do want to know how to do it so I can take necessary precautions. Also, I read about hacking and wonder sometimes if it really is possible these days. The attack vector which exploits the vulnerabilities of humans, […]
Read More →Category: Open Source
How to search a Lucene.Net index in C#
I used this code to perform a search of a Lucene.Net index. Lucene.Net.Store..Directory directory = Lucene.Net.Store.FSDirectory .Open(new DirectoryInfo(textBoxSearchIndex.Text)); Lucene.Net.Analysis.Analyzer analyzer = new Lucene.Net.Analysis.Standard .StandardAnalyzer(LuceneUtil.Version.LUCENE_29); Lucene.Net.Search.Searcher searcher = new Lucene.Net.Search .IndexSearcher(LuceneIndex.IndexReader .Open(directory, true)); Lucene.Net.Search.Query query = new Lucene.Net.QueryParsers .QueryParser(LuceneUtil.Version.LUCENE_29, “contents”, analyzer) .Parse(textBoxSearch.Text); Lucene.Net.Search.Hits hits = […]
Read More →Lucene.NET returns results only when using numeric values
I used this code to create a Lucene.Net 2.9.2 index. System.IO.DirectoryInfo indexFileLocation = new System.IO.DirectoryInfo(textBox1.Text); Lucene.Net.Store.Directory directory = Lucene.Net.Store.FSDirectory.Open(indexFileLocation); Lucene.Net.Analysis.Analyzer analyzer = new Lucene.Net .Analysis .Standard .StandardAnalyzer(LuceneUtil.Version.LUCENE_29); IndexWriter writer = new IndexWriter(directory, analyzer, true, IndexWriter.MaxFieldLength.UNLIMITED); foreach (IList item in dataToIndex) { Document doc = new Document(); doc.Add(new Field(“ID”, item[0].ToString(), Field.Store.YES, Field.Index.NO)); …. string contents = […]
Read More →Lucene.Net search with star (*) wildcard as first character
Using the star (*) as the first character of a Lucene.Net search is not supported by default. It will return null results if it is not turned on. To turn on the support for leading wild card characters you must set the SetAllowLeadingWildcard property to true. Then you will be able to use wildcard search […]
Read More →How to update the solution names on GitHub
I have a large group of solutions in one GitHub repository which I wanted to give valid names to. Not the names of the folders but the detail names shown in Figure 1. Figure 1, how to change or update description names on GitHub Check out my other articles about GitHub: Setting up and using […]
Read More →Publish a Docker Windows image to Docker Hub using Visual Studio
I wrote this article that explained how to include Docker support in Visual Studio “How to add Docker support to your ASP.NET Core application”. Check it out. To publish the image to Docker Hub (*) so that it can be used for building a Web App for Containers which I discuss here “Publish a Web […]
Read More →How to delete a Docker image
I was able to remove some of my unwanted images by accessing my Docker Cloud account here. As seen in Figure 1, navigate to your repositories, click on those dots, a delete popup is rendered. Figure 1, how to delete a docker image repository I write this because when I searched all I found was […]
Read More →Kali Linux for Windows
This is pretty cool as I am very interested in this specific flavor of Linux. I have installed it and it’s very cool. You can down load this from the Microsoft Store. Then search for “Kali” and install it. Here is the description: “The Kali for Windows application allows one to install and run the […]
Read More →What is self-contained deployment mode, works locally but not after deploying
It happens very often that an application is coded, configured and tested on a local machine and when deployed to an Azure App Service or any other machine, for some reason there are unexpected errors and exceptions. Let the debugging begin. I wrote this article “ASP.NET Core 2.1 and HTTP Error 502.5 – Process Failure” […]
Read More →Publish a Web App for Containers Windows Docker Image
I wrote these other articles here “How to add Docker support to your ASP.NET Core application” and here “Publish a Docker Windows image to Docker Hub using Visual Studio” that discussed how I got to this point. So far, not many problems and it went pretty smooth. When I added Docker support to my ASP.NET […]
Read More →