|
I am not sure if anybody is well versed in the WinAPI here or not, but I have scoured the internet in search of an answer to my question and have gotten nowhere. I am writing an application using the WinAPI and I would like to enable Windows 7 visual styles. The problem is that when I do this all of the controls are surounded by a gray border than I cannot remove. I would like to make it transparent or be able to set it to my background color but have found no what to do so. If I disable the windows 7 styling I can change it using the WM_CTLCOLORSTATIC message but then my program looks like it was written 10 years ago. Can anybody help me or at least point me somewhere that could? Here is an example of what I am dealing with: http://www.use.com/cbd5224efb7a5af755c8 KUBaNPhillipay fucked around with this message at 06:14 on Jun 10, 2012 |
# ? Jun 10, 2012 06:05 |
|
|
# ? Jun 8, 2024 18:11 |
|
Have you tried responding to WM_CTLCOLORBTN? edit: oh, wait, it looks like that's for the text color, not the control color... Apparently you just have to owner draw it?
|
# ? Jun 10, 2012 06:29 |
|
That's what I was afraid of. I would really like to match the operating system theme that the program is running on however. So if it's xp it would give it an xp look or whatever. Is there a way to use owner draw to match the theme of the operating system?
|
# ? Jun 10, 2012 14:30 |
KUBaNPhillipay posted:That's what I was afraid of. I would really like to match the operating system theme that the program is running on however. So if it's xp it would give it an xp look or whatever. Yeah, set the BS_OWNERDRAW style on the controls and respond to WM_DRAWITEM in the parent, then use the UX theme functions to draw the parts that need theming. Remember that you actually need to handle painting differently based on whether theming is enabled or not. You may simply want to remove the BS_OWNERDRAW style when theming is disabled and use the simpler method to get Windows to draw the controls correctly.
|
|
# ? Jun 10, 2012 17:08 |
|
I'm looking to do some integration testing for a C# project. I want to be able to write a simple parameterized test, and then provide it with a (long) list of inputs and the expected output for each. I know when I was looking into testing frameworks in previously, I saw some with support for this, but now I'm failing to find it again (probably because I don't know the right name for it). What is it called? What does support this well? I'm also interested in any fuzz testing tools as well, if there are any suggestions there.
|
# ? Jun 10, 2012 21:42 |
|
When you have a website that requires login with username and password, what's the correct way to defeat repeated attempts to log in to an account by trying different passwords? You could lock a user's account for a fixed amount of time when a certain number of failed attempts have been made to log in - say when 3 failed attempts have been made within 15 minutes. But if you do this then one user could grief another by getting them locked out of their account. Alternatively, you could lock out users from a particular IP address from logging in if a certain number of failed attempts are made from that IP address. But a knowledgeable user can acquire a different IP address and carry on, so this wouldn't stop an attacker, would it? Or am I mistaken in thinking that users can rapidly change IP addresses? I guess that if several attempts were made to log in to a particular account from IP addresses not previously associated with that account, you could lock it down except for allowing logins from the IP addresses that have been used to successfully log in in the past. But some users might have frequently changing IP addresses through no fault of their own and then they would be out of luck. How do sites generally deal with this?
|
# ? Jun 11, 2012 01:16 |
|
Does anybody have any experience with fixing compatibility issues? I don't know how to program but I am working on an Excel spreadsheet that will open .pdf files on my company's intranet and take them to a specific page. I have a code that works on most of the firm's computers (Excel 2003 SP3 with Windows XP. code:
|
# ? Jun 11, 2012 01:39 |
|
Hammerite posted:When you have a website that requires login with username and password, what's the correct way to defeat repeated attempts to log in to an account by trying different passwords? I do a 5 attempt thing. After that I display a message that they've been locked out for 5 minutes and send an auto generated email telling them about it. Haven't heard any gripes about it yet. Or use maybe use BrowserID?
|
# ? Jun 11, 2012 08:17 |
Hammerite posted:When you have a website that requires login with username and password, what's the correct way to defeat repeated attempts to log in to an account by trying different passwords? I would suggest keeping a "failed login attempts" log. It could be an SQL table with userid, time of attempt and IP address (remember IPv6 exists!) of attempt. When someone wants to try to log in, if they have more than e.g. 3 entries from the past 20 minutes in that table they automatically fail. You may want to have some policy on clearing out old data from the log. If you send an email warning about the failed login, be sure to not unintentionally spam the user.
|
|
# ? Jun 11, 2012 11:06 |
|
Anyone have any suggestions for websites with some guided practice for a complete programming beginner? I've been going through codecademy, but some concepts aren't explained very well and I've always thought it's better to learn from several different sources. Not to mention there's usually only 1 or 2 exercises per concept. Any other beginner-friendly practice you would recommend?
|
# ? Jun 12, 2012 02:59 |
|
It kinda varies by language, most languages have good tutorials somewhere. I can't really speak directly to any beginner tutorials since I learned my first couple languages in school, but some quick googling should turn up a few. I think python is probably a good language to start with.
|
# ? Jun 12, 2012 03:39 |
|
Salis posted:Anyone have any suggestions for websites with some guided practice for a complete programming beginner? I've been going through codecademy, but some concepts aren't explained very well and I've always thought it's better to learn from several different sources. Not to mention there's usually only 1 or 2 exercises per concept. Any other beginner-friendly practice you would recommend? http://learnpythonthehardway.org/ http://thinkpython.com/
|
# ? Jun 12, 2012 03:40 |
|
Salis posted:Anyone have any suggestions for websites with some guided practice for a complete programming beginner? I've been going through codecademy, but some concepts aren't explained very well and I've always thought it's better to learn from several different sources. Not to mention there's usually only 1 or 2 exercises per concept. Any other beginner-friendly practice you would recommend? 4clojure is supposed to be fairly decent.
|
# ? Jun 12, 2012 05:55 |
|
Look Around You posted:4clojure is supposed to be fairly decent. Use this one. It teaches you a language that is actually good, rather than just popular.
|
# ? Jun 12, 2012 06:43 |
|
Sinestro posted:Use this one. It teaches you a language that is actually good, rather than just popular. Beware of the side-effects of learning lisp. It makes you a smug rear end in a top hat.
|
# ? Jun 12, 2012 11:57 |
|
tef posted:Beware of the side-effects of learning lisp. It makes you a smug rear end in a top hat. I thought functional languages didn't have those?
|
# ? Jun 12, 2012 18:13 |
|
nielsm posted:I would suggest keeping a "failed login attempts" log. It could be an SQL table with userid, time of attempt and IP address (remember IPv6 exists!) of attempt. Note that you should also avoid logging attempts to log in for user ids that don't exist, because it's a common mistake to type a username + password together as the password, and you don't want to compound that mistake by writing it down in your log forever.
|
# ? Jun 12, 2012 18:42 |
|
So I've been having to debug some IDL code lately, an it's been a good 10 years since I even had to look at this. What is it with physicists and insisting on using languages like FORTRAN and IDL? Seriously. Anyway, does anyone else use IDL? Would it be worth starting a thread up about? I figured this would be the place to ask.
|
# ? Jun 12, 2012 19:10 |
|
Thanks for all the different links! Would basic online resources and cheap educational materials like books be enough for me to pick up programming as a hobby? (such as making small games or apps or basic web design) Would I eventually need to take some courses? Regardless I've got enough material now to cover to last me for a while. Thanks again for the links.
|
# ? Jun 12, 2012 21:54 |
|
Salis posted:Would basic online resources and cheap educational materials like books be enough for me to pick up programming as a hobby? (such as making small games or apps or basic web design) If you combine it with not being afraid to ask for help when you get stuck, it's more than enough. quote:Would I eventually need to take some courses? No.
|
# ? Jun 12, 2012 22:05 |
|
Salis posted:Thanks for all the different links! Would basic online resources and cheap educational materials like books be enough for me to pick up programming as a hobby? (such as making small games or apps or basic web design) Would I eventually need to take some courses? That's exactly how I learned. You can even take it further than pure hobby status if you wanted to. I'm pretty sure I could get a programming job if I tried. I've contributed to a handful of open source projects, released some Android apps, and released some open source stuff of my own.
|
# ? Jun 12, 2012 23:00 |
|
I've been hired to try and get a list on a website of unionized business in my area. The downside is that they want something they can update from time to time (approximately every year), and the Excel spreadsheet they want to use is 17000+ lines long. I've got some limited experience coding in PHP (and have a friend to help if I get stuck), but finding a tutorial on how to grab excel spreadsheet values and plugging them into a framework is eluding me. So to give you an idea of what I'm doing - I want to design a PHP script to display the business by their NAICS workplace designation (which is just a set of seven numbers) and then take three or four cells of information and plug it into the framework dynamically based on which category the user selects. After that it's just a matter of writing another script sending them to the local yellow pages to get the number. What would I look at to do this? The stuff I've found suggests converting files to .CSV first. Any help would be vastly appreciated. edit: I might have found a really basic version here: http://www.ibm.com/developerworks/opensource/library/os-phpexcel/ There's nothing more to the information than that, really. edit2: other than sorting them by their code so only the apparel manufacturers show up, for example Kafka Esq. fucked around with this message at 14:45 on Jun 13, 2012 |
# ? Jun 13, 2012 14:38 |
|
http://lua-users.org/wiki/UnitTesting Is there a general consensus on the best unit testing framework for Lua? I got the above link from Google but I'm not as familiar with Lua so I'd be pulling out of a hat pretty much.
|
# ? Jun 13, 2012 15:02 |
|
Kafka Esq. posted:So to give you an idea of what I'm doing - I want to design a PHP script to display the business by their NAICS workplace designation (which is just a set of seven numbers) and then take three or four cells of information and plug it into the framework dynamically based on which category the user selects. After that it's just a matter of writing another script sending them to the local yellow pages to get the number. What would I look at to do this? The stuff I've found suggests converting files to .CSV first. Any help would be vastly appreciated. Run far far away from any attempts to pull directly from Excel. You'll easily spend 90% of your time working on that. Instead, dump the file to a CSV. From there, you can use PHPs builtins for parsing CSV files to loop over each entry, pull out the columns you need, and putting them in... some database, I guess. It sounds like from there you have the ability to make a frontend to that database.
|
# ? Jun 13, 2012 15:45 |
|
Database structure question (mysql/php, not my choice): How would I store a username and a set of data for that username (more specifically points), and get data like point change per day? Input is cumulative (day1 = 5, day2 = 11, not day1 = 5, day2 = 6). Might be a dumb question but having a brainfart
|
# ? Jun 13, 2012 19:36 |
|
Kim Jong III posted:Run far far away from any attempts to pull directly from Excel. You'll easily spend 90% of your time working on that. Instead, dump the file to a CSV. From there, you can use PHPs builtins for parsing CSV files to loop over each entry, pull out the columns you need, and putting them in... some database, I guess. I used to have to pull data from an Excel spreadsheet into PHP (I've forgotten what the library was unfortunately) and there was nothing difficult about it. Granted I only had real values to worry about instead of functions but I'm guessing Kafka doesn't have to worry about that either. I would have a small database like sqlite and dump whatever you need into it. Since it is only 17000 rows I can't imagine any problems with just using sqlite. Then I would have a cron that checks the CRC32 of the file and whenever it changes, reread the entire file and update any rows accordingly. Edit: I'm pretty sure the one on the IBM website is the same library I used. Strong Sauce fucked around with this message at 21:20 on Jun 13, 2012 |
# ? Jun 13, 2012 21:16 |
|
Biowarfare posted:Database structure question (mysql/php, not my choice): Assuming you're storing other data than just the points, I'd have thought the best way to do this would be to create a USER_POINTS table with the user ID from your USERS table as a foreign key, something like: code:
code:
rolleyes fucked around with this message at 09:23 on Jun 14, 2012 |
# ? Jun 14, 2012 00:43 |
|
Strong Sauce posted:I used to have to pull data from an Excel spreadsheet into PHP (I've forgotten what the library was unfortunately) and there was nothing difficult about it. Granted I only had real values to worry about instead of functions but I'm guessing Kafka doesn't have to worry about that either. Oh, cool, I forgot newer versions of Excel support XML output. When I tried this before the design involved using libraries to parse the older Excel binary workbooks, which really freaking sucked and never came close to working. I'd still say that parsing a CSV is way easier than mucking around with the DOM, but that's personal preference.
|
# ? Jun 14, 2012 01:32 |
|
I hope this is the right place for this question. I'm trying to use VLC to output frames of a video file. I figured out how to launch VLC from terminal and I think I got the commands right, but for some reason when it exports all the image files, only the first one comes through and the rest are 0kb. Here's the string I'm executing: code:
code:
|
# ? Jun 14, 2012 05:33 |
|
JawnV6 posted:I thought functional languages didn't have those? It actually creates a new copy of you who's a smug rear end in a top hat, and then lets the old one get GCed. Alternate joke: no, there's plenty of smug assholes in functional programming.
|
# ? Jun 14, 2012 05:39 |
|
yaoi prophet posted:It actually creates a new copy of you who's a smug rear end in a top hat, and then lets the old one get GCed. it was a good joke either way, plus clearly true re: smug rear end in a top hat, given sinestro. I learned Haskell when I was in school and really liked it, but haven't had a good reason/motivation (I'm really bad at motivation) to go back to it or any other functional language since. Kinda want one though.
|
# ? Jun 14, 2012 06:48 |
|
"Functional" doesn't imply pure.
|
# ? Jun 14, 2012 06:49 |
|
Is this the right thread to ask this sort of question...? System architecture is a close enough fit I guess. How would you design a cloud architecture? Assuming AWS or equivalent, let's say I needed web servers, databases, and bursts of I/O-bound or CPU-bound asynchronous tasks on demand. I'd want monitoring, logging (the sort you might want to run analytics on), and the ability to spin up or spin down to accomodate load as necessary. What are some of the tools I can do to achieve this? Techniques? I was thinking of Nagios for monitoring, and scribe or plain ol' syslog for logging. tl;dr what is your dream architecture, if you had to build it on the cloud? I plan to apply the suggestions to practical use in an upcoming project at work.
|
# ? Jun 14, 2012 07:04 |
|
Ronald Raiden posted:it was a good joke either way, plus clearly true re: smug rear end in a top hat, given sinestro. Write a webapp in it! Haskell's not a bad fit since you can use the static typesystem to enforce all kinds of interesting things (Yesod has compile-time-checked templates and routing so if you do it right you literally cannot create URLs that aren't handled by some route).
|
# ? Jun 14, 2012 07:11 |
|
I got a question... I'm building an API for a product and had a !!brilliant idea!!. Basically, if the user opts-in and provides a Google Analytics token, when the API enpoint is invoked it'll push a tracking/pageview off to GA. First: Is this a useful feature (product is a SaaS offering targeted at fellow developers)? Second: Since I have to do this server-side, I'm thinking of making a basic queue that contains the data of the API endpoint and the time it was hit. A background task will read this queue and use a modified version of this gist. Seems like a simple approach, right?
|
# ? Jun 14, 2012 08:09 |
|
Strong Sauce posted:I used to have to pull data from an Excel spreadsheet into PHP (I've forgotten what the library was unfortunately) and there was nothing difficult about it. Granted I only had real values to worry about instead of functions but I'm guessing Kafka doesn't have to worry about that either. ninjaedit: yes, real values such as basic character names, locations, and a few numbers. I'm hunting for something that doesn't use mySQL now.
|
# ? Jun 15, 2012 15:29 |
|
a year of low-volume mysql hosting should not cost more than an hour of your time
|
# ? Jun 15, 2012 16:49 |
|
My time is worth basically nothing - it's a sponsored internship. edit: probably just going to use sqlite
|
# ? Jun 15, 2012 17:25 |
|
Kafka Esq. posted:My time is worth basically nothing - it's a sponsored internship. Huh? Software developer internships usually pay $15-$25 an hour.
|
# ? Jun 15, 2012 23:35 |
|
|
# ? Jun 8, 2024 18:11 |
|
Otto Skorzeny posted:Huh? Software developer internships usually pay $15-$25 an hour. Or course credit.
|
# ? Jun 15, 2012 23:42 |