|
LeftistMuslimObama posted:I've given up on XSLT for my XML problem. It just plain can't handle the weird structure this data is stored in. As an alternative, I've been looking at SAX: http://docs.oracle.com/javase/tutorial/jaxp/sax/parsing.html Sinestro posted:Python and lxml or Ruby and nokogiri would be my suggestions for language/library. I mean, you can solve this kind of problem in any language reasonably well.
|
# ? Sep 3, 2014 22:50 |
|
|
# ? May 31, 2024 08:09 |
|
I looked at those too, but I'm concerned that having to install the Python or Ruby executable might be over my users' heads and our corporate image has Java pre-installed. If lxml is that much better I'll look into how difficult it would be to GPO the appropriate executable to everyone (my corporation has a hippie no-masters attitude and makes everyone a local admin. They're loathe to push software out, it's like pulling teeth to get them to do it). Python is a language I should probably have in my toolkit anyway. edit: I am scanning the python beginner's tutorial, and this is looking sweet. I can see why they don't start you off with this stuff in CS, but this looks a lot more like the langauges I use day-to-day. OK, not quite, my language has no reserved words, no variable types, and all variables are b-trees. The MUMPSorceress fucked around with this message at 06:16 on Sep 4, 2014 |
# ? Sep 4, 2014 05:56 |
|
TheEffect posted:That's good information to know, interesting. I used to have great fun connecting to port 25 on my companies Email server and doing stuff like quote:EHLO whitehouse.gov
|
# ? Sep 4, 2014 06:51 |
|
LeftistMuslimObama posted:edit: I am scanning the python beginner's tutorial, and this is looking sweet. I can see why they don't start you off with this stuff in CS, They do in quite a few places. There are technically difficult languages but Python is not generally considered one of them.
|
# ? Sep 4, 2014 13:55 |
|
I'm looking for a good weather API. Is wunderground still the goon recommended one or are there other players now like forecast.io or anything else?
|
# ? Sep 4, 2014 14:43 |
|
GrumpyDoctor posted:They do in quite a few places. There are technically difficult languages but Python is not generally considered one of them. That's what I meant. Python seems to be easy and convenient, which maybe abstracts too much away for a learner to understand what's actually happening in the computer. I was kinda disappointed that my data structures class was in Java instead of C++ or something for the same reason. I feel like I still don't have a strong grasp of dealing with memory because I've never had to do it. I'm taking a compilers class this year and I'm super nervous about dealing with assembly (MIPS specifically) because I've never touched that stuff before.
|
# ? Sep 4, 2014 15:20 |
|
Don't worry, Assembly isn't that bad, although I find it odd you haven't had an "Intro to Computer Organization" course yet, which is usually where they introduce concepts like bitwise operations, boolean logic, and assembly programming. If you haven't had any assembly experience yet it's probable that you aren't alone, and the instructor will introduce you to programming in assembly at the beginning of the course. Hell, once I got the hang of it it was actually kind of fun, putting simple programs together tiny piece by tiny piece.
|
# ? Sep 4, 2014 15:40 |
|
kiwid posted:I'm looking for a good weather API. Is wunderground still the goon recommended one or are there other players now like forecast.io or anything else? If you're in the US, the NWS has a number of APIs available. LeftistMuslimObama posted:That's what I meant. Python seems to be easy and convenient, which maybe abstracts too much away for a learner to understand what's actually happening in the computer. I was kinda disappointed that my data structures class was in Java instead of C++ or something for the same reason. I feel like I still don't have a strong grasp of dealing with memory because I've never had to do it. I'm taking a compilers class this year and I'm super nervous about dealing with assembly (MIPS specifically) because I've never touched that stuff before. One thing about programming education is that there's a lot of concepts to explain simultaneously early on... notably rigid syntaxes, memory management, and abstract algorithmic thinking. Being able to remove memory management concerns and use a simple syntax helps students focus on just thinking like a programmer which is critical to success in early lessons. Once they clear that hurdle it's easier to introduce new concepts imo.
|
# ? Sep 4, 2014 16:24 |
|
chmods please posted:If you're in the US, the NWS has a number of APIs available. Nah, Canada.
|
# ? Sep 4, 2014 17:15 |
|
LeftistMuslimObama posted:That's what I meant. Python seems to be easy and convenient, which maybe abstracts too much away for a learner to understand what's actually happening in the computer. I was kinda disappointed that my data structures class was in Java instead of C++ or something for the same reason. I feel like I still don't have a strong grasp of dealing with memory because I've never had to do it. I'm taking a compilers class this year and I'm super nervous about dealing with assembly (MIPS specifically) because I've never touched that stuff before. They picked what they picked because reasons. Regardless, python is a really good get things done language thanks to the flexibility provided by duck-typing, first class functions, and the dictionary type; the robustness of the standard library and ecosystem; and the generally excellent documentation. For your task in particular the python lxml library's sloppy HTML parser seems particularly well-suited and certainly easier than writing a SAX parser. Don't get me wrong, you could solve the problem with a SAX parser. There might even be a sloppy HTML parser for Java you could use instead -- I wouldn't know.
|
# ? Sep 4, 2014 17:43 |
|
carry on then posted:Don't worry, Assembly isn't that bad, although I find it odd you haven't had an "Intro to Computer Organization" course yet, which is usually where they introduce concepts like bitwise operations, boolean logic, and assembly programming. If you haven't had any assembly experience yet it's probable that you aren't alone, and the instructor will introduce you to programming in assembly at the beginning of the course. Hell, once I got the hang of it it was actually kind of fun, putting simple programs together tiny piece by tiny piece. So, everyone else in the class probably has had it, but I'm in a weird situation. I did half a CS major in college (then made bad teenage choices), but at my current job I've gotten pretty bored with what I do (technical writer) and realized I have a lot more fun programming (where I'm challenged) than I do writing change logs and user manuals all day. My company has a program where you can switch to become a developer, but you are required to complete a specific list of CS courses at the local university first. They pay for them, but only if you get >=B and only for the courses on the list. The compilers class is on the list. The Computer Organization course is not. I spoke with the instructor and he said that given my background he'd feel OK with me in the course provided I do some self-education on Google and bought the TA pizza if I use up too much of his time. I read all of the Wikipedia articles on Assembly, MIPS, and architecture and feel like I 70% understand it. I'm still searching for a decent MIPS tutorial to help me cement the concepts better. It seems for the most part like it's: 1) Move data into registers 2) Do operation on data 3) Repeat until done with data 4) Move data back to memory I'm not super clear on how this happens in terms of the actual engineering of the processor, but the actual programming seems to be mostly like coaching an old lady through using a computer; you have to dictate each atomic step one at a time.
|
# ? Sep 4, 2014 18:06 |
|
For a Comp Org class that's plenty; for a Comp Arch class you'd probably use Patterson & Henessy as the text and work your way from combinatorial and sequential logic through the design of a simple pipelined MIPS-like RISC processor.
|
# ? Sep 4, 2014 18:25 |
|
For Compilers that will be fine. You won't need to know the actual EE concepts of what's going on. It's more about knowing how to take assembly and go up, rather than understanding what's happening underneath that.
|
# ? Sep 4, 2014 18:30 |
|
Coursera has a computer architecture class this fall. I don't know if the timing works out well for you, but it might be worth keeping an eye on. Ninja edit: There's also a hardware/software interface class that recently completed. You might still be able to sign up and access the videos and quizzes.
|
# ? Sep 5, 2014 00:36 |
|
kiwid posted:I'm looking for a good weather API. Is wunderground still the goon recommended one or are there other players now like forecast.io or anything else? When i was working with Azure They announced that they had datasets available for use, Some were free some you had to pay for. http://datamarket.azure.com/browse/data?category=weather Thats the Weather datasets.
|
# ? Sep 5, 2014 07:16 |
|
I'm trying to learn Scala and while I understand most of the basics, since I'm good at Java and have Python experience, there are tons of small things I can't figure out. The problem is that most of what I can't understand tends to be symbol/operator usage and its impossible to google since google tends to truncate non-alphanumeric stuff. Is there a good book that goes more in depth and cover these things? I've been considering getting the O'Reilly book, Programming Scala (new edition), but not sure if it would answer my questions. Fake Edit: In a declaration like this code:
|
# ? Sep 5, 2014 08:22 |
|
Kenishi posted:I'm trying to learn Scala and while I understand most of the basics, since I'm good at Java and have Python experience, there are tons of small things I can't figure out. Scala is a hopelessly broken language with enough good ideas to be brought down by the collective weight of their combined over-complexity (speaking as someone who spent some time learning it). There's a talk by one of its former longtime contributors and founding member of Typesafe that I'd link if I had my computer near. What are your goals in trying to learn Scala? For practical and modern typesafe languages, there are better choices.
|
# ? Sep 5, 2014 09:10 |
|
Kenishi posted:I'm trying to learn Scala and while I understand most of the basics, since I'm good at Java and have Python experience, there are tons of small things I can't figure out. The problem is that most of what I can't understand tends to be symbol/operator usage and its impossible to google since google tends to truncate non-alphanumeric stuff. Get the Odersky book, it covers everything you need to know. (edit: section 19.3, page 417 in my copy of the book) The + is a variance declaration, it specifies subtyping relationships based on that type parameter. code:
Contravariant examples are less immediately obvious, but one good one is function arguments. A function that takes a Parent is also a function that takes a Child. You can have multiple of these in a type, so for example, Function2[-T1,-T2,+R] (aka (T1,T2) => R) is covariant on its return type, but contravariant on its two argument types. Doctor w-rw-rw- posted:Scala is a hopelessly broken language with enough good ideas to be brought down by the collective weight of their combined over-complexity (speaking as someone who spent some time learning it). There's a talk by one of its former longtime contributors and founding member of Typesafe that I'd link if I had my computer near. If scala is hopelessly broken, then we might as well give up programming, because everything else is worse. The person you're talking about is paulp, and he still uses scala because it's the least bad option. (see https://github.com/paulp/psp-std/)
|
# ? Sep 5, 2014 10:10 |
|
Doctor w-rw-rw- posted:What are your goals in trying to learn Scala? For practical and modern typesafe languages, there are better choices. b0lt posted:Get the Odersky book, it covers everything you need to know. (edit: section 19.3, page 417 in my copy of the book) Thanks. I saw that book when looking around, I'll look into getting it. Also, thanks for explaining that usage, that is pretty useful.
|
# ? Sep 5, 2014 17:59 |
|
Kenishi posted:I want to learn a language that feels like it has stronger roots in functional style programming, while not cutting me off from the ability to use a wide array of libraries. Python almost satisfies this but the fact that it uses dynamic typing frustrates me to no end. Finally, a lot of shops that use Java also tend to use Scala for concurrency tasks. I think your options are Scala, Clojure, and F#. F# is delightful if you're willing to live entirely in .NET-land.
|
# ? Sep 5, 2014 19:40 |
|
I need to allow users to define strings that get sent out a RS232 port to control things like DVD players, TVs, projectors, etc. Some have nice ASCII control protocols but others use binary protocols. For the binary protocols I need a way for users to define strings that can contain non-printable characters. Right now I'm parsing standard C escapes but to define a series of bytes it's not the easiest thing to parse or generate for non-programmers. Anyone aware of some other markup or escape that might be more non-nerd friendly?
|
# ? Sep 5, 2014 21:09 |
|
fankey posted:I need to allow users to define strings that get sent out a RS232 port to control things like DVD players, TVs, projectors, etc. Some have nice ASCII control protocols but others use binary protocols. For the binary protocols I need a way for users to define strings that can contain non-printable characters. Right now I'm parsing standard C escapes but to define a series of bytes it's not the easiest thing to parse or generate for non-programmers. Anyone aware of some other markup or escape that might be more non-nerd friendly? Base64? I'm a little confused at this user who's comfortable defining a series of bytes but still needs a string interface. Maybe have a separate mode for non-ascii where it's input as hex bytes like "01 02 03 0a bb cd"? e: wait, RS232 or HDMI-CEC?
|
# ? Sep 5, 2014 21:21 |
|
b0lt posted:If scala is hopelessly broken, then we might as well give up programming, because everything else is worse. The person you're talking about is paulp, and he still uses scala because it's the least bad option. (see https://github.com/paulp/psp-std/) Oh, neat. That and https://github.com/paulp/policy actually give me hope again for the language. I love case classes and immutability-by-default.
|
# ? Sep 5, 2014 23:11 |
|
JawnV6 posted:Base64? I'm a little confused at this user who's comfortable defining a series of bytes but still needs a string interface. Maybe have a separate mode for non-ascii where it's input as hex bytes like "01 02 03 0a bb cd"? Either 232, TCP or a UDP packet. The user is an audio contractor. They can pull up the manuals for the products they install. Some ( like Sharp Aquos ) use nice user friendly strings like 'POWER' to turn the TV on. Other devices will say something like 'send the following bytes 0x00 0x21 0x31 0x11'. Our software has a single text box which allows the user to enter a 'command'. It's probably likely it's either ASCII or hex so maybe the mode makes the most sense. I was just curious if some other system ( like Crestron, AMX, other control systems ) have solved this in a more elegant manner.
|
# ? Sep 5, 2014 23:44 |
|
I'm building a web application and an API is asking for a "oauth callback url." Does that mean an oauth2 server under my control? Is pyoauth2 a good choice?
|
# ? Sep 6, 2014 18:10 |
|
JawnV6 posted:I'm building a web application and an API is asking for a "oauth callback url." Does that mean an oauth2 server under my control? Is pyoauth2 a good choice? I am probably out of my depth here but I thought the "callback url" was just how the API hits you back after the user authorizes something.
|
# ? Sep 6, 2014 21:54 |
|
pokeyman posted:I am probably out of my depth here but I thought the "callback url" was just how the API hits you back after the user authorizes something. Yeah, the oauth callback is how you get sent your credentials from the oauth provider. Those are how you'd link the account on your site to the oauth provider's account. When you set up the oauth on Google/FB/etc, you'll need to provide a whitelist of callback URLs to prevent some other site pretending to be you. The oauth frameworks should generally provide you with a way to create a server route that can receive and then do something with the oauth credentials, such as create/login to an account. Depends on the framework you're rolling with and the intent.
|
# ? Sep 6, 2014 22:23 |
|
JawnV6 posted:I'm building a web application and an API is asking for a "oauth callback url." Does that mean an oauth2 server under my control? Is pyoauth2 a good choice? It looks like in your case you're trying to oauth with another API (oauth consumer)? Looking briefly at the API pyoauth2 should allow for that.
|
# ? Sep 6, 2014 22:27 |
|
This might be a dumb question, but is it ever a good idea to store a date as a string in a database, instead of a datetime field? Was stuck on this form at work for a little bit, trying to figure out why searching for records wouldn't work when I found out the back-end team was expecting a date as YYYY-MM-DD string instead of what I was passing them
|
# ? Sep 8, 2014 19:44 |
|
Sab669 posted:This might be a dumb question, but is it ever a good idea to store a date as a string in a database, instead of a datetime field? Short answer: no Long answer: yes, but pretty much not in any normal use. At least in the BI world you sometimes use strings for dates/date components, but it's far from the typical use case. And in that case you're using a pre-populated date dimension table anyway.
|
# ? Sep 8, 2014 19:51 |
|
No Safe Word posted:Short answer: no It sounds like the developers didn't know how to either pull out a between date or pull out in order so they used a string to make it easy. That should be crossposted to the Code that makes you laugh or cry
|
# ? Sep 9, 2014 07:28 |
|
TheresaJayne posted:It sounds like the developers didn't know how to either pull out a between date or pull out in order so they used a string to make it easy. code:
|
# ? Sep 10, 2014 00:58 |
|
SQLite doesn't have a date/time data type.
|
# ? Sep 10, 2014 12:27 |
|
pliable posted:For some reason, Google reached out to me again for another interview even though they rejected me a few months ago. Cross posting this to get more exposure. Any help would be appreciated, thanks!
|
# ? Sep 11, 2014 03:49 |
|
Hope this is the right place to post this. I've got a bit of gap in my C.V. which is working against me in finding well paid IT work, I used to be a contractor using VB and SQL server (Oracle, Informix and Access too) since v3 and v7 respectively up to .NET and 2008. I think that getting MCSA's in VB and SQL server might be the way to go in compensating for my recent lack of work but all the courses look pretty expensive. Does anyone have any recomendations on books or web sites that I can use to study for the exams in VB and SQL server?
|
# ? Sep 11, 2014 12:14 |
|
I'm working on a depth-liimited search implementation of the 8-tile puzzle. However, when I learned DFS (and in everything I can find on the Internet), the assumption was made that we have an existing structure that we're searching. Here, I am creating the child nodes as I explore a given state. Am I just going about this wrong, or is there a way to do this?
|
# ? Sep 11, 2014 14:29 |
|
hooah posted:I'm working on a depth-liimited search implementation of the 8-tile puzzle. However, when I learned DFS (and in everything I can find on the Internet), the assumption was made that we have an existing structure that we're searching. Here, I am creating the child nodes as I explore a given state. Am I just going about this wrong, or is there a way to do this? Make something that generates "the next state" given sufficient inputs. Then you can use it to generate all the states in a loop, or you can effectively pause and restart it as you go.
|
# ? Sep 11, 2014 15:08 |
|
Vague question incoming... Programming is not in my job scope but I am enjoying figuring out how to write simple scripts that make my life easier at work. I'm thinking about tackling a bigger project. I want to create a web application within my work's intranet. It would be relatively simple to start off with. The user would have a choice to either "create a new form" or "edit existing form". If they wanted to "create a new form", then they would have a free text box where they could type what they wanted on the form, or maybe upload a pdf. If they wanted to "edit existing form" from a database of roughly 100 forms, they could select which form they want to edit. Then maybe print it off, and upload it back once they had handwritten the edits. My question is, looking at the big picture, I'm unsure what languages would be best to use for something like this. I've never created a website or webapp. I don't know if I should start reading up on javascript/jquery or maybe python/django or maybe if this app could just be done in html5. Could someone point me in the right direction to start reading?
|
# ? Sep 12, 2014 21:10 |
|
Hughmoris posted:Vague question incoming... Python/Django. If you don't know Python, you should start with Think Python and Learn Python the Hard Way. Then the official Django tutorial.
|
# ? Sep 12, 2014 22:12 |
|
|
# ? May 31, 2024 08:09 |
|
Right, random question concerning a little script I've been using in an Access database at work I've been tinkering with to make it a bit more efficient. Currently our staff enter new data via a form and I have this set up using the below script to automatically complete the "due date" field with a date 5 working days ahead of the current date, saving them from having to manually enter this date each time. code:
This then updates the value in the relevant form object using the default value "PlusWorkdays(Date(),5)" to give a date 5 working days ready populated in the form when they go to add a new record. However the problem I face is that due to our business process at 15:30 each day our due date needs to change to 6 working days from todays date rather than 5. I was wondering if there is a simple way I can modify the script to add an extra working day when the local time hits a specified point (15:30 in this case). Unfortunately this is a bit outside my abilities, which mostly run to stealing bits of code from websites and cobbling them together to make something semi functional. Thanks in advance for any suggestions.
|
# ? Sep 12, 2014 22:43 |