Configure Cyborg R.A.T 9 on elementaryOS with X.Org X Server 1.11.3 - xorg

I want to configure my Cyborg R.A.T 9 mouse to work with my installation of elementaryOS (luna, 64 Bit).
I used this solution for the last two years, but it doesn't work anymore (I guess it's outdated). Newer post I found included creating a file 910-rat.conf in /etc/X11/xorg.conf.d/, but this folder doesn't exist in my installation. As I don't want to destroy it, I thought it might be better to ask if simply creating that directory and file would work.
TL;DR:
OS: elementaryOS luna (0.2 beta) 64 bit
Mouse: Cyborg R.A.T 9
Xorg X server version: 1.11.3
Question:
Is it ok to create the directory /etc/X11/xorg.conf.d/ and will the conf files in there be used or am I missing any steps?

I found an article in the german ubuntuusers wiki saying that the directory is located in /usr/share/X11/ and not in /etc/X11/ .
So I just added the file in /usr/share/X11/xorg.conf.d/ and it worked.
For further reference:
I added the file 910-rat.conf to the folder /usr/X11/xorg.conf.d/.
The file contained the following content:
Section "InputClass"
Identifier "Cyborg R.A.T. 9"
MatchProduct "R.A.T.7|R.A.T.9"
MatchDevicePath "/dev/input/event*"
Option "Buttons" "17"
Option "ButtonMapping" "1 2 3 4 5 0 0 8 9 7 6 12 0 0 0 16 17"
Option "AutoReleaseButtons" "13 14 15"
Option "ZAxisMapping" "4 5 6 7"
EndSection

Related

Download csv file from Nasdaq site

I tried now for some time to simply download a csv file in RStudio(so i am using R) from the web. I have done stuff like this before and never run into the issues i have now. Tried several solutions suggested online. I simply try to download the following file from here https://www.nasdaq.com/market-activity/stocks/aapl/historical. This is the link to the csv -> https://www.nasdaq.com/api/v1/historical/AAPL/stocks/2020-09-09/2020-10-09. I tried httr and RCurl package methods none worked. Hope someone can help me out, thanks in advance.
Edit: What i tried so far:
-Updated ssl
-I can install new packages so internet generally works
-Updated git
-Updated R
-Updated all packages
-Tried what is suggested here: Download.file fails in RStudio
Edit2: A while ago i did webscrape with the package RSelenium and started a rem_session. Is it possible that Rselenium changes some underlying settings?
Edit3: Completely uninstalled Rstudio + R + Rtool manually deleted everything, after a fresh installation still the same problem
Have you tried to load it directly in R through read.csv()?
It worked for me... Check it out:
data = read.csv('https://www.nasdaq.com/api/v1/historical/AAPL/stocks/2020-09-09/2020-10-09')
data
Here is the output:
Date Close.Last Volume Open High Low
1 10/07/2020 $115.08 96848990 $114.62 $115.55 $114.13
2 10/06/2020 $113.16 161498200 $115.7 $116.12 $112.25
3 10/05/2020 $116.5 106243800 $113.91 $116.65 $113.55
4 10/02/2020 $113.02 144712000 $112.89 $115.37 $112.22
5 10/01/2020 $116.79 116120400 $117.64 $117.72 $115.83
6 09/30/2020 $115.81 142675200 $113.79 $117.26 $113.62
7 09/29/2020 $114.09 100060500 $114.55 $115.31 $113.57
8 09/28/2020 $114.96 137672400 $115.01 $115.32 $112.78
9 09/25/2020 $112.28 149981400 $108.43 $112.44 $107.67
10 09/24/2020 $108.22 167743300 $105.17 $110.25 $105
11 09/23/2020 $107.12 150718700 $111.62 $112.11 $106.77
12 09/22/2020 $111.81 183055400 $112.68 $112.86 $109.16
13 09/21/2020 $110.08 195713800 $104.54 $110.19 $103.1
14 09/18/2020 $106.84 287104900 $110.4 $110.88 $106.09
15 09/17/2020 $110.34 178011000 $109.72 $112.2 $108.71
16 09/16/2020 $112.13 155026700 $115.23 $116 $112.04
17 09/15/2020 $115.54 184642000 $118.33 $118.829 $113.61
18 09/14/2020 $115.355 140150100 $114.72 $115.93 $112.8
19 09/11/2020 $112 180860300 $114.57 $115.23 $110
20 09/10/2020 $113.49 182274400 $120.36 $120.5 $112.5
21 09/09/2020 $117.32 176940500 $117.26 $119.14 $115.26
If you want to save it afterwards as a csv file, just run write.csv():
write.csv(data, '~/Downloads/data.csv')
Let me know if it worked for you.
In case you are in a windows OS you need to set the mode=wb argument.
download.file(
"https://www.nasdaq.com/api/v1/historical/AAPL/stocks/2020-09-09/2020-10-09",
"file.csv", mode='wb'
)

Running into DVTAssertions: ASSERTION FAILURE error with ios-sim

I'm trying get ionic up and running using my mac by following the simple instructions on the website (http://ionicframework.com/getting-started/)
Everything is working until i need to emulate
$ ionic emulate ios
I did a little deeper and I realized the same error lies in when I tried to run ios-sim
Here is what I see
$ ios-sim start
2015-02-27 14:01:57.361 ios-sim[1810:208272] [MT] DVTAssertions: ASSERTION FAILURE in /SourceCache/DVTiOSFrameworks/DVTiOSFrameworks-6274/DVTiPhoneSimulatorRemoteClient/DTiPhoneSimulatorSessionConfig.m:143
Details: (runtime) should not be nil.
Object: <DTiPhoneSimulatorSystemRoot>
Method: +rootWithSimRuntime:
Thread: <NSThread: 0x7ff44a5105f0>{number = 1, name = main}
Hints: None
Backtrace:
0 0x0000000110abe24a -[DVTAssertionHandler handleFailureInMethod:object:fileName:lineNumber:assertionSignature:messageFormat:arguments:] (in DVTFoundation)
1 0x0000000110abdc9f _DVTAssertionHandler (in DVTFoundation)
2 0x0000000110abdf8e _DVTAssertionFailureHandler (in DVTFoundation)
3 0x0000000111062614 +[DTiPhoneSimulatorSystemRoot rootWithSimRuntime:] (in DVTiPhoneSimulatorRemoteClient)
4 0x0000000111061897 -[DTiPhoneSimulatorSessionConfig simulatedSystemRoot] (in DVTiPhoneSimulatorRemoteClient)
5 0x000000010ebadab0 -[iPhoneSimulator launchApp:withFamily:uuid:environment:stdoutPath:stderrPath:timeout:args:] (in ios-sim)
6 0x000000010ebaecfd -[iPhoneSimulator runWithArgc:argv:] (in ios-sim)
7 0x000000010ebaefbb main (in ios-sim)
8 0x000000010ebac37c start (in ios-sim)
9 0x0000000000000002
Abort trap: 6
Please advice

Weird Foreign Character Behavior in R / Rstudio

I have a CSV with Czech characters in it that looks like this:
id,address,city
660999,Vršovická 10,Praha
676838,Valentova 50,Praha 4
676858,Husova 6740,Pardubice
677971,Lipová 10,Třebíč
678304,Jana Ziky 10/1955,Ostrava
...
When I import into RStudio everything looks fine if I view it using the View() function.
But in the terminal when I view the values everything looks crazy.
xl = read.csv("some_csv.csv")
head(xl)
id address city
1 660999 Vršovická 10 Praha
2 676838 Valentova 50 Praha 4
3 676858 Husova 6740 Pardubice
4 677971 Lipová 10 TÅ™ebíÄ
5 678304 Jana Ziky 10/1955 Ostrava
When I check the encoding with Encoding(xl[1,2]) for example it says "unknown".
I also have Russian data with the same exact problem.
I've tried switching to Sys.setlocale("LC_CTYPE", "czech") and Sys.setlocale("LC_CTYPE", "russian") and importing under those settings and they behave the same.
I'm using Rstudio Version 0.98.501 with R version 3.0.2 on Windows 7. A colleague on a separate computer is having the same problem.
Anything I can do make these characters work correctly the terminal?

What is the most common filename extension of a Forth source code file?

I have seen people save Forth source code files with the extensions .4th, .fth, .frt and .f. Which is the most common filename extension of Forth source code files?
I searched for various file extension on GitHub (plus "dup drop swap"), and this was the result:
.fs 4783 hits
.fth 1144
.4th 509
.f 398
.fr 143
.4 55
.frt 46
.scr 30
.forth 20
.ft 11
.fb 4
.blk 2
.seq 1
.ans 1
.for 1
.fo 0
If nothing else, this shows there are many file extensions to chose from.
Inspired by Lars Brinkhoff's answer, I ran some queries myself on GitHub to find out how the various extension names are used between various languages (not just Forth). For each extension in the list below, only the top 3 languages with the highest number of results are shown:
.fs
F# - 148303
Forth - 83217
GLSL - 61806
.fth
Forth - 10119
.f
Fortran - 2192549
Forth - 7725
Filebench WML - 5946
.4th
Forth - 5668
Shell - 1
.frt
Forth - 1950
.fr
Text - 92789
Frege - 25118
Forth - 1848
.forth
Forth - 344
.for
Fortran - 44077
Formatted - 7894
Forth - 27
.ft
Perl - 26
XML - 21
Forth - 16
The results above were obtained on 13 May 2021 at 15:30 UTC.
Note: GitHub sometimes detects the wrong language for source code files. The above queries attempt to reduce the impact of such errors on the results above but they aren't perfect.
Conclusions:
The most popular extension for Forth source code appears to be .fs but the extension .fs is most often used for F#. In fact there are about twice as many F# source code files with this extension as there are for Forth.
The most popular extension for Forth source code that does not appear to be used for any other language is .fth.
The extensions .4th, .frt, and .forth also do not appear to be used for any other language, however, these extensions are less popular than .fth.
Gforth advocates .fs in its documentation, which is a pretty good standard for such things.

QStringList of quazip::getFileNameList casts error by destruction

in Qt Creator (qt 4.8, winxp) I wrote
QuaZip* zipfile = new QuaZip;
zipfile->setZipName("myzipfile.zip");
zipfile->open(QuaZip::mdUnzip);
if(zipfile->isOpen()){
QStringList files = zipfile->getFileNameList();
} // here the error occurs
when files is destroyed, a messagebox says
Debug Assertion Failed!
Expression: _CrtIsValidHeapPointer(pUserData)
In the debugger I have the following function stack:
0 DbgBreakPoint ntdll 0x7c90120e
1 RtlpBreakPointHeap ntdll 0x7c96c201
2 RtlpValidateHeapEntry ntdll 0x7c96c63e
3 RtlValidateHeap ntdll 0x7c9603b0
4 HeapValidate kernel32 0x7c85f8d7
5 _CrtIsValidHeapPointer dbgheap.c 2103 0x102d1ac9
6 _free_dbg_nolock dbgheap.c 1317 0x102d0b3a
7 _free_dbg dbgheap.c 1258 0x102d09e0
8 free dbgfree.c 49 0x102d8990
9 qFree qmalloc.cpp 60 0x5e2f1d
10 QString::free qstring.cpp 1235 0x65dd22
11 QString::~QString qstring.h 880 0x5ac0d3
12 QString::`scalar deleting destructor' QuizSet 0x4120e0
13 QList<QString>::node_destruct qlist.h 433 0x412180
14 QList<QString>::free qlist.h 759 0x4115fb
15 QList<QString>::~QList<QString> qlist.h 733 0x410967
16 QStringList::~QStringList MyApp 0x414d9f
17 MyApp::myFunction myapp.cpp 561 0x420e1c
...
line 433 in qlist.h is where the debugger stops:
while (from != to) --to, reinterpret_cast<T*>(to)->~T();
the error occurs only if I call ::getFileNameList(), if I fill the list manual it works fine.
Other operations with quazip work, I can unzip and zip data, only the getFileNameList makes trouble.
EDIT: I found the cause: the quazip1.dll I used was the release version of it, only in debug-running this problem arised. So if I use the debug quazip.dll, it works fine. Annoying they're called the same, so I have to rename everytime I switch from debug to release. Anybody knows a workaround to this?
This means that you are mixing release mode Qt DLLs with Debug ones. You have to create 2 sets of Quazip DLLs one for Release mode and one for Debug mode. You cannot mix Qt Debug DLLs with Release DLLs.

Resources