Skip to content

Instantly share code, notes, and snippets.

View hexbinoct's full-sized avatar

user77 hexbinoct

  • Pakistan
View GitHub Profile
@hexbinoct
hexbinoct / gist:342713e6d02f971e0379e71465322e7b
Created January 30, 2025 05:21
7b R1 distill solves sudoku
To solve this 4x4 puzzle, I'll start by analyzing the given numbers and applying the rules step by step.

First, I'll examine the first row. I notice that the corners already contain 2 and 3. Since each row must include the numbers 1, 2, 3, and 4 without repetition, the missing numbers in the first row must be 1 and 4.

Next, I'll look at the first column. The top-left cell is 2, and the bottom-left cell is 1. This means the remaining cells in the first column must be 3 and 4.

Moving on to the second row, the leftmost cell is 1, and there's already a 2 in the third column. To avoid repetition, the missing numbers in this row should be 3 and 4.

In the third row, the leftmost cell is empty, and there's a 1 in the second column and a 3 in the third column. This suggests that the missing numbers here are 2 and 4.

public class WaitC
{
int m_hour, m_minute;
int m_waitMilliSeconds = 0;
public string TargetDailyTime {
get {
return $"{m_hour.ToString("00")}{m_minute.ToString("00")}";
}
set {
@hexbinoct
hexbinoct / System.ini
Created August 8, 2022 16:27
Rainmeter custom System.ini with bigger fonts
; Lines starting ; (semicolons) are commented out.
; That is, they do not affect the code and are here for demonstration purposes only.
; ----------------------------------
[Rainmeter]
; This section contains general settings that can be used to change how Rainmeter behaves.
Update=1000
Background=#@#Background.png
; #@# is equal to Rainmeter\Skins\illustro\@Resources
BackgroundMode=3
{
"workbench.colorCustomizations": {
"statusBar.background" : "#013585",
"statusBar.noFolderBackground" : "#212121",
"statusBar.debuggingBackground": "#263238",
"titleBar.activeBackground": "#0d1fc4da",
"titleBar.border": "#2e0303",
"titleBar.activeForeground": "#afffff",
// "activityBar.activeBackground": "#006eff",
"activityBar.background": "#101394"
in an mdi app, add 2 seperate forms form1 and form2, put a lable in form2, and Anchor it to bottom. start the app, show form1 as max, now show form2, because form1 was max, form2 will also show as max, you will see label in form2 at the correct place. Now, in code, goto the load event of form2, just type label1.Text="hi". Now run the app again, show form1 maximized, and now show form2, it will open maximized, but the anchoring of label will be disturbed, now its not where it was supposed to be, now its distance from top of the form is what it was in the designer.
Now if you move the statement label1.Text="hi" from form's Load event to Shown event, the anchoring bug is disappears.
@hexbinoct
hexbinoct / csvsplit.cs
Created November 17, 2020 07:34
Split csv line with commas and quotes in data
public static List<string> single_line_process2(string line)
{
List<string> lineparts = new List<string>();
List<char> this_section = new List<char>();
bool quoteson = false;
//Action<int> act = (int a) =>{ a = 6; };
Func<int, bool> islineend = (int i) => { return i >= line.Length - 1 ? true : false; };
Action<char> addtosection = (c) => { this_section.Add(c); };
@hexbinoct
hexbinoct / github-troll.md
Created October 28, 2020 09:25 — forked from lrvick/github-troll.md
Trolling Github's DMCA repo with their own security flaws.
public class InvoiceItems
{
public InvoiceItems()
{
}
public double Discount { get; set; }
public int InvoiceType { get; set; }
public string ItemCode { get; set; }
public string ItemName { get; set; }
@hexbinoct
hexbinoct / code128visualbasic.vb
Created November 1, 2018 17:20
Visual Basic .net code to convert input to Code128 barcode font.
'taken from https://grandzebu.net/informatique/codbar-en/code128.htm please visit their website for more information.
'code below is working fine in vb.net, original code was older version, before .net days I think.
'imp link
'https://docs.microsoft.com/en-us/dotnet/visual-basic/programming-guide/language-features/data-types/type-characters
'type characters while declaring variables
'symbol Type Example
'% Integer Dim L%
'& Long Dim M&
'@ Decimal Const W@ = 37.5
@hexbinoct
hexbinoct / gdrive_download.txt
Created June 16, 2018 09:13
download file from google drive using WGET (for linux console)
got the help from this link, good suggestions:
https://gist.github.com/iamtekeste/3cdfd0366ebfd2c0d805
what worked for me:
what I got from google drive (shareable link) was this:
`https://drive.google.com/open?id=ID`
changed it to:
`wget --no-check-certificate 'https://docs.google.com/uc?export=download&id=ID' -O FILENAME`