quarta-feira, 9 de maio de 2018

Adriano Gianturco - A Ciência da Política

Possivelmente o autor do livro mais importante de introdução à Ciência Política em português. Adriano Gianturco Gulisano, italiano de Catânia, na Sicília, professor de Ciência Política do IBMEC-MG, visitou Goiânia-GO para uma série de palestras, gravadas pelo Cerrado Liberal, promovidas pelo Instituto Liberdade e Justiça (ILJ) e pelo Centro Acadêmico de Economia da PUC-GO (CAECO), apresentando seu livro e um pouco de ciência na área de humanas. 

Tratou o tema com o rigor exigido: descritivo ao invés de prescritivo, falou como o objeto é, e não como deveria ser. Longe de oferecer soluções, tentou apresentar as ferramentas intelectuais, os limites da análise, o recorte do objeto, e assim capacitar interlocutores a primeiro reconhecer do que se fala, para - só então! - avaliar, concluir, julgar, criticar, elogiar, recomendar ou rejeitar.

Foram grandes debates. E quis apenas registrar aqui o que passou para efeito histórico, para minha própria lembrança e mais importante para ter uma desculpa, completamente retórica, ao compartilhar através de fotos o prazer que experimentei neste dia!




Outras apresentações:

A Lei

O Mito da Corrupção

Os Limites da Democracia

Constantes, Regularidades e Leis da Política

Escola Austríaca e Ciência Política

Escola Austríaca e Empreendedorismo

Law and Economics

Gianturco e Antony Mueller

Contatos:

Adriano Gianturco - Site, FacebookYoutube, Fake Mises Brasil, IBMEC;

Instituto Liberdade e Justiça - Site, Facebook, Youtube;

Centro Acadêmico de Economia da PUC-GO - FacebookIntegrante/FB;

Cerrado Liberal - Site, Facebook, Youtube;

abraços

sexta-feira, 13 de abril de 2018

to read and research

* este blog não é lido por ninguém além de mim. caso esbarre neste tópico, poderá achá-lo confuso, inconsistente, errado... e sim este tópico visa fazer sentido apenas a mim e através dele pretendo salvar os nomes para pesquisa em alguma tipo de classificação bem pessoal:

social: Hannah Arendt, Max Weber, Émile Durkheim, Herbert Spencer, Niklas Luhmann, Pierre Bourdieu, Zygmunt Bauman, Claude Lévi-Strauss, Franz Boas, Edward Burnett Tylor, Marcel Mauss, Bronislaw Malinowski, Alfred Radcliffe-Brown, Ruth Benedict, Joseph Campbell, John Stuart Mill, Leo Frobenius,

left: Jacque Fresco, Slavoj Žižek, Frankfurt School, Antonio Gramsci, Leon Trotsky, Vladimir Lenin, Maxim Gorky, Saul Alinsky, Michel Foucault, Albert Camus, Theodor W. Adorno, Max Horkheimer, Herbert Marcuse, Gilles Deleuze, György Lukács, Karl Korsch, Paul Mattick, Jacques Derrida, Jürgen Habermas, Noam Chomsky, Clifford Geertz, Vladimir Propp, Thomas More, Montesquieu, Voltarie, Jean-Jacques Rousseau, Judith Butler, Nikolai Bukharin, Grigory Zinoviev, Florestan Fernandes, Octavio Ianni, Caio Prado Júnior, Darcy Ribeiro, Celso Furtado, Luiz Carlos Bresser-Pereira, Paulo Freire, Augusto Boal, Frei Betto, Leonardo Boff, Leandro Karnal, Leandro Konder, Mario Sergio Cortella, Paul Singer, Raymond Aron, Norberto Bobbio, Carlos Marighella, Thomas Müntzer,

right: Auguste Comte, Martin Heidegger, José Ortega y Gasset, David Ricardo, Maurice Merleau-Ponty, Edmund Husserl, Theodore Dalrymple, Karl Jaspers, Roger Scruton, Russell Kirk, William F. Buckley, Edmund Burke, Sun Tzu, Platão, Niccolò Machiavelli, Thomas Hobbes, Adam Smith, Thomas Paine, Michael Oakeshott, Eric Voegelin, Carl Schmitt, John Maynard Keynes, Ben Shapiro, David Horowitz, Dennis Prager, Dinesh D'Souza, Sargon of Akkad, Steve Pieczenik, Jordan Peterson, William Dalrymple, David Hume, Alexis de Tocqueville, John Locke, Andrew Breitbart, Mark Levin, Steve Bannon, Luiz Felipe Pondé, Mário Ferreira dos Santos, Mortimer Jerome Adler, Bruno Tolentino, José Guilherme Merquior, Olavo de Carvalho, Rodrigo Constantino, Bruno Garschagen, Paulo Rabello de Castro, Roberto de Oliveira Campos, Barry Goldwater, Richard Weaver, João Pereira Coutinho, Otto Eduard Leopold von Bismarck-Schönhausen, Adolf Hitler, Silvio Medeiros, Alexandre Borges, Flavio Gordon, Bene Barbosa, Felipe Moura Brasil, Erasmus of Rotterdam, Confucius, René Guénon,

anarch: Denis Diderot, Pierre-Joseph Proudhon, Peter Kropotkin, Mikhail Bakunin, Errico Malatesta, Nestor Makhno, Henry David Thoreau, Friedrich Hayek, Ludwig von Mises, Milton Friedman, Murray Rothbard, Hans-Hermann Hoppe, Lew Rockwell, Walter Block, Thomas Woods, Jesús Huerta de Soto, David D. Friedman, Lysander Spooner, Israel Kirzner, Thomas Sowell, Benjamin Tucker, Frédéric Bastiat, Robert Nozick, James M. Buchanan, Walter E. Williams, Stefan Molyneux, Max Stirner, Josiah Warren, Leo Tolstoy, Lao-tzu, Daniel Fraga,

lit: Samuel Beckett, André Gide, George Orwell, Aldous Huxley, Mikhail Bakhtin, Søren Kierkegaard, H. G. Wells, Jules Verne, Orson Welles, Arthur Conan Doyle, Arthur C. Clarke, Mark Twain, Oscar Wilde, Isaac Asimov, Philip K. Dick, Gabriel García Márquez, Pablo Neruda, Mario Vargas Llosa, Jean-Paul Sartre, Arthur Schopenhauer, Bertolt Brecht, Emmanuel Levinas, Walt Whitman, Baruch Spinoza, Aleister Crowley, Karl Popper, Ayn Rand, Steven Pinker, Christopher Hitchens, Simone de Beauvoir, Bruno Bauer, Ludwig Feuerbach, Vladimir Nabokov, Mary Wollstonecraft, Michel de Montaigne, Francis Bacon, Daisetsu Teitaro Suzuki, Carl Jung, Heinrich Zimmer, John Steinbeck, Jiddu Krishnamurti, Osho, Alan Watts, Helena Blavatsky, Deepak Chopra, Gautama Buddha, Mokichi Okada, Deguchi Nao, Deguchi Onisaburo, Haroldo Eurico Browne de Campos, Augusto Luís Browne de Campos, Immanuel Kant, Georg Wilhelm Friedrich Hegel, Mencius / Mengzi, Mozi / Mo Tzu / Mo Di, Xun Kuang / Xunzi, Roland Barthes, John Dewey, Ivan Pavlov, Aleksandr Ivanovich Oparin, Charles Robert Darwin, George Bernard Shaw, Gilbert Keith Chesterton, Clive Staples Lewis, Lewis Carroll, Alfred Adler, Sigismund Schlomo Freud, Carl Gustav Jung, Carl Ransom Rogers, David Hilbert, Gottlob Frege, George Boole, Claude Shannon, Kurt Gödel, Euclid, Alan Turing, Ernst Zermelo, Leonhard Euler, Évariste Galois, Bertrand Russell, Ernest Miller Hemingway,

--

RP: Chanakya / Kautilya / Vishnugupta, Sun Tzu / Sun Zi / Sun Wu, Thucydides, Han Fei / Han Fei Zi, Niccolò Machiavelli, Cardinal Richelieu, Erasmus of Rotterdam, Thomas Hobbes, Carl von Clausewitz, Vladimir Lenin, Antonio Gramsci, Adolf Hitler, Frankfurt School, Mao Zedong, Carlos Marighella, David Horowitz, Saul Alinsky, Jack Schafer, Andrzej Lobaczewski, Bruce Bueno de Mesquita

Jack Schafer - Manual de Persuasão do FBI

Andrzej Lobaczewski - Ponerologia Psicopatas no Poder

Bruce Bueno de Mesquita - The Dictator's Handbook: Why Bad Behavior is Almost Always Good Politics

Randall Wood - The Dictator's Handbook: A Practical Manual for the Aspiring Tyrant

Francis Fukuyama - The Origins of Political Order: From Prehuman Times to the French Revolution (Political Order)

Bridge: Raymond Aron, Norberto Bobbio, Milton Friedman, Friedrich Hayek

Theodore Dalrymple - Em Defesa do Preconceito,

Walter Block - Defendendo o Indefensavel,

Immanuel Kant - Perpetual Peace: A Philosophical Sketch, Critique of Pure Reason, Critique of Practical Reason.

Leszek Kolakowski - Main Currents of Marxism: Its Origins, Growth and Dissolution
Martin Jay - A Imaginação Dialética: História da Escola de Frankfurt e do Instituto de Pesquisas Sociais 1923-1950.

Leonardo Padura - O Homem que Gostava de Caes / Amava os Cachorros,

Gabriel Garcia Marquez - Cem Anos de Solidao,

* este tópico tende a mudar, aumentar, e ele só existe pois tenho medo de perder o arquivo de texto que o guardo para pesquisa por defeito físico. este tópico é apenas uma forma de deixar seguro, na internet, uma relação que pretendo preservar. não é para fazer sentido, ele já serve para mim.

sábado, 20 de janeiro de 2018

BatchFile and JScript to read Excel File

I was asked to create a simple script to read a single Excel (.xlsx) file and create a new table in some specific form. So I created a simple BatchFile (.bat/.cmd) to select the xlsx file and call a JScript to make the new table in .csv.

This code was used to read a spreadsheet of 371x2282 cells and convert it to a comma-separated file of 17040 rows by 4 columns. It took about 15 minutes to do a simples validation e about 20 minutes more do collect the data and format the new file.

Terrible performance, I know. But it make the job done! Maybe I could change the logic a bit to make it faster, I really don't know why it was so slow. Maybe cause ActiveX Office are not a good interface? Fast to develop, heavy to run? Maybe the whole format should be ignored, and be preferred a small pure text format that would be raised fully to memory... over 30 minutes to complete was a really long time!

(Yeah, crei um Batch (.cmd) para converter xlsx em csv usando JScript!)

ActiveEXelBatch.cmd (destaque feito por hilite.me, style emacs)

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
@echo off & mode 85, 50
@echo.
@echo.
@set "_ext=xlsx"
@echo. Buscando arquivos com a extensao %_ext%.
@echo.
@echo. Este script esta configurado para escolher
@echo. automaticamente um arquivo. No caso o ultimo 
@echo. arquivo em ordem alfabetica no diretorio da
@echo. execucao com a extensao %_ext%. 
@echo. 
@echo. Prefira mover os arquivos do script e o arquivo
@echo. do Excel para uma pasta exclusiva. Este eh o 
@echo. metodo mais seguro. 
@echo. 
@echo. Por favor, feche todas as intancias do EXCEL agora!
@echo. 
@for %%f in (*.%_ext%) do set "_src=%%f"
@echo. Arquivo encontrado: %_src%
@echo. 
@echo. Se o arquivo encontrado for o arquivo esperado,
@echo. apenas de enter na pergunta abaixo. Caso 
@echo. contrario, digite o nome completo com extensao.
@echo. 
@set /P _src=Outro Arquivo? Qual : 
@echo. 
@echo. 
@echo. O script possui dois passos: validacao e conversao.
@echo. Cada passo demorou por volta de 15 min em meu note.
@echo. Minha CPU: Intel Core i3-380M, 2.5Ghz (1st gen).
@echo.
@echo. Caso o arquivo nao passe na validacao, o script
@echo. sera encerrado, mostrando uma lista de erros.
@echo. 
@echo. A validacao eh absurdamente simples e so procura
@echo. por valores diferentes de 0 e 1 pela tabela.
@echo. 
@echo. Caso o arquivo passe na validacao a conversao eh
@echo. feita para um arquivo de texto puro em formato.csv.
@echo. 
@echo. Arquivos .csv podem facilmente serem importados
@echo. pelo Excel. Porem, nao sao indicados para arquivos
@echo. que contenham ";" (ponto e virgula) no interior de
@echo. suas celulas pois estes sao utilizados como 
@echo. separador tabular dentro do Excel. 
@echo. 
@echo. Por favor, feche todas as intancias do EXCEL agora!
@echo. Por favor, aguarde. Deve demorar de 30 a 45 min.
@echo.    (ou seja umas duas musicas do Pink Floyd!)
@echo. 
@echo. 
@cscript.exe /nologo ActivExel.js "%~dp0" "%_src%"
@echo.
@echo.
@echo. Forcando o fechamento do Excel caso nao tenha
@echo. sido fechado durante a execucao do scrpit. E,
@echo. por fim, fechando o script em 10 segundos!
@echo.
@echo. Talvez me encontre em:
@echo.      https://ofernandofilo.blogspot.com
@echo. 
@echo. Se me encontrar, sinta-se livre para tirar duvidas.
@echo. Ou mesmo pedir simples alteracoes no script. Nunca
@echo. fui programador. Mas para coisas pequenas e simples
@echo. talvez eu seja capaz de ajudar!
@echo.
@echo.
@taskkill /IM excel.exe /t /f
@echo.
@timeout /nobreak /t 10
@echo.
@exit /b
:: Sources:
:: https://ss64.com/nt/syntax.html
:: https://www.dostips.com
:: http://www.robvanderwoude.com/batchfiles.php
:: http://www.commandlinefu.com/commands/browse
:: https://technet.microsoft.com/en-us//library/bb490890.aspx
:: https://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/batch.mspx?mfr=true
:: https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2012-R2-and-2012/cc754340(v%3dws.11)
:: http://steve-jansen.github.io/guides/windows-batch-scripting/
:: https://www.tutorialspoint.com/batch_script/index.htm
:: https://www.bleepingcomputer.com/tutorials/windows-command-prompt-introduction/
:: http://archive.fo/XXRbo
:: https://www.computerhope.com/batch.htm
:: https://www.csie.ntu.edu.tw/~r92092/ref/win32/win32scripting.html
:: https://commandwindows.com
::
:: Tools:
:: https://docs.microsoft.com/en-us/sysinternals/downloads/sysinternals-suite
:: http://www.nirsoft.net/utils/index.html#commandline_utils
:: http://www.joeware.net/freetools/index.htm
:: https://conemu.github.io
:: https://ipmsg.org/tools/fastcopy.html.en
:: https://eternallybored.org/misc/netcat/
:: https://joncraton.org/blog/46/netcat-for-windows/
:: https://www.runtime.org/shadow-copy.htm
:: http://www.pc-tools.net/win32/
:: http://www.horstmuc.de/wcon.htm
:: https://www.cygwin.com
:: http://www.mingw.org
:: http://www.westmesatech.com/index.html
:: http://www.netikka.net/tsneti/info/tscmd.php
:: http://gnuwin32.sourceforge.net
:: https://sourceforge.net/projects/unxutils/
:: https://github.com/bmatzelle/gow/releases
:: https://www.gnu.org/software/m68hc11/m68hc11_tools_win.html
:: http://ss64.net/westlake/
:: https://www.pdflabs.com/tools/pdftk-server/
:: https://www.imagemagick.org/script/command-line-tools.php

ActivEXel.js (destaque feito por hilite.me, style emacs)

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
/**
 * To Run:
 *   cscript.exe /nologo ActivEXel.js "diretorio-raiz" "arquivo.ext"
 *   cscript.exe /nologo ActivEXel.js "%~dp0" "%_src%"
 *   wscript.exe ActivEXel.js "diretorio-raiz" "arquivo.ext"
 *
 * Sobre:
 *     Infelizmente, não posso produzir um código muito inteligente. 
 *   E portanto uma das exigências do código é que a planinha seja 
 *   populada à partir de A1. Como já é o arquivo modelo. E também 
 *   espera-se que a planinha esteja corretamente preenchida em todas
 *   as colunas com valores coerentes. Número onde é preciso ser 
 *   número e texto onde precisa ser texto. Espero por fim que os 
 *   números presentes sejam apenas 0 ou 1.
 *
 *     Qualquer mudança a este padrão tenderá a produzir um comportamento 
 *   anômalo do script.
 *
 * Licença: 
 *    Não há. Pode-se fazer qualquer coisa com ele, sem consulta prévia.
 *
 *    Tudo o que escrevo e digo não pertence 
 *     mais a mim depois de escrito e dito.
 */

// Entrada dos argumentos
var i = 0;
var j = 0;
var args = WScript.Arguments;
var fsobjetc = new ActiveXObject("Scripting.FileSystemObject");
var excelfile = fsobjetc.GetAbsolutePathName(WScript.Arguments(0)+WScript.Arguments(1));

// Configurações de Pesquisa Padrão
var stringout = "";
var excelsheetname = "";
var excelsheetnumber = 1;
var excelsheetrange = "A1";
var excel = new ActiveXObject("Excel.Application"); 
var book = excel.Workbooks.Open(excelfile);
var sheetnumber = book.Sheets.Item(excelsheetnumber); 
var rowCount = sheetnumber.UsedRange.Rows.Count;
var colCount = sheetnumber.UsedRange.Columns.Count;
var value = sheetnumber.Range(excelsheetrange);

// Listagem das Informações Recebidas:
WSH.echo("BREVE RESUMO DAS INFORMACOES RECEBIDAS");
WSH.echo("Num de Parametros: "+args.length + " (o esperado sao 2)");
for (i = 0; i < args.length; i++) {
  WSH.echo("Parametros / Args: "+args.Item(i));   
}
WSH.echo("Arquivo do Excel.: "+excelfile);
WSH.echo("Versao Excel Ins.: "+excel.Version);
WSH.echo("Celula A1 p/teste: "+value);
WSH.echo("Qtd. de Linhas...: "+rowCount);
WSH.echo("Qtd. de Colunas..: "+colCount);

// Simples Validação da Tabela
stringout = "";
for(i = 2; i <= rowCount; i++){
  for(j = 3; j <= colCount; j++){
    if ( (sheetnumber.Cells(i, j).Value != "0") && (sheetnumber.Cells(i, j).Value != "1")) {
      stringout = stringout + "("+ sheetnumber.Cells(i,1).Value + ", ";
      stringout = stringout + sheetnumber.Cells(i,2).Value + ", ";
      stringout = stringout + sheetnumber.Cells(1,j).Value + ", ";
      stringout = stringout + sheetnumber.Cells(i,j).Value + ")\n";
      stringout = stringout + "Linha: " + i + ", Coluna: " + j;
      stringout = stringout + ", Valor: " +sheetnumber.Cells(i, j).Value + "\n\n";
    }
  }
}

if (stringout != ""){
  WSH.echo("Listagem de Erros: \n\n"+stringout);
  // Se erros forem encontrados, a string estará preenchida,
  // o script fechará, informando os erros.
  book.Close();
  excel.Application.Quit();
  excel.Quit();
  excel = null;
  WScript.Sleep(100);
  CollectGarbage();
  WScript.Echo("\n Erros foram encontrados!\n");
  WScript.Echo(" Por favor, corrija-os e execute o script novamente!\n");
  WScript.Echo(" Tecle enter para fechar este script. ");
  WScript.StdIn.ReadLine();
  WScript.Quit();
}

// Início do Código
WSH.echo("Listagem de Erros: Nenhum Erro Simples!\n\n");
WSH.echo("Por favor, aguarde pelo menos mais 20 min...\n\n");
stringout = "";
stringout = "Ordem num;Família;Espécies;Local\n";
var ordem = 1;
for(i = 2; i <= rowCount; i++){
  for(j = 3; j <= colCount; j++){
    if ( sheetnumber.Cells(i, j).Value == "1") {
      stringout = stringout + ordem + ";" + sheetnumber.Cells(i,1).Value + ";";
      stringout = stringout + sheetnumber.Cells(i,2).Value + ";";
      stringout = stringout + sheetnumber.Cells(1,j).Value + "\n";
      ordem++;
    }
  }
}
var fso = new ActiveXObject("Scripting.FileSystemObject");
var filecsv = fso.CreateTextFile(WScript.Arguments(0)+"ActivEXel.csv", true);
filecsv.WriteLine(stringout);
filecsv.Close();
WSH.echo("Conversao realizada! Arquivo gerado: ActivEXel.csv\n\n");

// Rotina de Fechamento do Arquivo
book.Close();
excel.Application.Quit();
excel.Quit();
excel = null;
WScript.Sleep(100);
CollectGarbage();
WScript.Echo(" Tecle enter para fechar este script. ");
WScript.StdIn.ReadLine();
WScript.Quit();
// Nos meus testes, excel.exe só fecha após a conclusão do script.
// E nunca através de qualquer outro comando. 

/**
 * Source: Batch File to read excel
 * https://www.dostips.com/forum/viewtopic.php?t=4628
 *
 * Source: Help removing date in strings from workbooks using jscript
 * https://www.reddit.com/r/excel/comments/38j33q/help_removing_date_in_strings_from_workbooks/
 *
 * Source: BUG: Excel Does Not Shut Down After Calling the Quit Method When Automating from JScript
 * https://support.microsoft.com/en-us/help/266088/bug-excel-does-not-shut-down-after-calling-the-quit-method-when-automa
 *
 * Source: FileSystemObject Object
 * https://msdn.microsoft.com/en-us/library/z9ty6h50(v=vs.84).aspx
 *
 * Using JavaScript to Open Excel and Word Files in HTML
 * http://www.kavoir.com/2009/01/using-javascript-to-open-excel-and-word-files-in-html.html
 *
 * Run method for excel macro in javascript
 * https://www.codeproject.com/Questions/168103/Run-method-for-excel-macro-in-javascript
 *
 * To run scripts using the command-line-based script host (Cscript.exe)
 * https://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/wsh_runfromcommandprompt.mspx?mfr=true
 *
 * To run scripts using the Windows-based script host (Wscript.exe)
 * https://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/wsh_runfromwindowsbasedhost.mspx?mfr=true
 *
 * Difference between wscript and cscript
 * https://stackoverflow.com/questions/8678441/difference-between-wscript-and-cscript
 *
 * Capturing output from WshShell.Exec using Windows Script Host
 * https://stackoverflow.com/questions/2075886/capturing-output-from-wshshell-exec-using-windows-script-host/
 *
 * JScript User's Guide (Windows Scripting - JScript)
 * https://msdn.microsoft.com/en-us/library/4yyeyb0a%28v=vs.84%29.aspx
 *
 * JScript and VBScript
 * https://msdn.microsoft.com/library/d1et7k7c%28v=vs.84%29.aspx
 *
 * WSH 5.6 Documentation
 * http://download.microsoft.com/download/winscript56/Install/5.6/W982KMeXP/EN-US/scrdoc56en.exe
 * 
 * Reference (Windows Script Host)
 * https://msdn.microsoft.com/library/98591fh7.aspx
 * 
 * JScript JScript User's Guide
 * http://soliton.ae.gatech.edu/classes/ae6382/documents/MS_scripting/JScript.pdf
 * 
 * JScript Tutorial - of Peter Gottlieb
 * http://www.petergottlieb.com/docs/spect/DOASIS/jscript_tutorial.pdf
 * 
 * Excel 2010 Developer Reference
 * https://msdn.microsoft.com/en-us/library/office/ff846392(v=office.14).aspx 
 * 
 * Learn About Scripting for HTML Applications (HTAs)
 * https://technet.microsoft.com/en-us/scriptcenter/dd742317.aspx
 * 
 * HTML Applications
 * https://msdn.microsoft.com/en-us/library/ms536471.aspx
 * 
 * Microsoft Script Center
 * https://technet.microsoft.com/en-us/scriptcenter/default.aspx
 * 
 * Hey, Scripting Guy! Blog 
 * https://blogs.technet.microsoft.com/heyscriptingguy/
 *
 * TechNet Magazine: Hey, Scripting Guy!
 * https://technet.microsoft.com/en-us/library/cc135880.aspx
 *
 * DevGuru Windows Script Host Quick Reference Guide
 * http://www.devguru.com/content/technologies/wsh/home.html
 *
 * Windows Batch Scripting
 * https://en.wikibooks.org/wiki/Windows_Batch_Scripting
 *
 * Simple HTA Template to Run Utility on File
 * https://helloacm.com/simple-hta-template-to-run-utility-on-file/
 *
 * Which is Faster? VBScript or JScript on WSH – A Performance Comparison using Sieve of Eratosthenes
 * https://codingforspeed.com/which-is-faster-vbscript-or-jscript-on-wsh-a-performance-comparison-using-sieve-of-eratosthenes/
 *
 * Microsoft Script Center
 * https://technet.microsoft.com/en-us/scriptcenter/default.aspx
 *
 */

/**
  var ExcelApp = new ActiveXObject("Excel.Application");  
  var ExcelSheet = new ActiveXObject("Excel.Sheet"); 

  // Make Excel visible through the Application object.  
  ExcelSheet.Application.Visible = true;  

  // Place some text in the first cell of the sheet.  
  ExcelSheet.ActiveSheet.Cells(1,1).Value = "This is column A, row 1";  

  // Save the sheet.  
  ExcelSheet.SaveAs("C:\\TEST.XLS");  

  // Close Excel with the Quit method on the Application object.  
  ExcelSheet.Application.Quit(); 

  function GetAppVersion() {
    var XLApp = new ActiveXObject("Excel.Application", "MyServer");
    return(XLApp.Version);
  }  
  see: https://docs.microsoft.com/pt-br/scripting/javascript/reference/activexobject-object-javascript 
  see: https://msdn.microsoft.com/en-us/library/7sw4ddf8(v=vs.84).aspx
**/
/**
  <!-- MyJob.wsf -->
  <job id="IncludeExample">
    <script language="JScript" src="MyLib1.js"/>
    <script language="JScript" src="MyLib2.js"/>
    <script language="JScript">
      WScript.Echo(myLib1.foo());
      WScript.Echo(myLib2.bar());
    </script>
  </job>
  see: https://stackoverflow.com/questions/3054321/how-to-reference-a-jscript-file-from-another-one
**/

/**
  function removeDate(){
    var xl = Sys.OleObject("Excel.Application"); // Application
    var wb = xl.Workbook.Open("C:\temp\test.xlsx"); // Workbook
    var ws = wb.Worksheets("yourSheetName"); // Worksheet
    var rowCount = ws.UsedRange.Rows.Count; // row count
    var colCount = ws.UsedRange.Columns.Count; // column count

    // loop through every cell in used range
    for(i = 1; rowCount; i++){
      for(j = 1; colCount; j++{
        // if cell isn't blank
        if(ws.Cells(i, j).Value != ""){
            // insert regex here to find date if present
            // replace if found
        }
      }
    }
  }
  see: https://www.reddit.com/r/excel/comments/38j33q/help_removing_date_in_strings_from_workbooks/
**/
 
/**
  var ExcelApp = new ActiveXObject("Excel.Application");
  var ExcelSheet = new ActiveXObject("Excel.Sheet");

  // Make Excel visible through the Application object.
  ExcelSheet.Application.Visible = true;

  // Place some text in the first cell of the sheet.
  ExcelSheet.ActiveSheet.Cells(1,1).Value = "This is column A, row 1";
  WScript.Sleep(15000);

  // Close Excel with the Quit method on the Application object.
  ExcelSheet.Application.Quit(); 
  
  see: https://msdn.microsoft.com/en-us/library/7sw4ddf8(v=vs.84).aspx
**/

/**
  var excel=new ActiveXObject("Excel.Application"); 
  //excel.Visible = true;
  //var book=excel.Workbooks.Open("modelo.xlsx"); 
  var book=excel.Workbooks.Open("C:\\Users\\Fernando\\Desktop\\Tabular\\modelo.xlsx"); 
  var sheet=book.Sheets.Item(1); 
  var value=sheet.Range("A1");
  WSH.echo(value);
**/

/**
  var folder=argumentos.Item(0);
  var file=argumentos.Item(1);
  WSH.echo("Add.P.: "+folder+file);
**/

/**
  for(i = 1; i <= 3; i++){
    for(j = 1; j <= 3; j++){
      stringout = stringout + " " +sheetnumber.Cells(i, j).Value;
    }
    WSH.echo("Achei: "+stringout);
    stringout = "";
  }
**/

/** 
  var sheetname=book.Worksheets(excelsheetname);
**/

/**
  WSH.echo("Tabela.: \n\n"+stringout);
**/

Download both codes:
https://drive.google.com/open?id=1if3QZATT_FJ-yR2GJTtf1SmNfEDcbPrc

Some resources for BatchScripting:
https://ss64.com/nt/
https://www.dostips.com
http://www.robvanderwoude.com/batchfiles.php
https://en.wikibooks.org/wiki/Windows_Batch_Scripting

Some resources for JScript:
JScript User's Guide (Windows Scripting - JScript)
JScript Tutorial - of Peter Gottlieb
JScript JScript User's Guide
WSH 5.6 Documentation

Bonus: CodingForSpeed!
Which is Faster? VBScript or JScript on WSH

cheers

sexta-feira, 8 de dezembro de 2017

Lista - Emuladores para Windows

2018/07/10 - Apenas uma lista atualizada de links das ferramentas preferidas e recomendadas para emulação em Windows, e eventualmente em Linux e Android.

Informações mais detalhadas em:
Emuladores e Máquinas Virtuais para Jogos!

Melhores Tutoriais de Emuladores do Youtube em português

Canal Do Shin HentsDetona Bits, Emula

Super Nintendo Entertainment System / SNES

Snes9x[1,2,3,4,-,-], bsnes[1,2,3,4], higan[?], Snes9x-rr[1,2], no$sns,

RASnes9x[1], Snes9x EX[1]

Gameboy / GB, GBC, GBA

BGB, SameBoymGBA[1], VBA-M[1,2], RAVBA[1]

Nintendo Entertainment System / NES


Sony PlayStation / PS, PSX, PS1

XEBRA[1,2,?], Mednafen[1,-,-,-,-], Beetle PSX[1], no$psx,

ePSXe[1,-], PCSXR-PGXP[1,2,-,-,-,-,-,-,-,-,-,-,-,-,-]

PlayStation Portable / PSP

PPSSPP[-]

Nintendo 64 / N64

Mupen64Plus[1,2,3,-], Project64[1,2,3,4,?,?,-], m64pRAP64

GameCube, Wii, Wii U

Dolphin[1], Cemu

Nintendo DS / DS, 3DS

DeSmuME, MelonDS[?], Citra

Playstation 2 / PS2

PCSX2[1,2,3,4,5,?,?]

Dreamcast

Reicast[1], nullDC[1], DEMUL

Sega Genesis, Mega Drive e Master System / Gen

Kega Fusion[1,-,-,-], Genesis Plus GX[1,2],

RAGens[1], RAMeka[1]

Sega Saturn

SSF[1], MednafenYaba Sanshiro[1,2,3,4], Nova[1,2]

Arcade

FB Alpha[1], WinKawaks, Model2Emu,

Supermodel[1,2,3], MAME[?,?,?,?]

Android

BlueStacks, NoxPlayer, MEmu, Genymotion

Multi-System

Bizhawk[1], MAME[1], MednafenRetroArch[1,2,?]

Microsoft System

DOSBox[1], vDosPlus, MS-DOS Player[1,2],

ScummVM, ReactOS, FreeDOS

Virtual Machines

VirtualBox[1], VMwareQEMU, PCembochs, BoxedwineXen

Patcher

Audacity[-,-,-], normalizeMSUPCM++snesbrrsoxwav2msu[1,2],

Asar, bp++, Lunar Expand, SNEStuff, xkas, VBinDiff, HxD, wla-dx,


CDMage[1,2], HashMyFiles, HashTabFSUMmdf2iso[1]

Shader

Asmodean- PsxFX[?,?,?,1], guest(r)[1,2], KrossX[1,?], pbernertTheMaister,

Common[1,?,?,?,?,?,?], GLSLSLANG[1], AnalogReShade[1,2,3],

SimoneT, cgwgEmuCR, Emu-France

Wrapper

nGlideMesa3D[1,2,3,-], WineD3D[1,2], DxWnd,

D3DWindowerddwrapperdgVoodoo 2DXGL,

DirectX OpenGL Wrapper, GLDirectqindie-gl,

ANGLEGL2DX, TitaniumGL, 3D-Analyze

Tools

NSRT[1,2,3,?], GoodTools[1,2,3,?,?], SBWin[1,2,3], VBALink,

Clrmamepro, RomCenter, RomVault, Redump, No-Intro,

Speccy, HWiNFO, CPU-Z, GPU-Z, GPU Caps Viewer[1,2,3], CrystalDiskInfo,

AutoRuns, Process Explorer, Process Hacker[1], WSCC

Stream

OBS Studio[1,?,?,*,!,!,!,!,!,!,!,!,-,-,-,-,?], OBS Classic[?], Mishira, FFSplit[1,-],

XSplit[1], Flash Media Live Encoder[1], Hangouts On Air,

ScreenStudio, SimpleScreenRecorder, SnowMix

SpeedTest, GoogleFiber

Non Linear Video Editor, Converter, Recorder

OpenShot, ShotcutfilmoraPinnacle Video Spin,

XMedia RecodeHandBrakeMediaCoder,

WinFF, QWinFFFFmpegYAG,

Open Camera[?], Cinema FV-5

Encoder

FFmpeg[1,2,?,?], GStreamer, MEncoder[1], Libav

Dependências

DirectX 9 Redistributable[1,2] - HowTo

SDL, SDL2, OpenAL, GTK+[1], Cygwin, MinGWPythonReShade

The latest supported Visual C++ downloads (2008 to 2017)[1,2,3,4,5]

Update for Universal C Runtime in Windows (W10UCRT)

Platform Update for Windows 7[1,2 - vollversion,?]

7-Zip, Bandizip, PeaZip, Winrar

Snappy Driver Installer Tool[1]

RedFox Virtual CloneDrive

K-Lite Codec Pack Mega

libfdk-aac encoder

Adobe Flash[1,-,-]

VLC

ZSNES Netplay (método antigo)

ZSNES 1.36[1], ZSNES 1.42[1], ZSNES 1.42n,

Mac ZSNESUbuntu ZSNES[1]