|
Fisticuffs posted:Okay, I think I am an idiot for not just farming this out to someone that knows what they're doing but... This is a pretty tall order but not insurmountable. My question is why not use the cornucopia of existing software out there for this? What is special to your implementation that no one else has?
|
# ? Oct 30, 2014 12:25 |
|
|
# ? May 18, 2024 06:17 |
|
LeftistMuslimObama posted: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. After thinking on this some more, would it even be that bad to go paragraph-by-paragraph? I can convert the paragraph in to an array of strings by using " " as a delimiter. Then instead of needing to maintain a separate queue structure, I can just roll through the paragraph, looking ahead the requisite number of words to find my longer phrases. At the end I can just apply the comment to the whole paragraph (which appears to be much easier than trying to define a range beneath the <p> level), which also reduces the amount of visual clutter in the document. Any criticism for this approach? Eventually, I want to update this tool to be able to check paragraphs against regular expressions instead of just string literals. This'll enable me to check for more complicated structural issues and also be able to just check the entire paragraph against, for example, (.*(display|display).*). Then I'm not even parsing word-by-word. It'll just be that if the paragraph matches a given regex, the associated comment gets appended to the comment for the paragraph. I'm just not doing this part right now because I have to achieve identical function to the old macro before I can do enhancements
|
# ? Oct 30, 2014 15:07 |
|
Volmarias posted:This is a pretty tall order but not insurmountable. My question is why not use the cornucopia of existing software out there for this? What is special to your implementation that no one else has? As far as I understand it using freeware, shareware, or open source and monetizing it is frowned upon, illegal, or may open me up to profit sharing that I'm not into? I'm not a lawyer either but I feel like that is typically the case. Let me know if you have a deeper understanding because that would be good news. I think the platform needs to be proprietary because I think that is the most fruitful way to pursue a low profit-margin model, which may be necessary in the early stages and maybe for the duration if I can't build a "subscriber" base. I just feel like using someone else's platform or base or whatever might add an insurmountable cost for me, as I don't have a ton of capital to play around with. If that's a wrongheaded assumption though please do fill me in.
|
# ? Oct 30, 2014 15:34 |
Fisticuffs posted:As far as I understand it using freeware, shareware, or open source and monetizing it is frowned upon, illegal, or may open me up to profit sharing that I'm not into? I'm not a lawyer either but I feel like that is typically the case. Let me know if you have a deeper understanding because that would be good news. All depends on the license. A lot of open source stuff doesn't give a gently caress and I don't think there's a general "frowned upon" feeling. Your job is going to be more or less tying all the pieces together.
|
|
# ? Oct 30, 2014 16:32 |
Fisticuffs posted:As far as I understand it using freeware, shareware, or open source and monetizing it is frowned upon, illegal, or may open me up to profit sharing that I'm not into? One of the common requirements for categorizing a software license as "open source" is that there are no restrictions on usage. Basically, you may use the software for any purpose as long as you hold the authors free of liability. Look for the words "may be used for any purpose" in the license text. The only things to potentially watch out for are licenses like the AGPL which requires you to offer all customizations you make to all end users, even if they use it indirectly through a web service or similar. It still has no demands for payment to anyone. The downside of basing a business on open source software is that quality support might be harder to come by, depending on the software.
|
|
# ? Oct 30, 2014 16:35 |
|
LeftistMuslimObama posted:After thinking on this some more, would it even be that bad to go paragraph-by-paragraph? I can convert the paragraph in to an array of strings by using " " as a delimiter. Then instead of needing to maintain a separate queue structure, I can just roll through the paragraph, looking ahead the requisite number of words to find my longer phrases. At the end I can just apply the comment to the whole paragraph (which appears to be much easier than trying to define a range beneath the <p> level), which also reduces the amount of visual clutter in the document. That seems reasonable. In the eventual future (if you get away from VBA) you may even be able to parallelize it, which could get you a pretty decent speedup.
|
# ? Oct 30, 2014 16:44 |
|
nielsm posted:One of the common requirements for categorizing a software license as "open source" is that there are no restrictions on usage. Basically, you may use the software for any purpose as long as you hold the authors free of liability. Look for the words "may be used for any purpose" in the license text. Cool, then I will definitely look into customizing someone else's base into something that can hopefully offer similar quality to ESPN3. Thanks for this info this is really awesome. Do you know of any open source databases, search engines or basically some site that'll help me locate these programs and start vetting them for my needs or looking into how customize-able they are? Thanks again for the help everyone!
|
# ? Oct 30, 2014 17:03 |
|
GrumpyDoctor posted:That seems reasonable. In the eventual future (if you get away from VBA) you may even be able to parallelize it, which could get you a pretty decent speedup. I am 100% away from VBA. I'm doing it in VC#. I've never done parallel programming, but it might be fun to learn for this project. I will do some googling.
|
# ? Oct 30, 2014 18:24 |
|
I'm trying to add a shortcut to be deployed with my Click Once application. The problem is that whenever I add it as a resource Visual Stupid adds the file it POINTS to instead of the actual shortcut to the file. Is there any way around this? I've Googled around to no avail but I might be using the wrong key words.
TheEffect fucked around with this message at 20:51 on Oct 30, 2014 |
# ? Oct 30, 2014 18:58 |
|
LeftistMuslimObama posted:I am 100% away from VBA. I'm doing it in VC#. I've never done parallel programming, but it might be fun to learn for this project. I will do some googling. Get everything else working first; parallelization is definitely "extra credit" here.
|
# ? Oct 30, 2014 19:06 |
|
I'm not a Windows programmer, but I'm whipping together a little tool to automate someone else's software. In the registry what's this S-1-5-blahblahblah? code:
|
# ? Oct 31, 2014 01:21 |
|
Thermopyle posted:I'm not a Windows programmer, but I'm whipping together a little tool to automate someone else's software. This is a SID. Basically it's an internal representation of a user account or other security subject.
|
# ? Oct 31, 2014 01:34 |
|
omeg posted:This is a SID. Basically it's an internal representation of a user account or other security subject. Ahh, thanks. That's everything I needed to know.
|
# ? Oct 31, 2014 02:05 |
omeg posted:This is a SID. Basically it's an internal representation of a user account or other security subject. The long SIDs are unique in the world, theoretically, while the very short ones are standard across all windows systems.
|
|
# ? Oct 31, 2014 07:13 |
|
TheEffect posted:I'm trying to add a shortcut to be deployed with my Click Once application. The problem is that whenever I add it as a resource Visual Stupid adds the file it POINTS to instead of the actual shortcut to the file. Is there any way around this? I've Googled around to no avail but I might be using the wrong key words. Just in case anyone else was wondering the solution for this, this was posted via MSDN- quote:I suggest you add the shortcut in the following method.
|
# ? Oct 31, 2014 15:03 |
|
Fisticuffs posted:Cool, then I will definitely look into customizing someone else's base into something that can hopefully offer similar quality to ESPN3. Thanks for this info this is really awesome. Do you know of any open source databases, search engines or basically some site that'll help me locate these programs and start vetting them for my needs or looking into how customize-able they are? Thanks again for the help everyone! Just to be clear, you're trying to break into a crowded market with absolutely no understanding of the underlying technology. I hope you have a lot of money that you're willing to burn. If you're really looking into this, it might be better to read the RFCs on streaming web content before looking for half fleshed out services. If you want something minimal though, you can probably just host full videos and play them on a site with an html5 player. Live-transcoding content can probably be added later.
|
# ? Nov 1, 2014 02:17 |
|
TheEffect posted:Just in case anyone else was wondering the solution for this, this was posted via MSDN-
|
# ? Nov 1, 2014 02:44 |
|
I build a lot of Office Automation stuff in VBA. I recently came across a rather clever system that someone else built for producing batches of PowerPoint books: while the heavy lifting is done inside of the VBA environment, it's triggered and tracked with a series of BAT files, so that if Office crashes, it will pick up right where it left off. Sadly, my understanding of BAT files never progressed past basic MSDOS autoexec stuff. For example, I didn't realize you could use branching and such. The part I'm struggling with now are the variables, such as %UserID%, stored so that the BAT can map a network volume. What is the scope of these variables? What is their lifetime? (ie, do they expire when the nested BAT executions end, or what) Are they all Variants, or can I restrict the variable type?
|
# ? Nov 1, 2014 17:04 |
|
Squashy Nipples posted:I build a lot of Office Automation stuff in VBA. I recently came across a rather clever system that someone else built for producing batches of PowerPoint books: while the heavy lifting is done inside of the VBA environment, it's triggered and tracked with a series of BAT files, so that if Office crashes, it will pick up right where it left off. Sadly, my understanding of BAT files never progressed past basic MSDOS autoexec stuff. For example, I didn't realize you could use branching and such. 2) You might actually benefit from moving some of the VBA stuff into COM automation or whatever it's called these days, too. 3) For that matter, is automating office the best way to actually do what you're doing? mystes fucked around with this message at 18:49 on Nov 1, 2014 |
# ? Nov 1, 2014 18:45 |
|
mystes posted:1) Don't use BAT files in 2014. Use anything else. Powershell might be a good choice; normally I'd note that it's annoying in all sorts of ways, but if you can tolerate VBA this probably won't be a problem for you. I'm not a real developer, I'm a business analyst. As such, my toolset is limited to whatever is installed on the corporate laptop. I couldn't even install the "Custom UI Editor For Microsoft Office"; I had to install it on own PC, and then stick the EXE on a USB drive. I'm sure there are WAY better ways to do what we are doing, but they all involve money and manpower that are not available. And finally, the output has to be in PowerPoint, because that's what my client's clients are used to, and no way am I going to rebuild a complex 40-page template if I can keep populating the old one within VBA. My fixing this system is a favor to someone I used to work with. I mean, they are paying me good money, but paying me for like 20 hours of work is infinitely cheaper then any other option they have, because I designed most of the DataMart when I worked there full time. I didn't build this particular report, but it uses all my data structures and such. The client is aware the a big investment is needed in a total replacement, but there is a lot of organizational baggage to work through. So, yes, I understand that putting an additional bandaid on top of the dirty old ones is a bad idea, but I'm going to do it anyway.
|
# ? Nov 1, 2014 19:55 |
|
Squashy Nipples posted:I'm not a real developer, I'm a business analyst. As such, my toolset is limited to whatever is installed on the corporate laptop. I couldn't even install the "Custom UI Editor For Microsoft Office"; I had to install it on own PC, and then stick the EXE on a USB drive. I'm sure there are WAY better ways to do what we are doing, but they all involve money and manpower that are not available. And finally, the output has to be in PowerPoint, because that's what my client's clients are used to, and no way am I going to rebuild a complex 40-page template if I can keep populating the old one within VBA. Also, if the content you're populating the powerpoint file with isn't too complicated, it would probably be a million times easier to just edit the XML inside the PPTX file directly. You could probably use some off-the-shelf templating language designed for HTML and be done in like 5 minutes. This way you wouldn't have to worry about stuff like COM automation or office crashing. You could even allow people to edit the powerpoint file and just put stuff like %{companyname} where you need stuff filled in. mystes fucked around with this message at 20:44 on Nov 1, 2014 |
# ? Nov 1, 2014 20:39 |
|
mystes posted:The computer probably has powershell on it already if it's Windows 7 or higher. Awesome! When I have some time, I'll learn this and add it to my toolbox. mystes posted:Also, if the content you're populating the powerpoint file with isn't too complicated, it would probably be a million times easier to just edit the XML inside the PPTX file directly. You could probably use some off-the-shelf templating language designed for HTML and be done in like 5 minutes. This way you wouldn't have to worry about stuff like COM automation or office crashing. You could even allow people to edit the powerpoint file and just put stuff like %{companyname} where you need stuff filled in. That's... a fantastic idea. I have very little experience editing the XML directly, but I'll be sure to keep that in mind if they come up with the budget for a re-design. My google-fu got me the answers I need on the BAT file, so the bandaid is already applied. Still gonna charge em for all 20 hours, though. Thanks for the input.
|
# ? Nov 1, 2014 21:05 |
|
Given screenshots of different windows, I'm trying to come up with an algorithm for selecting pixels from the image that are...I'm not sure of the correct term. Vibrant, bright, primary, foreground, uncommon. Those are all terms to describe the idea. Typically these will be icons, clickable urls, colors that aren't part of the standard theme or Windows widget toolset. Anyone have any thoughts or maybe some terms for me to google?
|
# ? Nov 2, 2014 21:42 |
|
^ My first thought/idea on how to tackle this would be to sample the entire image and build a histogram for the colors present. Then pick the colors which occur the least often1 and then find where that color occurs on the image. Section that area off1 and run an edge detection algorithm on it. Draw a box around the part that includes the colors and the edge. That'll be 1 hit, repeat. You can make the algorithm smarter by polling the system and getting all the system colors and maybe see if that can be factored into the edge detection/segmenting as "background." You'll want to figure out a way to list all the default stuff/things you don't want and find a way to factor that in as noise so the signal (icons, hyperlinks, etc) will fall out. 1: To figure out what dictates "least often" and proper sectioning; you'll probably want to train some kind of statistical decision model, maybe Bayes? I'd do some reading on machine learning if you haven't, this is very ML-esque. ====== I'm working a problem on HackerRank and am stumped as to whats wrong with my algorithm. I've looked at the Editorial which has the solution code in C, and while my code isn't as succinct as the solution's, I believe it still follows the algorithm closely. Problem is I pass Test Cases 0-5 & 12, but fail 6-11 and am not sure what I'm doing wrong. It's hard to diagnose, since the test case is huge. I was hoping someone could enlighten me. Problem: Board Cutting My Code: link
|
# ? Nov 2, 2014 22:11 |
|
Thermopyle posted:Given screenshots of different windows, I'm trying to come up with an algorithm for selecting pixels from the image that are...I'm not sure of the correct term. Look up regions of high contrast.
|
# ? Nov 2, 2014 22:54 |
|
Thermopyle posted:Given screenshots of different windows, I'm trying to come up with an algorithm for selecting pixels from the image that are...I'm not sure of the correct term. I've done this before. My code is here: https://bug661042.bugzilla-attachments.gnome.org/attachment.cgi?id=198392 Basically, create a bunch of counts for every color, on average, and then run over every pixel in the image, convert them into HSL and chuck out all the colors that don't contribute (too dark, too light, too unsaturated), then increment the count. The maximum color is the color you want. It's effectively a "3D histogram" and Google shows that there are a few tools that go by that name already.
|
# ? Nov 3, 2014 00:29 |
|
Ahh, that all got me thinking in the right way. Thanks.
|
# ? Nov 3, 2014 02:26 |
|
Kenishi posted:I'm working a problem on HackerRank and am stumped as to whats wrong with my algorithm. I've looked at the Editorial which has the solution code in C, and while my code isn't as succinct as the solution's, I believe it still follows the algorithm closely. Problem is I pass Test Cases 0-5 & 12, but fail 6-11 and am not sure what I'm doing wrong. It's hard to diagnose, since the test case is huge. I was hoping someone could enlighten me. code:
EDIT: Actually I take that back, it wasn't overflow from input. Looks like it might have been some kind of arithmetic overflow caused by multiplying two integers together. Making one long and keeping the other int fixed it. Kenishi fucked around with this message at 04:50 on Nov 3, 2014 |
# ? Nov 3, 2014 04:43 |
|
Is there a sensible place to submit a bug report/feature request for Windows itself?
|
# ? Nov 3, 2014 19:47 |
|
Newf posted:Is there a sensible place to submit a bug report/feature request for Windows itself? Not on Connect, anyway
|
# ? Nov 3, 2014 19:51 |
Newf posted:Is there a sensible place to submit a bug report/feature request for Windows itself? Perhaps there are some channels for it if you run the Windows 10 alpha.
|
|
# ? Nov 3, 2014 20:51 |
|
I've got an application that burps out a JSON file, and a JavaScript "web" application that's supposed to be run locally that consumes this file and displays data from it in a browser. When the JSON file changes, you've got to refresh the page in the browser to see updates. I'm looking for a way to automate these refreshes. I'm assuming that there's no easy way to make a change to the JavaScript app to do this, because there's no actual webserver to coordinate things. The two ideas I've thought of are to actually run a little webserver on localhost, or to embed a browser engine (including a JavaScript implementation) in a standard desktop application so I can get the rendering I want without using a browser. (We're using JavaScript because we have a sweet third-party library that gives us exactly the output and formatting we need.) Which of these options is better? Is there something else I'm not thinking of? e: I think I can just use HttpListeners, actually. raminasi fucked around with this message at 21:03 on Nov 3, 2014 |
# ? Nov 3, 2014 20:52 |
|
GrumpyDoctor posted:Is there something else I'm not thinking of? Periodically load/read the JSON file, check the result against the last load and update the UI if they're different.
|
# ? Nov 3, 2014 21:03 |
|
LeftistMuslimObama posted:After thinking on this some more, would it even be that bad to go paragraph-by-paragraph? I can convert the paragraph in to an array of strings by using " " as a delimiter. Then instead of needing to maintain a separate queue structure, I can just roll through the paragraph, looking ahead the requisite number of words to find my longer phrases. At the end I can just apply the comment to the whole paragraph (which appears to be much easier than trying to define a range beneath the <p> level), which also reduces the amount of visual clutter in the document. Progress report: Loading the dictionary, opening the docx, and checking it against the dictionary are all implemented. I realized I could check for errors that span sentences/punctuation by "escaping" punctuation into words so the String.Split(" ") call gobbled them up too. I just had to change my dictionary file to have the escaped words instead of the actual punctuation. I set up the program to scan through the file and pop up a dialog when the scan is complete. For a 100-page file the time from program launch to scan complete is about 10 seconds, factoring in time to actually select the file in the UI. Also down from 11000 lines of code in the old guy's vba to around 100 total (with room to refactor some repeated code into separate methods) in my C# program. I don't need to remind anyone in this thread, but it's just staggering how much performance can be affected by a poor choice of algorithm or data structure.
|
# ? Nov 4, 2014 04:09 |
|
I'm trying to implement 1D linear program. but I feel like I'm missing something to connect the dots. I want to compute the convex hull of a point set, so my constraints are the lines formed by line pairs. x_m and y_m is the direction I want to optimize. I'm trying to make an incremental algorithm which adds the points/lines one by one.code:
|
# ? Nov 4, 2014 14:14 |
|
I'm trying to wrap my head around data in Google Analytics that comes from a mobile app (aggregated data from iOS, Android, and Windows Phone apps that I have built). Wasn't sure what thread this question would be best suited for, since it spans Analytics + mobile apps + web. Is there anyone here that could help me figure out if the Unique Visitors count that we're seeing is accurate across a specific date range - or if there are easily-explainable reasons why it may never be completely accurate? It's possible part of the issue is that the integration with Google Analytics may be slightly different between iOS/Android and Windows Phone - since iOS/Android is built on Titanium, with Windows Phone being a native C# app - so there could easily be differences in how data is getting sent to Google. Also, when we first built the app in Titanium, the only integration with Analytics available (without custom building it ourselves) was to set the Analytics account up as if it were for a website (not as a mobile app) - and everything gets tracked via Events (not Page Views). When we built the Windows Phone app later, we had to remain consistent so that all the Analytics data was still aggregated together. I just don't know enough about how Google calculates these things, and every doc page or blog post I read just ends up confusing me even more. Would appreciate it if anyone thinks they may be able to help, even if it's just a link somewhere. edit - nevermind, I think I've got it figured out now. So much fun! cletus42o fucked around with this message at 19:17 on Nov 4, 2014 |
# ? Nov 4, 2014 16:48 |
|
So as far as I can tell, in batch, there's no way to split a string on a non-newline character and then iterate over the pieces. Seems if you want to split on another delimiter you can only access the individual tokens as %%a, %%b, %%c, etc. and there's no way to feed them all into a FOR command. Is that actually right or am I missing something obvious?] And I found it. Was clinging too hard to FOR /F when all I needed was good ol' FOR. Eggnogium fucked around with this message at 02:31 on Nov 5, 2014 |
# ? Nov 5, 2014 00:37 |
|
Noobie question about implementing interfaces in Java: I have a class with static methods that is supposed to implement an interface, but Eclipse tells me that "static methods can't hide instance methods" and gives me an error. This makes some kind of conceptual sense to me, but... there has to be a way to do this, right?
|
# ? Nov 5, 2014 17:54 |
|
No there isn't a way to have your static method also override the interface method. Why do you need it to be static in the first place? that's usually a code smell.
|
# ? Nov 5, 2014 18:06 |
|
|
# ? May 18, 2024 06:17 |
How do you intend a static method to implement a non-static abstract method? The major difference between a static and a non-static method is that non-static methods (let's call them "real methods") have an implicit "this" parameter, which is the object the method was called on. Static methods have no "this". Why is that method even static at all?
|
|
# ? Nov 5, 2014 18:07 |