|
Thanks for the suggestions. I'll certainly look into H2. I was concerned that doing database migrations might be overkill for my little toy project, but maybe not.
|
# ? Mar 18, 2013 07:19 |
|
|
# ? May 30, 2024 07:16 |
|
I've recently started working on some new projects at work, and I have some questions regarding it. For the last few years, since I graduated, I've mostly worked with SOA, database-stuff and testing. A few weeks ago I started a new project, where I'm doing much more Java programming, which I haven't really looked much at since university. This makes me struggle a whole lot with things that I feel shouldn't take a whole lot of time, and it makes me less productive that I should be. Can anyone recommend any books or websites that can be useful for quickly refreshing my Java knowledge, as well as give me a better understanding of Java in a "professional" setting?
|
# ? Mar 18, 2013 12:05 |
|
Maybe this is more appropriate in the web thread, but figure it has universal impact. How do you fix the Microsoft special character encodings and convert them to UTF-8? Are there any already made parsers out there that can do this? I'm aware of demoroniser, which is basically what I'm doing, but with character encodings. Bonus points if it can parse it to other character sets.
|
# ? Mar 18, 2013 14:58 |
|
Mr. Crow posted:Maybe this is more appropriate in the web thread, but figure it has universal impact. How do you fix the Microsoft special character encodings and convert them to UTF-8? Are there any already made parsers out there that can do this? I'm aware of demoroniser, which is basically what I'm doing, but with character encodings. What do you mean by "Microsoft special character encodings"? If you want to convert Windows-specific UTF-16 code pages (ANSI) into UTF-8, WideCharToMultiByte API does exactly that.
|
# ? Mar 18, 2013 15:09 |
|
Like the '...' character Word adds, the 'smart quotes' characters, the em/en-dash characters etc. Basically having problems with content/designers copy+pasting from word and then some characters are being garbled in the web page.
|
# ? Mar 18, 2013 15:21 |
|
Sjonkel posted:I've recently started working on some new projects at work, and I have some questions regarding it. For the last few years, since I graduated, I've mostly worked with SOA, database-stuff and testing. A few weeks ago I started a new project, where I'm doing much more Java programming, which I haven't really looked much at since university. This makes me struggle a whole lot with things that I feel shouldn't take a whole lot of time, and it makes me less productive that I should be. Can anyone recommend any books or websites that can be useful for quickly refreshing my Java knowledge, as well as give me a better understanding of Java in a "professional" setting? This really depends on what you mean by "doing Java". When I took a Java job after a long time in other languages, picking up the core Java syntax again wasn't a problem - learning J2EE, MVC, JSPs, Struts, and other surrounding technologies was the trick. If that's the situation you're in, I suggest focusing on that, and assuming that you'll pick the Java syntax back up as you go along. On the other hand, if you really just aren't sure how the whole class/object thing works, or haven't ever done much programming at all, I think pretty much any well regarded tutorial or intro book would be fine. I mostly taught myself Java at another job long ago by working through a textbook recommended by a co-worker. Of course, I had been programming for a while at that point, and just needed the new syntax and idioms. Sorry I haven't recommend specific things, but it really will vary depending on exactly what situation you're in. You might also ask your boss or coworkers for suggestions. It will let them know that you're struggling a little to get back up to speed, and also show them that you're taking the initiative in trying to remedy that.
|
# ? Mar 18, 2013 15:42 |
|
Mr. Crow posted:Like the '...' character Word adds, the 'smart quotes' characters, the em/en-dash characters etc. Basically having problems with content/designers copy+pasting from word and then some characters are being garbled in the web page. Trying to fix corrupted data after the fact is nearly always the wrong approach.
|
# ? Mar 18, 2013 16:03 |
|
GrumpyDoctor posted:Thanks for the suggestions. I'll certainly look into H2. I was concerned that doing database migrations might be overkill for my little toy project, but maybe not. Or take just the idea and run with it. Could be as simple as a "version" table with a single integer in a single row, and a numbered list of SQL statements.
|
# ? Mar 18, 2013 16:04 |
|
Mr. Crow posted:Like the '...' character Word adds, the 'smart quotes' characters, the em/en-dash characters etc. , , and are all in my Unicode. Maybe you need a better Unicode.
|
# ? Mar 18, 2013 19:55 |
|
Mr. Crow posted:Like the '...' character Word adds, the 'smart quotes' characters, the em/en-dash characters etc. Basically having problems with content/designers copy+pasting from word and then some characters are being garbled in the web page. Set a meta tag that explicitly flags the page as UTF-8. Probably set the headers, too. The garbled 'word' encoding happens because of improper encoding guessing, or something like that. I used to have a link to reference that problem and its solution, but I don't have access to it atm as I'm not on my laptop. Check stackoverflow?
|
# ? Mar 18, 2013 21:32 |
|
I was daydreaming the other day and I came up with a date storage method based on HEX. code:
|
# ? Mar 18, 2013 21:35 |
|
Bruce Hussein Daddy posted:I was daydreaming the other day and I came up with a date storage method based on HEX. Nope. More compact to just calculate seconds from 1970, and forget human-readable storage formats because time is complex as gently caress, and human-readable dates are basically complicated enough to be more reasonable for display than for (inexact or occasionally unclear) storage. It also means that as long as you have a number type big enough to store the seconds from 1970, you can store the date. 64 bits should be enough for a looooooooooong time.
|
# ? Mar 18, 2013 21:44 |
|
Yeah, I figured so. Otherwise someone would have done it already.
|
# ? Mar 18, 2013 21:45 |
|
Bruce Hussein Daddy posted:Yeah, I figured so. Otherwise someone would have done it already. Yeah. There's really no other way IMO to have an exact date - given leap years, leap seconds,and time zones, anything other than an exact number of seconds since a reference date is a display format, since it's not an absolute date until you have total and complete knowledge of the conditions in which the time was recorded. Like, which 1:30 AM are you talking about when the hour leaps backwards? How many hours between midnight and 3am when the time leaps forwards? Look at the tzdata data and you'll see some of the complexities.
|
# ? Mar 18, 2013 21:49 |
Doctor w-rw-rw- posted:Nope. More compact to just calculate seconds from 1970, and forget human-readable storage formats because time is complex as gently caress, and human-readable dates are basically complicated enough to be more reasonable for display than for (inexact or occasionally unclear) storage. It also means that as long as you have a number type big enough to store the seconds from 1970, you can store the date. 64 bits should be enough for a looooooooooong time. Or if you really only need to store the date and not the time, store a number of days since some epoch. (Then 16 bit gives you just short of 180 years range, and 32 bit is practically infinite.)
|
|
# ? Mar 18, 2013 22:05 |
|
nielsm posted:Or if you really only need to store the date and not the time, store a number of days since some epoch. (Then 16 bit gives you just short of 180 years range, and 32 bit is practically infinite.) But I bet you'd still have to convert to seconds anyways, since most of the code handling fun date intervals probably deal with seconds and not complete days. At least that's the impression that the APIs give me.
|
# ? Mar 18, 2013 22:55 |
|
Quick, convert February 12th, 2013 from UTC to EST.
|
# ? Mar 18, 2013 22:59 |
|
Zhentar posted:Quick, convert February 12th, 2013 from UTC to EST. Why?
|
# ? Mar 19, 2013 00:09 |
|
pokeyman posted:Why? I think his point is that the date of an event in one time zone might not be the same as in another, so storing only the day and not the hour could cause issues. Or did you get that and you think the issues aren't important? HappyHippo fucked around with this message at 03:25 on Mar 19, 2013 |
# ? Mar 19, 2013 01:59 |
|
I thought Zhentar was pointing to some kind of perfect storm for date conversion. Like maybe February 12, 2013 EST was a simultaneous Daylight Saving Time switch, leap second, 31-bit overflow, Julian new year, and floating-point rounding issue.
|
# ? Mar 19, 2013 05:11 |
|
pokeyman posted:I thought Zhentar was pointing to some kind of perfect storm for date conversion. Like maybe February 12, 2013 EST was a simultaneous Daylight Saving Time switch, leap second, 31-bit overflow, Julian new year, and floating-point rounding issue. If you wanted one of those, just look at a February 29th that existed in some parts of the world but not others.
|
# ? Mar 19, 2013 05:17 |
|
I'm trying to figure out how to write a script that will use robocopy to mirror a networked hard drive to another hard drive on our office server. I know the basic syntax (ROBOCOPY source-drive:\DIR destination-drive:\DIR /MIR) but I have no idea how I would go about making it run automatically every night at 8pm. I have no coding experience whatsoever.
|
# ? Mar 19, 2013 15:21 |
|
Task Scheduler. There's a UI if you're just setting it up once, or if you need to do it in a batch script (e.g. for multiple machines) use schtasks /create.
|
# ? Mar 19, 2013 15:32 |
|
Jabor posted:If you wanted one of those, just look at a February 29th that existed in some parts of the world but not others. This one is blowing my mind, when does it happen?
|
# ? Mar 19, 2013 15:59 |
|
Rottbott posted:Task Scheduler. There's a UI if you're just setting it up once, or if you need to do it in a batch script (e.g. for multiple machines) use schtasks /create. From doing a little more research I've found that creating a file in notepad and saving it as a .bat file and then setting that to run everyday at 8pm through task scheduler will get the job done. Here is the code I intend to put in the file: code:
I've already backed up all the files on the source drive to the destination drive so hopefully it will only have to mirror a couple of files that changed during the day. The source timestamps on the files and folders don't currently match the timestamps on the destination files and folders (which all show today). Is that going to create issues and cause it to backup everything tonight? Lastly, I included the DCOPY:T command so it will mirror the timestamps but I'm not exactly sure if that's what that command does. Smoking_Dragon fucked around with this message at 16:59 on Mar 19, 2013 |
# ? Mar 19, 2013 16:15 |
|
Smoking_Dragon posted:From doing a little more research I've found that creating a file in notepad and saving it as a .bat file and then setting that to run everyday at 8pm through task scheduler will get the job done. When I try to run the .bat file that I created with this it just prints out the commands over and over in a command prompt without actually executing them, can anyone help? EDIT: This seems to be a problem with it not being run as an adminstrator. It works fine if I right click and select "run as an administrator" in Windows 7. However, on the Windows XP laptop, which will be the one actually running the script, there isn't a "run as administrator" option (I am signed in as an administrator) and the .bat file won't excute properly. I'm also getting this error when I try to run the robocopy script through the .bat file: However, when I open a command window and input the exact same robocopy code it works just fine, what am I doing wrong?? Smoking_Dragon fucked around with this message at 20:01 on Mar 19, 2013 |
# ? Mar 19, 2013 18:21 |
|
Gounads posted:This one is blowing my mind, when does it happen? That time is past, but it's when the Julian to Gregorian switchover was still going on. Sweden is probably one of the best (most pathological) examples: They decided at first they were going to switch over the course of 40 years, skipped one leap day and then decided to go back. Solution? Add another leap day in 1712, meaning February had 30 days that year. Then in 1753 they just took the plunge and had a 17 day February. This put them in sync with Great Britain and its colonies which switched by chopping out a few days from September the previous year. code:
|
# ? Mar 20, 2013 02:46 |
|
Zhentar posted:Quick, convert February 12th, 2013 from UTC to EST. No known time part means no valid TZ conversion is possible. I deal with this frequently at work - a type of metadata is entered by users as just a date, stored as a DATETIME with a time component of 00:00:00, and it's a common bug to see this value being mistakenly interpreted as UTC and converted to local time for display when in fact there is no time information at all. It should be as February 12 2013 no matter where it's used but dates are hard man. Twitter a few days ago posted:csammis: Lately whenever I've heard the words "date" or "time" uttered by a software engineer it's been followed by this:
|
# ? Mar 20, 2013 04:40 |
|
So my company still uses Visual FoxPro... We're working on some new big system for a customer who has a ton of poo poo in Access, and I need to rip all that data out and throw it into VFP tables. I primarily develop for C# and am very unfamiliar with both VFP and Access. To my understanding, it's not possible to do a simple "Import Wizard" or anything to pull from Access. I was able to set set up a little environment in .NET to interface with the VFP tables, I was wondering if there's some way to automatically run through 2 of the Access tables and throw all of its contents into 1 VFP table? Best part is, the VFP table and Access ones don't have the same structure, so I'll just be looping through looking for certain column names looking for a few 'key' columns in each table.
|
# ? Mar 20, 2013 14:30 |
|
I remember driving myself insane when I was fresh out of college. Adding 24 hours to increment a date field. And for one certain day, it wasn't working. I even went so far as to file a bug! Turned out to be the day to switch over daylight savings.
|
# ? Mar 20, 2013 14:50 |
|
csammis posted:It should be as February 12 2013 no matter where it's used but dates are hard man. Nope Gounads posted:This one is blowing my mind, when does it happen? Samoa and Tokelau skipped 30 December 2011.
|
# ? Mar 20, 2013 15:16 |
|
Not exactly a programming question, but how do people go about getting their head around large open source projects? Is there an IDE that can help me somehow? It's a little difficult when I just want to find out where a function is called from, or where a function/variable/constant is declared/defined and it seems like the only way is to either debug it and look at the call stack in gdb, or to open every single #include and 'find in all open files'
|
# ? Mar 21, 2013 17:46 |
|
I use grep. Well actually I use ack. Except when I use ag. Which is always. So I suggest getting The Silver Searcher.
|
# ? Mar 21, 2013 18:39 |
|
I switch it up, but generally I just use ack and XCode's builtin search.
|
# ? Mar 21, 2013 19:35 |
|
Illusive gently caress Man posted:Is there an IDE that can help me somehow? Any IDE worth using has a 'Go To Definition' action that will (usually) take you right to the appropriate place. Visual Studio and XCode have this; I assume plenty of others do as well.
|
# ? Mar 21, 2013 20:23 |
|
Even customizable editors that aren't strictly IDEs like Vim have stuff like this as addon scripts if you choose to go down that route. Also, if there's any reasonable documentation you should possibly pull that offline if you're referring to it heavily, so you can browse through it quickly.
|
# ? Mar 21, 2013 22:43 |
|
Illusive gently caress Man posted:Not exactly a programming question, but how do people go about getting their head around large open source projects? Is there an IDE that can help me somehow? It's a little difficult when I just want to find out where a function is called from, or where a function/variable/constant is declared/defined and it seems like the only way is to either debug it and look at the call stack in gdb, or to open every single #include and 'find in all open files' I'd suggest checking out a a quick cscope howto.
|
# ? Mar 23, 2013 20:03 |
|
What the gently caress is Spring MVC? A friend and I are making a new website for our school organization, and she is all "ok well I'll put it on git and I want to use spring mvc and etc etc," and even after reading some of the wiki and some tutorials, I still have no idea what the gently caress it is or does. I have some knowledge of java, databases, and web programming.. nothing beyond some college classes. Can someone explain it to me as if I were an idiot, or point me to a website that may do so? Thanks in advance.
|
# ? Mar 25, 2013 14:52 |
|
Does anyone have experience with NI LabVIEW? I have to make a serial driver for a thermometer and really have no clue what the gently caress I'm doing.
|
# ? Mar 25, 2013 15:05 |
|
|
# ? May 30, 2024 07:16 |
|
Turkeybone posted:What the gently caress is Spring MVC? A friend and I are making a new website for our school organization, and she is all "ok well I'll put it on git and I want to use spring mvc and etc etc," and even after reading some of the wiki and some tutorials, I still have no idea what the gently caress it is or does. I have some knowledge of java, databases, and web programming.. nothing beyond some college classes. Spring MVC is one package of the Spring Java framework. By itself it doesn't really do much, but it has classes laid out in a structure that is intended to make it easier for you to design an MVC based web site/service by using, extending, and/or implementing their code structure with your own code.
|
# ? Mar 25, 2013 15:09 |