xtodo

// 2024-04-04

console.log( 3 + 4 )

/*
return a map of key converion
from one layout to another.
input is ascii art
 */
const f_ascii_art_map = (s1, s2) => {
  const x1 = s1.split(/\n/);
  const x2 = s2.split(/\n/);
const xres = new Map();

[...s1].map( ((x) => { }) )

for (let k of s1) {

xres.set(k , s2[])

}

  console.log(x1.length);
  console.log(x2.length);
};

const xqwerty  = `
q w e r t  y u i o p
a s d f g  h i j l ;
z x c v b  n m , . /
`

const xdvorak  = `
' , . p y  f g c r l
a o e u i  d h t n s
; q j k x  b m w v s
`

f_ascii_art_map (xqwerty, xdvorak)
#some { color:red; }
.some { color:red; }
print(3)
3+4
(* need fix completion case sensitive, always complete to exact case *)
arraArrayPlot[  ]
ArrayPlot[  ]

x = 3;
x + 3

Table[ x, {x, 1, 9}]
(following-char )

map-apply_tt
(current-word)
(current-word)      hosttt
(thing-at-point 'word 'symbol)
(thing-at-point 'symbol)

(type-of (thing-at-point 'symbol))

(map-apply )

mapcan

map-apply
map-contains-key
map-copy
map-delete
map-do
map-elt
map-empty-p
map-every-p
map-filter
map-insert
map-into
map-keys
map-keys-apply
map-length
map-let
map-merge
map-merge-with
map-nested-elt
map-pairs
map-put
map-put!
map-remove
map-some
map-values
map-values-apply
mapp

xtodo put in clips

like they say, critics gives best writing advice, eunics gives best sex advice

now, xah's best advice for how to get hired. an insta master's thesis.

First thing, is the mindset. this is the most import.

Your mindset should NOT be, am gonna be fair and give my best.

Your mindset should be, first of all, do you want the job or not. seriously, ask urself that question, with respect to, does it benefit YOU.

Put your mindset, to the most selfish possible. in fact, think of it this way: you are now going to abuse the fuck out of corps and society, to get what YOU want.

Note: what you want, not what they want, and not what is fair, or fair interview shit, nor demo of your best ability shit.

Do you want the job, or not?

Also, in consideration of this, some corps, you may NOT want to. this gets you to think. do you want THIS PARTICULAR job of not?

When you are in this mindset, you are almost half hired already.

Now, the second part. Once you decided this is a job YOU WANT, AND, you have put your mindset to the most abusive possible. Now, you need to be honest in the interview, and blunt. Honest means, you speak your mind. Tell them why you want the job. Ignore interview question faaks. Tell them: hey shithead, i want the job, and i far capable for what you need, ok?

Again, the focus is, to tell them, and they benefit by getting you, not somebody else. (if you have decided, the job benefits you.)

You also need to be honest in your abilities. But again, do not think in terms to be fair or such shit. You want the job, and you damn make sure you demo the ability, qualifications.

now, coding jobs has lots fancy jargons you never heard of, or langs you don't know. again, that's irrevelant, if you have the right mindset. dont stupidly drill on things you don't know. just honestly, bluntly, like you are talking to xah. if you don't know something, skip it, tell them what you know, and why you are the best, that they gonna fail if they try to keep finding some mythical best.

todo 2024

fix html

css flex

.MTckf {
display: flex;
display: inline-flex;

flex-direction: row;
flex-direction: column;

flex-wrap: wrap;
flex-wrap: nowrap;
flex-wrap:  wrap-reverse;

flex-basis: 1200px;
justify-content: flex-start;

align-self: auto normal stretch center start end self-start self-end flex-start flex-end baseline first last safe unsafe;

align-items: center;
align-content: flex-start;

}

.VkjpW {

flex-grow: 2;
flex-shrink: 2;
flex: 1 1 300px;
flex-basis: 300px;
order: 2;
}
# 2023-05-10

# by kite
def f1(tupleLength, maxVal):
  ret = [[]]
  for i in range(tupleLength):
    temp = []
    for j in ret:
      for k in range(1, maxVal + 1):
        temp.append(j + [k])
    ret = temp.copy()
  return ret

# by george
def f2(tupleLength, maxVal):
  return [tuple(i // (maxVal**(tupleLength - j - 1)) % maxVal + 1
                for j in range(tupleLength))
          for i in range(maxVal**tupleLength)]

xx =  f2(3,4)
# xx =  f2(3,4)

for i in xx:
	print(i)

# (1, 1, 1)
# (1, 1, 2)
# (1, 1, 3)
# (1, 1, 4)
# (1, 2, 1)
# (1, 2, 2)
# (1, 2, 3)
# (1, 2, 4)
# (1, 3, 1)
# (1, 3, 2)
# (1, 3, 3)
# (1, 3, 4)
# (1, 4, 1)
# (1, 4, 2)
# (1, 4, 3)
# (1, 4, 4)
# (2, 1, 1)
# (2, 1, 2)
# (2, 1, 3)
# (2, 1, 4)
# (2, 2, 1)
# (2, 2, 2)
# (2, 2, 3)
# (2, 2, 4)
# (2, 3, 1)
# (2, 3, 2)
# (2, 3, 3)
# (2, 3, 4)
# (2, 4, 1)
# (2, 4, 2)
# (2, 4, 3)
# (2, 4, 4)
# (3, 1, 1)
# (3, 1, 2)
# (3, 1, 3)
# (3, 1, 4)
# (3, 2, 1)
# (3, 2, 2)
# (3, 2, 3)
# (3, 2, 4)
# (3, 3, 1)
# (3, 3, 2)
# (3, 3, 3)
# (3, 3, 4)
# (3, 4, 1)
# (3, 4, 2)
# (3, 4, 3)
# (3, 4, 4)
# (4, 1, 1)
# (4, 1, 2)
# (4, 1, 3)
# (4, 1, 4)
# (4, 2, 1)
# (4, 2, 2)
# (4, 2, 3)
# (4, 2, 4)
# (4, 3, 1)
# (4, 3, 2)
# (4, 3, 3)
# (4, 3, 4)
# (4, 4, 1)
# (4, 4, 2)
# (4, 4, 3)
# (4, 4, 4)

don't know what this means

xahlee terrence olivido 2023-01-16
xahlee terrence olivido 2023-01-16
ss 2023-01-05 005528 nRQXt
ss 2023-01-05 005528 nRQXt
xah coprographia unix culture 2022-12-26 vjBPY
xah coprographia unix culture 2022-12-26 vjBPY

http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/16071

"require" is similar to the C include, which may cause newbie confusion. (One notable difference is that locals inside the required file "evaporate" when the require is done.)

The Ruby include is nothing like the C include.

The include statement "mixes in" a module into a class. It's a limited form of multiple inheritance. An included module literally bestows an "is-a" relationship on the thing including it.

---- The require method does what include does in most other programming languages: run another file. It also tracks what you've required in the past and won't require the same file twice. To run another file without this added functionality, you can use the load method.

http://zergsoft.blogspot.com/2012/10/ruby-include-vs-require-smackdown.html

------------

http://ionrails.com/2009/09/19/ruby_require-vs-load-vs-include-vs-extend/

----------------

http://stackoverflow.com/questions/318144/what-is-the-difference-between-include-and-require-in-ruby

The include method takes all the methods from another module and includes them into the current module. This is a language-level thing as opposed to a file-level thing as with require. The include method is the primary way to "extend" classes with other modules (usually referred to as mix-ins). For example, if your class defines the method "each", you can include the mixin module Enumerable and it can act as a collection. This can be confusing as the include verb is used very differently in other languages.

• include. The include statement "mixes in" a module into a class. It's a limited form of multiple inheritance. An included module literally bestows an "is-a" relationship on the thing including it.

include : mixes in specified module methods as instance methods in the target class extend : mixes in specified module methods as class methods in the target class

--------------

http://stackoverflow.com/questions/156362/what-is-the-difference-between-include-and-extend-in-ruby

What you have said is correct. However there is more to it than that.

If you have a class Klazz and module Mod, including Mod in Klazz gives instances of Klazz access to objects to Mod's methods. Or you can extend Klazz with Mod giving the class Klazz access to Mod's methods. But also you can extend an arbitrary object with o.extend Mod. In this case the individual object gets Mod's methods even though all other objects with the same class as o do not.

Code formatting. demo of the extreme idiocy of Python JavaScript Ruby LISP Haskell industrial coders of the past 30 years
condense multi-lines of code into single line.
xinput = "
    [D]
[N] [C]
[Z] [M] [P]
 1   2   3

move 1 from 2 to 1
move 3 from 1 to 3
move 2 from 2 to 1
move 1 from 1 to 2"

Function[{x},

Module[{xStacksString, xProcedureString,xLinesOfStackConfig},
{xStacksString, xProcedureString} = (StringSplit[ # , "\n\n" ]& @ x);
xLinesOfStackConfig = StringSplit[ StringReplace[ xStacksString, { "[" -> " ", "]" -> " " } ], "\n" ];
xColumnCount = StringCases[  Last@xLinesOfStackConfig , RegularExpression[ " (\\d+) *$" ] -> "$1" ][[1]]//ToExpression;
xListOfStacks = ((DeleteCases[ # , "" ]) &) /@ Transpose @ (Drop[ #, -1 ]&) @ (StringTrim /@ (StringPartition[ #, 4 ]&) /@ (StringPadRight[ #, xColumnCount * 4 ]& /@ xLinesOfStackConfig ));
(* {{"N", "Z"}, {"D", "C", "M"}, {"P"}} *)
xProcedureNumbers = ToExpression @ StringSplit@ (StringSplit[ StringReplace[ xProcedureString , { "move " -> "", "from " -> "", "to " -> "" } ] , "\n" ]);
(* {{1, 2, 1}, {3, 1, 3}, {2, 2, 1}, {1, 1, 2}} *)

]

]@xinput

(* move p (number of times) from stack m to stack n *)
fmove[{p_, m_, n_}, xstacks_] :=
 Nest[ReplacePart[#1, {n -> Prepend[#1[[n]], First[#1[[m]]]],
     m -> Drop[#1[[m]], 1]}] &, xstacks, p]
xResultStacks = Fold[ fmove[#2, #1]&, xListOfStacks, xProcedureNumbers ]

Function[{x1,x2},expr]

Replace[ expr , fmove[{p_, m_, n_}, xstacks_] :>  Nest[ReplacePart[#1, {n -> Prepend[#1[[n]], First[#1[[m]]]],
     m -> Drop[#1[[m]], 1]}] &, xstacks, p],
{1}
  ]

xResultStacks = Fold[ Function[{x1,x2},expr][#2, #1]&, xListOfStacks, xProcedureNumbers ]

xAnswer = StringRiffle[  Cases[xResultStacks, {x_,___} -> x] , "" ]

xAnswer === "CMZ"

(* xAnswer === "DHBJQJCCW" *)

major

// click to hide all pre
// get pre element
// on click, toggle show hide
const xpreEle = document.getElementsByTagName("pre");

const f_hide_pre = ((xelm) => {
  if (xelm.style.visibility) {
    xelm.style.visibility = "hidden";
  } else {
    xelm.style.visibility = "visible";
  }
});

for (let kk of xpreEle) {
  kk.addEventListener("click", (x) => f_hide_pre(x.target), false);
}
github psychology marketing awards 2022-10-22 VXdzx
github psychology marketing awards 2022-10-22 VXdzx
twitter new ui icons 2022-10-23 Hmt8g
twitter new ui icons 2022-10-23 Hmt8g
unicode new 2022-10-23 xqW6g
2022-10-23 unicode for new 🆕 🌟 http://xahlee.info/comp/unicode_index.html?q=new
Miricale Y comment 2022-09-23 MN3xW
Miricale Y 4 months ago
Your video is sometimes profound and nice, keep it up man, but your operation on emacs I don't know the half of it, but I am working on it trying to keep it up.
xah comment 2022-09-18 qk7gW
xah comment 2022-09-18 qk7gW
xah-html-toggle-syntax-color-tags
 xah-html-htmlize-region
  xah-html-htmlize-string

xah-html-redo-syntax-coloring-buffer
 xah-html-htmlize-region
odysee sync 2022-08-17 kWzjT
odysee sync 2022-08-17 kWzjT

2022-08-23 convert pre class="bash" to pre class="shell" for code block that's app not bash

(query-replace-regexp "\\([0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]\\) \\([^<]+\\)<\\([^>]+\\)>," "{date: \"\\1\", name: \"\\2\", email: \"\\3\", product: \"js\"}," nil nil nil nil nil)

Latest observation on the webdev milengen zoomer web design guru framework faaks. This began about 2019 or so. Sites no work if u don't have cookies on. Having JavaScript on no matter. Started to happen all over. Wallstreet journal, imgur, reddit, etc. (might be off on the specific sites, but it's wildfire).

css font 2022-05-08 ZSXV
css font 2022-05-08 ZSXV

thinking of writing a twitter bot to delete all my tweets.

read

website minor fix

xahweb user facing

xahweb, less important

Windows command.exe notes

add to Ergonomic Keyboard Layouts

write about reading writing to file.

write about -replace operator with block code for replacement. and document on the captured string's type system.text.regularexpression.math. [ https://docs.microsoft.com/en-us/dotnet/api/system.text.regularexpressions.match ]

https://youtu.be/kmW6bikZKe0
How To do a Checkup on Windows
Mar 19, 2021
Chris Titus Tech

keyboard read

here's a short account of modern taiwan history since ww2.

I was born in taiwan, 1968. Left in 1982 at age 14. (to escape mandatory military service) My parents are from china. Dad had a sister, 3 years old, died in shanghai during jp bombing.

China had civil war, between communist (CCP) and nationalists (Kuomintang aka KMT), before ww2. During ww2, jp invasion, they kinda agreed to work together fighting jp. After ww2 (1945), the civil war resumed, and is bloody as ever. In the end, communist party won, lead by mao. The nationalists, led by Chiang Kai-shek, escaped to taiwan in 1949, with his top generals and soldiers and family (1 to 2 million). (my dad's dad, is part of it)

Mao would have chased over and finished the job. Except, us has its 8th fleet at the taiwan strait. basically, usa supports the nationalists.

Chiang's taiwan, is basically authoritarian. any who disagree are jailed or killed. (big example, the historian Li Ao. went to jail for several years. no usa help. Died in 2018) (there were a few massacres) usa, supported it, in the name of “democracy”. (and usa soldiers, rape taiwan women, or enjoys a superior race status. My had told me stories i vaguely remember)

( “taiwaness” means quite a lot of things. 95% are han chinese. of which, the Hoklo, the Hakka, and waishengren (or “mainlanders”) it can mean those who are in taiwan before nationalist arrived. it's (which we call “taiwaness”.) taiwaness indigenous aboriginals. it can mean han chinese. (including, already in taiwan and chinese arrived with chiang from china) )

from 1990 to 2000, taiwan started to become more multi-party “democratic”.