Cosmic Funnies
RMH
Xuebing Du
I'd rather be in outer space 🛸

Origami Around

shark vs the universe
Mike Driver

Love Begins
Keni
🪼
No title available
almost home
No title available

if i look back, i am lost
KIROKAZE
"I'm Dorothy Gale from Kansas"
TVSTRANGERTHINGS

No title available
occasionally subtle
Monterey Bay Aquarium

seen from United States

seen from United States
seen from Sweden

seen from United States

seen from Brazil
seen from Indonesia

seen from United States
seen from United States

seen from Malaysia

seen from Brazil
seen from Bangladesh
seen from United States
seen from Türkiye

seen from Brazil
seen from United States
seen from Argentina
seen from United States
seen from South Korea

seen from United States

seen from France
@axtens
The premier source of historical data on programming languages is back!
3 track album
New music by #IvodneGalatea
Ambient and other forms with instruments weird and wonderful
Time for a VB6 resurgence? Method chaining. FluentVB6.
A realisation of lived looping - the pihilosophy of which is the exposure of a novitiate to a tuned live-looping system for exploration. I run these in my ho...
ambient music reminiscent of Robert Fripp’s Frippertronics.
Your insights needed!
JSON parsing in VBScript
There's a lot of code out there for JSON parsing in VBScript. A good example can be found on a Taiwanese website: VBSJSON. However, it's the code in the comments (that the author then puts at the head of his posting) that is quite amazing in its succinctness and power.
Function ParseJson(strJson) Set html = CreateObject("htmlfile") Set window = html.parentWindow window.execScript "var json = " & strJson, "JScript" Set ParseJson = window.json End Function
Whereas VBSJSON returns a Dictionary object, ParseJson returns an object which can be traversed by dot notation. As I'm currently working with OAuth 2.0 data in a Google context, I can now issue calls like this:
Dim secrets Set secrets = ParseJson(readfile("client_secret.json")) WScript.Echo secrets.installed.client_secret
Nice!
© Bruce M. Axtens, 2013
Love that TCL (Tool Command Language)
TCL is just so cool and concise ...
cd CSV set target "snap-[clock format [clock add [clock seconds] -1 hours] -format %Y-%m-%d-%H -gmt 1]" if {![file exists $target.rar]} then { set cmd [list c:/program\ files/winrar/rar.exe m -m5 -s ${target}.rar ${target}-utc.csv] exec -- {*}$cmd }
That goes to the log folder and compresses the previous hour's worth of log. I run that from a scheduler.
7 track album
New Music by Ivodne Galatea
Just in from Ivodne Galatea: "Here you are, a new album of book reviews. Thank you so much for your continuing support and kind feedback. http://ivodnegalatea.bandcamp.com/album/the-archaeology-of-knowledge Remember it is free to listen and download. put nothing in the "amount paid" and then you get a free link. Also these are mixed for binaural 65 degree speaker separation. I am preparing a separate one for earphones."
More gebrauchspataphysik: 6 more sonorous reviews of unwritten books. This set features interplay between the small but exquisitely-formed Hohner Guitaret and the stately Hohner Pianet T. The (relatively) narrow compass of the Guitaret can be dealt with in two ways. One is using live digital transposition (a pedal such as Digitech's DT), another is by pairing it with internally plucking of the reeds a Pianet T. The DT approach is most useful when playing single notes - the high F and low G, and the pedal can also used for gliss bend and grace notes (and was used in both the last set of book reviews, and throughout this one as well). As regards the Pianet approach, I started off by trying to use the latter method, but realistically it is much harder to do that it seemed at first thought, and also sounded better played via the keyboard. The perceived shortcomings of the Pianet T in having no sustain were overcome by a piano-style floor pedal operating the bypass on a busted old spring reverb. The Pianet is a species of anti-piano - instead of hammers hitting strings, rods or bars,it has tiny rubber fingers inside pulling on the reeds, and as such remains a pretty good match soundwise. And Pianets are lovely to play in a way that Rhodes and Wurlies just aren't (to me). The fingers beckon forth sound from the instrument. rather than prying the sounds loose or belabouring them with a cudgel. When preparing the album on Bandcamp, the page title read "Editing The Geography of Thought". What a lofty ambition! Once again, sound collage orchestrations per Cage (1937) "Wherever we are, what we hear is mostly noise. When we ignore it, it disturbs us. When we listen to it, we find it fascinating. The sound of a truck at 50 m.p.h. Static between the stations. Rain. We want to capture and control these sounds, to use them, not as sound effects, but as musical instruments." The album is binaural for 65 crosstalk speakers. I can make you a headphones version if you need one.
credits
released 15 September 2013 Ivodne Galatea: Hohner Guitaret, Hohner Pianet-T, Arturia CS80V Aural Rokehan and co-production by Cameron Byrd. Thanks to Michael Peters for the encouragement Also a never-ending gratitude to the people who wander the world with microphones at freesound.org, mentioned in each piece where used
Boosting myself to HIGH process priority
Context: Windows Server 2008R2, VBScript
The script gets its own name, then looks through the Win32_Processes for a match with CSCRIPT.EXE and a CommandLine containing that name. Any matches (should be only one, but could be more) are boosted to HIGH process priority.
option explicit dim sName dim sComputer dim oWMI dim cProcesses dim oProcess CONST HIGH = 256 sComputer = "." Set oWMI = GetObject("winmgmts:\\" & sComputer & "\root\cimv2") sName = Wscript.ScriptName Set cProcesses = oWMI.ExecQuery("Select * from Win32_Process Where Name = 'cscript.exe' And CommandLine LIKE '%" & sName & "%'") For Each oProcess in cProcesses oProcess.SetPriority(HIGH) WScript.Echo "Boosted myself" Next
And in JScript
var HIGH = 256 var sComputer = "." var sName = WScript.ScriptName var query = GetObject("winmgmts:\\\\" + sComputer + "\\root\\cimv2").ExecQuery("Select * from Win32_Process Where Name = 'cscript.exe' And CommandLine LIKE '%" + sName + "%'") var cProcesses = new Enumerator(query); // Enumerate WMI objects for ( ; !cProcesses.atEnd(); cProcesses.moveNext()) { var oProcess = cProcesses.item() oProcess.Priority = HIGH WScript.Echo( "Boosted myself") }
© Bruce M. Axtens, 2013.
Setting process priority of cscript ... but not of this instance
Context: Windows Server 2008R2, VBScript.
I want to boost every other CSCRIPT.EXE instance but not this one.
dim c dim myname dim strComputer dim objWMIService dim colProcesses dim objProcess CONST HIGH = 256 strComputer = "." Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2") myname = Wscript.ScriptName WHILE TRUE c = "" Set colProcesses = objWMIService.ExecQuery( _ "Select * from Win32_Process Where Name = 'cscript.exe' And NOT CommandLine LIKE '%" & myname & "%'") For Each objProcess in colProcesses objProcess.SetPriority(HIGH) c = objProcess.CommandLine Next if c <> "" then WScript.Echo "Boosted " & c else WScript.Echo "Not boosting. Waiting 5 seconds." end if WScript.Sleep(5000) '5 seconds wend
So query Win32_Process for cscript.exe and a CommandLine that does not contain the name of current script. If found, boost.
© Bruce M. Axtens, 2013.
Did you mean bookmarks
Sometimes Opera's internal search is anything but smart
Array initialisation in javascript
It bugs me stepping through for() loops, especially where there's more than, say, 7 iterations.
The following uses a C-esque approach.
var n = 1000 var e = [] var c = 0 while (0 === (e[c++] = 0) && c < n){}
So assign zero to the c'th item of array e, then increment e. The assignment returns zero which is === to zero. Keep doing that while c is less than n.
In browser debuggers and Visual Studio there's no stepping through the loop. Instead, it just does its thing and moves on.
© Copyright Bruce M. Axtens, 2013.