Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Volmarias
Dec 31, 2002

EMAIL... THE INTERNET... SEARCH ENGINES...

Fisticuffs posted:

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?

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?

Adbot
ADBOT LOVES YOU

The MUMPSorceress
Jan 6, 2012


^SHTPSTS

Gary’s Answer

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.

Anyway, crossposting this from the .NET thread because I think different folks occupy this thread:

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 :(

Fisticuffs
Aug 9, 2007

Okay you a goon but what's a goon to a goblin?

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.

down with slavery
Dec 23, 2013
STOP QUOTING MY POSTS SO PEOPLE THAT AREN'T IDIOTS DON'T HAVE TO READ MY FUCKING TERRIBLE OPINIONS THANKS

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.

nielsm
Jun 1, 2009



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.

raminasi
Jan 25, 2005

a last drink with no ice

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.

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 :(

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.

Fisticuffs
Aug 9, 2007

Okay you a goon but what's a goon to a goblin?

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.

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.

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!

The MUMPSorceress
Jan 6, 2012


^SHTPSTS

Gary’s Answer

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.

TheEffect
Aug 12, 2013
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

raminasi
Jan 25, 2005

a last drink with no ice

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.

Thermopyle
Jul 1, 2003

...the stupid are cocksure while the intelligent are full of doubt. —Bertrand Russell

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:
HKEY_USERS\S-1-5-21-4007950782-2817922351-3461140913-1000
Will that stay constant amongst various windows installations? If not, how can I get that key in a reproducible way?

omeg
Sep 3, 2012

Thermopyle posted:

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:
HKEY_USERS\S-1-5-21-4007950782-2817922351-3461140913-1000
Will that stay constant amongst various windows installations? If not, how can I get that key in a reproducible way?

This is a SID. Basically it's an internal representation of a user account or other security subject.

Thermopyle
Jul 1, 2003

...the stupid are cocksure while the intelligent are full of doubt. —Bertrand Russell

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.

nielsm
Jun 1, 2009



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.

TheEffect
Aug 12, 2013

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.

Step 1: you could copy the shortcut to your project folder.

Step 2: click the "show All files" icon in the Solution Explorer(like the following picture), find the shortcut.Ink file, then right-click on it, choose the "Include In Project".

Step 3: Set the "Build Action" property to "Content", Set the "Copy to Output Directory" to "Copy always"

Step 4: Run your application, then publish it. you could find the shortcut in the Application Files.

If you have any other concern regarding this issue, please feel free to let me know.

leper khan
Dec 28, 2010
Honest to god thinks Half Life 2 is a bad game. But at least he likes Monster Hunter.

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.

Sedro
Dec 31, 2008

TheEffect posted:

Just in case anyone else was wondering the solution for this, this was posted via MSDN-
Wouldn't that only work if you hard-code the install directory? Typically an installer lets you choose a directory so you would have to create the shortcut on the fly. I've never used ClickOnce though.

Squashy Nipples
Aug 18, 2007

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?

mystes
May 31, 2006

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.

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?
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.

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

Squashy Nipples
Aug 18, 2007

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.

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?


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.

mystes
May 31, 2006

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.

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.
The computer probably has powershell on it already if it's Windows 7 or higher.

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

Squashy Nipples
Aug 18, 2007

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.

Thermopyle
Jul 1, 2003

...the stupid are cocksure while the intelligent are full of doubt. —Bertrand Russell

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?

Kenishi
Nov 18, 2010
^ 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

ultrafilter
Aug 23, 2007

It's okay if you have any questions.


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.

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?

Look up regions of high contrast.

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe

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.

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?

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.

Thermopyle
Jul 1, 2003

...the stupid are cocksure while the intelligent are full of doubt. —Bertrand Russell

Ahh, that all got me thinking in the right way. Thanks.

Kenishi
Nov 18, 2010

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.
I figured my problem out. I guess I should have probably paid more attention to input variable size. I had to change the
code:
int cost  to  long cost
in my cut() method. The cost numbers were causing the integer to overflow and throwing off calculations.

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

Newf
Feb 14, 2006
I appreciate hacky sack on a much deeper level than you.
Is there a sensible place to submit a bug report/feature request for Windows itself?

raminasi
Jan 25, 2005

a last drink with no ice

Newf posted:

Is there a sensible place to submit a bug report/feature request for Windows itself?

Not on Connect, anyway

nielsm
Jun 1, 2009



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.

raminasi
Jan 25, 2005

a last drink with no ice
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

Munkeymon
Aug 14, 2003

Motherfucker's got an
armor-piercing crowbar! Rigoddamndicu𝜆ous.



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.

The MUMPSorceress
Jan 6, 2012


^SHTPSTS

Gary’s Answer

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.

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 :(

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.

Boz0r
Sep 7, 2006
The Rocketship in action.
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:
min  x_m*a + y_m*b
s.t. x_i*a + y_i*b + z_i >= 0

a', b' -> optimize with regards to 1...i

if ( x_i*a' + y_i*b' + z_i >= 0 )
    do nothing
else 
    x_i*a' + y_i*b' + z_i = 0
    b' = (-z_i - x_i*a')/y_i
    a' = ?
I think I may have screwed up in my notation, and that's what's confusing me, but how do I calculate a' and b'?

cletus42o
Apr 11, 2003

Try to imagine all life as you know it stopping instantaneously and every molecule in your body exploding at the speed of light.
College Slice
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

Eggnogium
Jun 1, 2010

Never give an inch! Hnnnghhhhhh!
(Sorry, batch question incoming.)

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

Snak
Oct 10, 2005

I myself will carry you to the Gates of Valhalla...
You will ride eternal,
shiny and chrome.
Grimey Drawer
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?

Janitor Prime
Jan 22, 2004

PC LOAD LETTER

What da fuck does that mean

Fun Shoe
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.

Adbot
ADBOT LOVES YOU

nielsm
Jun 1, 2009



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?

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply