« first day (1995 days earlier)      last day (2787 days later) » 

00:11
Hello! Anyone here? If anyone has a moment I have a problem I think would be a quick answer for most here but is insurmountable to me. Q: mathematica.stackexchange.com/questions/149509/…
00:26
@ThePerfectArchitectureCompany "Insurmountable".. do people really use this word?
This question has already 2 answers.
Hehehh.. You've probably never met anyone like me either.
Yes. It's true there are 2 answers. Nether of which has yet solved my problem unfortunately.
So what exactly is your problem?
Im just opening the nb
ah: The error: From Digits
:Theexpression"B9C0"is not a list of digits or a string of valid digits.
every single combination as I try to work around this seems to come back to that error. And I'm pretty creative...
Well, what does the error message say?
its not a digit. so when I worked backward from that into the docs, I was trying to test it with the digitQ and Head[].
digitQ I could not get working on hex integers ???? :(
but everything with the Head looked in order to pass the string to the fucntion.
00:34
First, you can pass a string for base 16 like this
In[3]:= FromDigits["1B9C0", 16]

Out[3]= 113088
What's wrong with that?
oh this is great!
one sec
yup its good to go
@ThePerfectArchitectureCompany Do you understand each level on which this here fails?
FromDigits[#, 16] & /@ {1 B9C0, 7 C3E0, F87C0, 37380, 1064 A0, 45060, A5A80, A5A80}
I do not. My suspicion is that is has something to do with that odd spaces " " in the input list. That in turn has influenced my search for a workaround – trying to get ride of those spaces. I've tried many Fullform/ToString combos but to no avail. Super Puzzling!
@ThePerfectArchitectureCompany OK, first issue: FromDigits either wants a list like {1,2,3} or a string like "123"
Something like B9C is a variable or as Mathematica calls it, a Symbol.
Now you have a second issue. Such symbols can never start with a number. They always need to start with a letter or $
hmmm symbol to string
00:47
@ThePerfectArchitectureCompany But, 1B9C0 is not a symbol.
It is the multiplication of 1*B9C0 which is completely what you don't want.
This is the reason why you see the odd spaces, as Mathematica automatically inserts a tiny space to indicate that those two parts are multiplied
See the output of this:
FullForm[Hold[1B9C0]]
It is Hold[Times[1,B9C0]] and Times means multiply it..
Why copy and pasting is adding a space thats then interpreted as times will have to be put to the side. How do I workaround this? I'm wondering if from a development standpoint I should of separated the encoding and decoding parts from the start?
@ThePerfectArchitectureCompany Even if you paste the 1B9C0 into Mathematica without space, it will always be a multiplication
@ThePerfectArchitectureCompany So what you want to do is to copy something like 1B9C0 into Mathematica and have it handled as a String?
please...
It must be something trivial. I feel like I know about 8 words of Japanese and everyone else here is speaking fluently.
@ThePerfectArchitectureCompany Well, you can try something like this for a start:
InputField[Dynamic[var], String]
00:57
@ThePerfectArchitectureCompany And maybe add another line
Dynamic[FromDigits[var, 16]]
The moment you type something in and press enter, the string is assigned to the variable var.
And the last code line makes that it dynamically calls FromDigits as soon as var has a new value
This is a bit comical. I'm doing something wrong. We expect children to to this??!?
InputField[Dynamic[var], {1B9C0,7C3E0,F87C0,37380}]
@ThePerfectArchitectureCompany No, this is not going to work. What exactly is your input that you try to copy from another program?
There are many ways to do it.
One way would be:
Actually I've been copy and pasting within mma itself to simulate the later development environment when I split each part of the program .
@ThePerfectArchitectureCompany Inside Mathematica, you cannot use {1B9C0,7C3E0,F87C0,37380}
as I explained earlier.
The correct Mathematica way to write a number base 16 is
16^^1B9C0
01:10
and note that here, you can use your 1B...
that explains so many posts I was reading
dear goodness I love this stuff
Booya. We are rolling.
Thank you so much for your patience
No problem
 
2 hours later…
02:51
@halirutan I'm sorry to disturb again.I want to put my .nb file into Github,but it will show many Boxed thing..
Is there any method can let the github show my code normally?
@yode That's normal for a notebook. A notebook is not made for direct "text view"
although it is a text file
Oh,yes I know.it is a rich text.So is not any workaround?@halirutan
03:08
@yode No, not really. You can put it as binary file there if you like.
@halirutan "binary file"?
40
Q: How do I make Git treat a file as binary?

Charles RandallHaving a problem with a medium sized project where visual studio project files keep having issues due to git treating them as text and merging. I'd like to just set the file as binary so that git won't auto merge these files ever. Is there a way to do this?

@halirutan Thanks a lot. :)
03:28
@yode np

« first day (1995 days earlier)      last day (2787 days later) »