|
JawKnee posted:Does anyone know what re-sizing algorithm is used by StretchDIBits? I'm confused. If you're doing the resizing doesn't that mean you have the source pixel data?
|
# ? Oct 21, 2014 18:49 |
|
|
# ? May 18, 2024 03:33 |
|
omeg posted:I'm confused. If you're doing the resizing doesn't that mean you have the source pixel data? Yes, I have it in RAM, but not displayed until after resizing - I just need to know how stretchdibits is using the pixel data as I'm going to be performing some changes to the displayed pixels - but I'd rather set up the changes that I want to happen before the pixels are displayed (in essence before the stretch has happened). So, for example let's say I have a 500x500 image that I'm going to be resizing to 64x64 - I have the pixel data for the larger image in memory, but I want to know which pixel data is going to result from the stretchdibits call before it happens (I hope that makes sense). It seems like I might be able to explicitly set it using SetStrechBltMode, but I'd like to know what it uses by default.
|
# ? Oct 21, 2014 18:56 |
|
I have an .exe file (VB.Net, WinForms) that kicks off to a batch file. This app is on our network for everyone to access. The users who utilize it have no admin rights on the machines they use. A couple questions- When the .exe file is run the user gets two prompts asking if they want to procees, the first one is "Do you want to allow files from this website to run on your computer?" and the second one is "We can't verify who created this file.". When the batch file is kicked off the users gets another "We can't verify who created this file." prompt. I Googled around and from what I can tell the only way to suppress these prompts is 1) to become verified (expensive) and 2) to change settings on the individual PCs themselves, one by one. Neither of these things are feasible. Are those truly my only options?
|
# ? Oct 21, 2014 19:35 |
|
If your computers are on a domain, I think you can create your own certificate server that you can use to verify your stuff.
|
# ? Oct 21, 2014 19:50 |
Yes you can really always be your own CA and produce and sign your own code certificates, but Windows will only accept them if it has the root certificate installed. The easiest way to ensure that is to have every machine on a domain. If you have that, you can also apply group policy to mark the network location as "Local Intranet" zone, and set files in that zone to not be "tainted".
|
|
# ? Oct 21, 2014 19:57 |
|
We have a CA server but it's managed by Corp IT. Same with Group Policy. I asked about getting the directory added to the IE intranet zone and was told it's a PITA and I'd need to have a meeting with them to discuss the advantages... *sigh*. I was hoping there was something I could do in my code as a work-around. Thanks for the responses though. At least now I know what route I need to take.
|
# ? Oct 21, 2014 20:28 |
|
A quick (and maybe odd) question: A professor I have gives us psuedo-code done in Matlab for our assignments (which are c++), and he posted this little snippet which I'm having trouble interpreting: code:
|
# ? Oct 22, 2014 00:16 |
|
JawKnee posted:I get most of it, except for how the 'signal' array is being operated on in "signal = signal + im(row, col)*ss", im(row, col) is a single value, so is it being added to every entry in the array? Or is this just a slip-up and he's forgotten to add the array index? (I'm not overly familiar with Matlab). It's vectorized.
|
# ? Oct 22, 2014 00:32 |
|
so it seems to just be adding a scalar to a 1xN matrix then, cool.
|
# ? Oct 22, 2014 00:58 |
|
Here's a general question for anyone who cares to chime in: Do you name database tables as singular or plural, i.e. "Customer" or "Customers"? I used to do plural because that's what everyone seems to do, but at my work we use singular and ever since I got used to that it just seems so much better. My main argument is that whenever possible I want my entity classes, domain classes, etc. to have the same names as the corresponding database tables, and the classes should clearly be singular. I view the tables not so much as collections of objects as definitions of objects, so just like I wouldn't make a class called "Customers" in my code I wouldn't want a table with that name either, even though it makes the SQL statements read a bit better in some cases. I could see using plurals if somehow some tables were plural and others weren't, but clearly all tables are necessarily plural in nature, making the suffix redundant.
|
# ? Oct 22, 2014 15:22 |
|
The cardinality should show the plurality while each record is singular. So singular.
|
# ? Oct 22, 2014 16:10 |
|
Not quite a programming question but: is anyone aware of access to a stream of stock quotes that is free? It is just for playing around, so it doesn't have to be super up-to-date and may only have an update interval of every five minutes or so. On the other hand, while it is for playing around, I am done with EVE so I would really like it to be real world data.
|
# ? Oct 23, 2014 14:10 |
|
aerique posted:Not quite a programming question but: is anyone aware of access to a stream of stock quotes that is free? It is just for playing around, so it doesn't have to be super up-to-date and may only have an update interval of every five minutes or so. Yahoo Finance offers CSV quotes https://code.google.com/p/yahoo-finance-managed/wiki/YahooFinanceAPIs
|
# ? Oct 23, 2014 14:16 |
|
aerique posted:Not quite a programming question but: is anyone aware of access to a stream of stock quotes that is free? It is just for playing around, so it doesn't have to be super up-to-date and may only have an update interval of every five minutes or so. Anything interesting as I have access to real time quotes I have someone trying to get 180,000 updates per second (market close) working in a simple Java app with an API that maxes out at 100k.
|
# ? Oct 24, 2014 01:58 |
|
Can anyone shed light on why when I run my application and try to overwrite while copying a file it returns a unhandeled exception error? VB.Net Code: code:
|
# ? Oct 24, 2014 16:12 |
Begin by figuring out which exception it's throwing. When you know what the error is, avoiding it becomes infinitely easier.
|
|
# ? Oct 24, 2014 16:18 |
|
Oh right, sorry about that. The exception states that the file already exists, but I thought that's the whole point of the parameter "true" in File.Copy(FileCopy, FileCopied, True)
|
# ? Oct 24, 2014 16:46 |
|
TheEffect posted:Oh right, sorry about that. The exception states that the file already exists, but I thought that's the whole point of the parameter "true" in Make sure the file isn't locked. You could put a breakpoint on the File.Copy and try deleting the file yourself. Also, posting the exception would be helpful.
|
# ? Oct 24, 2014 16:53 |
|
I was trying to call another file copy, without the overwrite parameter, directly after. Didn't have my code nested right. Thanks for the help guys.
|
# ? Oct 24, 2014 17:45 |
|
Lately I've taken to giving a few kids small coding lessons here and there via request from their parents. So far it's just been a lot of messing around in the old non-studio version of Game Maker and me telling random funny stories of glitches gone horribly wrong. It's been alright so far, but I'm kind of running out of ideas. They're not in high school, haven't even learned Algebra in math class yet, so I'm worried if just picking a random topic and running with it will risk being too advanced for the moment. I thought Game Maker would be good for them because it's what I first used when I was their age, and it offers very immediate feedback. However, they're still using the drag-n'-drop and haven't really made the jump to trying GML code yet. My fear is they'll hit a plateau and not be able to advance much further because they're missing the underlying core concepts, like assigning variables and managing the control flow. The only other thing I can think of that might be easy enough would be writing HTML and some CSS, but I don't know how to make that exciting to them. Their attention spans are about 2 hours maximum before they reach for the nerf guns. I got into programming first at their age and I was completely self-taught from that point onwards, but that just means I never really had to explain myself before. Has anyone here taught programming stuff to a younger crowd? What are some effective techniques or topics? Is there anything out there that might make things easier? Morroque fucked around with this message at 23:18 on Oct 24, 2014 |
# ? Oct 24, 2014 23:12 |
|
I don't have any experience teaching younger people, but I was hooked on coding as soon as I realized I could make a simple program with interactive i/o. I didn't understand all the mechanics of the code, but my dad showed me how to use cin and cout and what variables were, and it gave me a concept of what software was like. There is a reasonable amount of things you can do with just basic input and output, and a few if statements. When I first started playing around with this stuff, I didn't know all the formatting rules or about data types or functions or anything, but I could copy and past what already worked. Python is a lot friendlier to get started with than c++, and it looks a lot less intimidating too, so you could always try walking them through "hello world" in python and see if any of them find it interesting.
|
# ? Oct 25, 2014 03:02 |
|
I am currently trying to teach my autistic brother programming. I got a sense board with my open uni course, like a raspberry pi... Aling stuff light up and stepper motor turn has been fun. It uses the programming language sense which is drag and drop which is cool.
|
# ? Oct 25, 2014 05:19 |
|
thegasman2000 posted:I am currently trying to teach my autistic brother programming. I got a sense board with my open uni course, like a raspberry pi... Aling stuff light up and stepper motor turn has been fun. It uses the programming language sense which is drag and drop which is cool. please dont stigmatize him further
|
# ? Oct 25, 2014 05:36 |
|
if he is hella into programming then i guess buy some 1980s books about cobol 80 or some poo poo idk
|
# ? Oct 25, 2014 05:36 |
|
Snapchat A Titty posted:please dont stigmatize him further Well he is really really into games and wants to make them one day... Also I mentioned he is autistic as it severely reduced the level I had to pitch in at compare to his age.
|
# ? Oct 25, 2014 09:20 |
|
I have no experience with autistic individuals, but if coding is something that grabs his focus then start with something for kids maybe? Just google the stuff, they've started creating mountain loads of material for "programming for kids." If this might be something like a "sevant" ability then simply giving him some books and showing him how to compile stuff might be enough. My suggestion, Lego Mindstorms, if you can get your hands on it.
|
# ? Oct 25, 2014 11:35 |
|
Kenishi posted:My suggestion, Lego Mindstorms, if you can get your hands on it. There's also Lego WeDo for the younger crowd. My eight year old daughter had an awesome time last week working with it for the first time.
|
# ? Oct 25, 2014 17:55 |
|
Is there any performance cost (however small) for declaring a method/class static? Memory cost maybe?
|
# ? Oct 26, 2014 22:23 |
|
In Java, static variables are allocated/filled when the class is loaded. So declaring methods static might add one more object to be initialized. But the way you're asking about static classes I doubt you mean Java.
|
# ? Oct 26, 2014 22:26 |
|
carry on then posted:In Java, static variables are allocated/filled when the class is loaded. So declaring methods static might add one more object to be initialized. But the way you're asking about static classes I doubt you mean Java. Yeah, which language we're talking about kind of matters here
|
# ? Oct 27, 2014 19:43 |
|
Static inner classes are a Java thing. They are the same as normal top level classes except have access to private members of the containing class when an instance is passed to a method or is assigned to a field. Without static, there is also a specific instance of the enclosing class associated with each instance of the inner class. It doesn't need to have an instance of the containing class as a field or parameter because there's a hidden reference to the instance used to construct it. Static inner classes have identical performance to top level classes. Non-static inner classes have an additional word of memory per instance and can prevent the constructing instance from being garbage collected which can increase memory pressure unintentionally.
|
# ? Oct 27, 2014 19:56 |
|
I'm using some discontinued hardware for a demo (read: no support for this). I need it to work on an arbitrary machine. There's a "pairing" step where two USB sticks are plugged into the PC at the same time. There's some information exchanged during that step, and the PC learns about the USB dongle it's looking for. Ideally, this demo proceeds without that "pairing" step on arbitrary hardware. So I need to mimic that pairing step without having the hardware present. There has to be some information stored, but I can't figure out where. du reports the same file sizes on the Program Files directory, so I don't think it's there. I poked at the registry and nothing jumped out. Where else can Windows stuff information like this?
|
# ? Oct 28, 2014 18:06 |
|
I'm a Python developer, and I just sat through the first of three days of ITIL Foundations training. What in the loving hell did I just listen to for 6 hours?
|
# ? Oct 28, 2014 23:19 |
|
JawnV6 posted:I'm using some discontinued hardware for a demo (read: no support for this). I need it to work on an arbitrary machine. There's a "pairing" step where two USB sticks are plugged into the PC at the same time. There's some information exchanged during that step, and the PC learns about the USB dongle it's looking for. Ideally, this demo proceeds without that "pairing" step on arbitrary hardware. So I need to mimic that pairing step without having the hardware present. Is this some sort of hardware DRM?
|
# ? Oct 28, 2014 23:35 |
|
JawnV6 posted:Where else can Windows stuff information like this?
|
# ? Oct 28, 2014 23:48 |
|
M.C. McMic posted:I'm a Python developer, and I just sat through the first of three days of ITIL Foundations training. What in the loving hell did I just listen to for 6 hours? I felt the same way. Pay attention to the last day and the review the most. Don't try to memorize or write down everything that is said. That was my mistake. I wrote almost as much notes as there was material in the book, and I ended up failing the test by one question.
|
# ? Oct 29, 2014 16:46 |
|
omeg posted:Is this some sort of hardware DRM? Sedro posted:Have you tried running Process Monitor?
|
# ? Oct 29, 2014 17:42 |
|
GrumpyDoctor posted:The link you posted doesn't deal with multi-word search targets. One way to do that involves building a state machine with each terminal state pointing to some comment text, but I don't know if either VBA or you are up to that task. You might also be able to use a trie, but again, this is possibly outside of your wheelhouse and probably outside of VBA's. (And neither of these solutions will be particularly maintainable unless you build in some initial step to convert a simple mapping list to your state machine or trie.) I asked this a long time ago and am now working on a solution, but I need some help with Open XML. I settled on an alternate hybrid approach where I will keep a queue of the last N words where N is the longest key in the dictionary, then each time I load a word also check each string that can be composed of the last 10, 9, ..., 2 words against the dictionary as well. I looked into tries as you suggested, but I don't think it has a huge advantage over a dictionary for this purpose and it didn't solve the problem of arbitrary key lengths, which is what I was struggling with. Anyway, crossposting this from the .NET thread because I think different folks occupy this thread: me posted:C#/OpenXML question. I need to parse through a docx file word-by-word. I'm re-writing someone's horrifying VBA macro that checks for certain common errors and forbidden terms in documents. Their solution used 11,000 lines of code to check for a grand total of 500 errors. It's just 500 repetitions of this:
|
# ? Oct 29, 2014 20:29 |
|
TheEffect posted:I felt the same way. Pay attention to the last day and the review the most. Don't try to memorize or write down everything that is said. That was my mistake. I wrote almost as much notes as there was material in the book, and I ended up failing the test by one question. Thanks. I'm not even sure whether or not my boss would care if I failed the exam. I think he realizes that it is in no way relevant to my job. Overall, this whole course sounds like a bunch of double-talk business bullshit. The primary purpose of which seems to be to create bureaucracy and roadblocks. I can't keep half of the terms straight because everything seems intentionally vague. On the other hand, I guess it's a free certification that I can put on my resume down the road. So, I can't complain too much.
|
# ? Oct 29, 2014 21:51 |
|
|
# ? May 18, 2024 03:33 |
|
Okay, I think I am an idiot for not just farming this out to someone that knows what they're doing but... I want to create a streaming service. Nothing revolutionary. But I think if my device is compatible with desktop and mobile devices and my approach to content producers is solid that there may be a niche for me in that realm. But I can't code for poo poo. I know HTML, not well, and C++... again not well. Is this too gargantuan and complicated a task for me to begin on my own and seek assistance with later? I need to shoot for the buffering, auto-resolution setting type features that ESPN3 uses as this would be live but slightly less lame than Twitch(only slightly though I am still a goon). Would starting this on my own just create problems for the people that I will almost certainly need to clean it up later or should I crack open some books and try and learn some Ruby or what the gently caress ever?
|
# ? Oct 30, 2014 08:50 |