|
Random Number posted:The equation that calculates the signal strength has a randomized numerator. I get the method you're explaining conceptually, but I don't know how i would go about building the system of equations to solve it. Is the numerator the same every time you measure the signal?
|
# ? Apr 27, 2012 18:10 |
|
|
# ? Jun 8, 2024 23:31 |
|
2 fat 4 my lambo posted:you are correct, however it's not my code and I was trying to figure out why it worked in solaris but not linux + how to fix it changing as little as possible Aah. Without knowing what your end goal is it's hard to say. However, if you just want the ps line for the current process you can replace that whole messy grep pipeline with this: code:
|
# ? Apr 27, 2012 18:11 |
|
ultrafilter posted:Is the numerator the same every time you measure the signal? yeah but it's randomly generated between 0 and 1 when the program starts.
|
# ? Apr 27, 2012 18:18 |
|
Random Number posted:The equation that calculates the signal strength has a randomized numerator. I get the method you're explaining conceptually, but I don't know how i would go about building the system of equations to solve it. See this post: ToxicFrog posted:In effect, one measurement gives you a ring, and the source could lie anywhere on that ring; two measurements gives you two rings, which - unless you are very lucky and moved straight towards or away from the source - will intersect at two points, either of which could contain the source; three measurements gives you three rings, and there will only be one point at which all three intersect. You essentially draw three circles with center = the point you measured at, and radius = signal strength as a distance. The point where they overlap is the location of the signal. E: Obviously don't actually draw the circles, just do the math. Carthag Tuek fucked around with this message at 18:26 on Apr 27, 2012 |
# ? Apr 27, 2012 18:24 |
|
I'm trying to add some buttons to a toolbar in a closed-source app. I'm pretty sure this is what I have to do: Inject a dll In the dll, find the toolbar class (msvb_lib_toolbar) Add a button - this is where it gets hazy, not sure how to do this yet Hook the toolbar, act on button events, pass on the ones I don't. Am I barking up all the right trees?
|
# ? Apr 27, 2012 18:25 |
|
Carthag posted:See this post: This doesn't work if he doesn't know the numerator though.
|
# ? Apr 27, 2012 18:29 |
|
Oh didn't see that. He might need to move a bit more than 3 steps before locating the signal then. At point A, he only knows signal strength. At point B, he knows signal strength + how far he moved (and in what direction). Every time he moves, he is given info that can be used to calculate how signal strength corresponds to distance.
|
# ? Apr 27, 2012 18:35 |
|
Random Number posted:yeah but it's randomly generated between 0 and 1 when the program starts. In that case, the ratio of the signal strength at two points doesn't depend on the numerator.
|
# ? Apr 27, 2012 19:03 |
|
ToxicFrog posted:Aah. Without knowing what your end goal is it's hard to say. However, if you just want the ps line for the current process you can replace that whole messy grep pipeline with this: It's actually just to check if the process is already running, so I'll use the $$ variable to exclude itself and it's child processes. Thanks again!
|
# ? Apr 27, 2012 20:09 |
|
Random Number posted:I posted this over in the Phyiscs questions thread and didn't see a MATLAB thread here so here, I'd start by taking your equation S=n/d^2 (n is the random numerator) and changing it around to d^2=n/S. At some location x1,y1 you can express the squared distance d^2 as d^2 = n/S1 = (x1-xs)^2 + (y1-ys)^2 where xs,ys is the location of the source and S1 is the value of S that you measure from x1,y1. Moving around to three locations and measuring S at each point gives the equations n/S1 = (x1-xs)^2 + (y1-ys)^2 n/S2 = (x2-xs)^2 + (y2-ys)^2 n/S3 = (x3-xs)^2 + (y3-ys)^2 That's three equations with three unknowns (n, xs, ys). Do whatever Matlab stuff you need to do to solve that system.
|
# ? Apr 27, 2012 20:11 |
|
quote:I'd start by taking your equation S=n/d^2 (n is the random numerator) and changing it around to d^2=n/S. At some location x1,y1 you can express the squared distance d^2 as Yeah I came to the same conclusion today when thinking about it at work. MATLAB can solve that poo poo easy. Thanks for all the help folks!
|
# ? Apr 28, 2012 01:23 |
|
Man its more fun when its hints => solution and the middle part is your own brain.
|
# ? Apr 28, 2012 06:15 |
|
Random Number posted:Yeah I came to the same conclusion today when thinking about it at work. MATLAB can solve that poo poo easy. Thanks for all the help folks! Trip Report: fsolve owns, but when I use my subfunction to solve the system in the larger code that moves me to the source I get errors out the rear end, but at least i know it works if i plug in the values by hand. I think my guesses might be too far away from the actual values and that's where the errors are coming from.
|
# ? Apr 29, 2012 23:22 |
|
What's PhoneGap/Titanium like to use? I have an upcoming project that requires apps for both android and iOS. I'm comfortable with android but I've never touched iOS, or Objective-C for that matter. I have a good amount of Javascript/CSS/HTML experience (although not HTML5/CSS3), so that's why I was thinking of going down the PhoneGap/Titanium route. Thoughts?
|
# ? May 2, 2012 19:28 |
|
It's the quickest, easiest way to get a decent, usable app out the door. If you're not doing much beyond what you would put on a normal website, go for it.
|
# ? May 2, 2012 19:41 |
|
rt4 posted:It's the quickest, easiest way to get a decent, usable app out the door. If you're not doing much beyond what you would put on a normal website, go for it. Have you or anyone else around here used Titanium for more complex operations? My colleague and I just used it to make a prototype which was indeed quick and easy, but we are concerned about continuing to use it for the full project since even our very simple app will occasionally crash (could easily be our fault), not to mention the persistent comments of users across the internet that claim it has memory leak problems. The real project would require building a service-type application that would require the app running in the background all the time so as to push notifications to the user when deemed necessary. It appears that Titanium might have the proper hooks for multiple platforms to go about this, but the issues listed previously concern me.
|
# ? May 3, 2012 16:08 |
|
Github talk: We have a repo that houses our production source. We want to be able to have a dev branch, and a production branch. The dev side will be doing things like feature development and bug fixes. I'm a noob to git/github and am wondering how other people/repo's handle situations where they have a feature branch that they are 3 months from deploying, but simultaneously we have a bug fix that needs to be deployed immediately. Are there any write-up's on this kind of thing? What would you recommend?
|
# ? May 3, 2012 18:39 |
|
Physical posted:Github talk: bugfix branch
|
# ? May 4, 2012 02:00 |
|
So, at my new job they have a weird way of handling things. Or at least, as an intern, it's weird. I don't know, and I hope it isn't, if it's standard in the industry or not. In any given project, the way they populate drop down menus is by having two tables in the database; DDTypes and DDValues. So DDTypes might look like this: code:
code:
|
# ? May 4, 2012 20:23 |
|
Sab669 posted:So, at my new job they have a weird way of handling things. Or at least, as an intern, it's weird. I don't know, and I hope it isn't, if it's standard in the industry or not. I'm not familiar with that, but I imagine what technology you're developing in will influence those decisions a lot.
|
# ? May 4, 2012 20:31 |
|
We all just work in C#.
|
# ? May 4, 2012 20:40 |
|
It's not actually an out and out bad decision, it completely takes strings out of the equation for most operations other than insert or update. I could see the benefits of that; I remember wrestling with a system that stored all status codes as varchar(2) but they were all actually integers. Inserting another layer for type definition control and seamless identification seems like it could be a good idea.
|
# ? May 5, 2012 01:35 |
|
Sab669 posted:So we just have this god drat massive, ugly DDValues table full of all sorts of aribtrary data ranging from different States, Countries, Job Statuses, all sorts of poo poo. Is this a common thing? It is a common thing, it is known as Entity Attribute Value (although this is a normalised form of it). It is almost always a bad thing and hints at other horrors within the DB.
|
# ? May 5, 2012 17:27 |
|
This might be a tricky one, but has anyone had experience interfacing with NetSuite? If so, what were your experiences like? Background: I have a potential client that wants some reports pulled/inserted from a mobile app, and they use NetSuite as their CRMS. dmccaff posted:What's PhoneGap/Titanium like to use? I have an upcoming project that requires apps for both android and iOS. I'm comfortable with android but I've never touched iOS, or Objective-C for that matter. I have a good amount of Javascript/CSS/HTML experience (although not HTML5/CSS3), so that's why I was thinking of going down the PhoneGap/Titanium route. Thoughts? I put out this app in about a week. Uses Cordova (PhoneGap), jqtouch and some plugins. Super easy to get running and I learned how to make PDFs with JavaScript. Huragok fucked around with this message at 06:42 on May 6, 2012 |
# ? May 6, 2012 06:36 |
|
Just a silly question, but when did they make it so you could ID/Class everything in HTML? Is it a 5 feature, or has it been like that for quite some time? The other day I was happily surprised that <li id="foobar"> actually worked when applying styles. Is it advantageous for SEO to have nicely labled id/classes for as much as possible, or am I getting too crazy? <p1 class="companyname"> I'm still trying to figure out HTML5 and how to make your page meta as gently caress.
|
# ? May 7, 2012 17:55 |
|
ZanderZ posted:Just a silly question, but when did they make it so you could ID/Class everything in HTML? Is it a 5 feature, or has it been like that for quite some time? The other day I was happily surprised that <li id="foobar"> actually worked when applying styles.
|
# ? May 7, 2012 18:04 |
ZanderZ posted:Just a silly question, but when did they make it so you could ID/Class everything in HTML? Is it a 5 feature, or has it been like that for quite some time? The other day I was happily surprised that <li id="foobar"> actually worked when applying styles. It's a HTML 4 thing, so from around 1997. I doubt crawlers really look at anything you put as classes or ids.
|
|
# ? May 7, 2012 18:04 |
|
ZanderZ posted:Just a silly question, but when did they make it so you could ID/Class everything in HTML? Is it a 5 feature, or has it been like that for quite some time? The other day I was happily surprised that <li id="foobar"> actually worked when applying styles. I don't think scrapers look at ID/class. And I'm pretty sure they also don't look at any of the new semantic layout tags (article/section/whatever). I think SEO-wise, the only bump you can get is from HTML5 microdata/Rich Snippets.
|
# ? May 7, 2012 18:25 |
|
Kim Jong III posted:I don't think scrapers look at ID/class. And I'm pretty sure they also don't look at any of the new semantic layout tags (article/section/whatever). I think SEO-wise, the only bump you can get is from HTML5 microdata/Rich Snippets. Pardon my ignorance if I'm totally wrong here since I have not used HTML or done a website in quite some time, but what's the point of the 'article'/whatever tags if the search crawlers don't look at them? I was always under the impression they would look at those sort of things as we move toward the 'semantic' web, or whatever it's called.
|
# ? May 7, 2012 23:25 |
|
The new tags are for better 'alternative' interfaces to consume html5. Things like screen readers, mobile browsers, Instapaper like clients, webapps that consume other webpages, etc.
|
# ? May 7, 2012 23:56 |
|
Basically there are huge parts of web technology that have nothing to do with boosting your search rankings.
|
# ? May 7, 2012 23:59 |
|
I'm looking for a good resource on developing testing procedures for QA. Admittedly, my situation is a bit screwed up. We have a bunch of user-facing tools that aren't being tested, and therefore I am very wary about making changes to them. Too often, I've found that I have broken features that I didn't even know about (or forgot about). We do have a lot of users, though, so bugs like this tend to get caught early, but sometimes they just fester. So, getting started with testing on something like this feels daunting... especially because I don't even know how I should write scripts that I could give to an arbitrary QA person to run through (who are not necessarily familiar with the function of our tools).
|
# ? May 8, 2012 15:54 |
|
Does anyone have some good primers to get started properly with Bash scripting? Half of the ones I google up don't even have working code examples, which makes me wonder exactly how terrible their advice is. I'm mainly messing around with outputting stuff to the screen for use in videos, so if there's any neat tricks with curses or other psuedo-graphical outputs we can do with Bash I'd definitely like to know about that stuff.
|
# ? May 8, 2012 16:09 |
|
baby puzzle posted:Admittedly, my situation is a bit screwed up. We have a bunch of user-facing tools that aren't being tested, and therefore I am very wary about making changes to them. Too often, I've found that I have broken features that I didn't even know about (or forgot about). We do have a lot of users, though, so bugs like this tend to get caught early, but sometimes they just fester. I think you'll quickly find that your situation is the norm - most places spend as much time on QA as they do on documentation The last time I took over on a large codebase with zero testcase/QA coverage, I started with writing functional tests. I broke them into two categories - smoke tests & functionality tests. The smoke tests should be really limited - does the tool open, does it read/write files properly, etc. These tests should take a few minutes to run, and you should run them before every commit to be sure you don't break poo poo. The functional tests should test what the smoke tests don't. They'll take longer to run, so I ended up doing them every morning on the trunk. For these tests, just type up some instructions for QA with screenshots as needed. "Click here, type this, the result should be X" is perfect. I was shocked at how many bugs I was able to catch with just three or four pages of these test cases. Next, I'd just start with unit tests. Write unit tests from here out - any time you refactor/change features, make a unit test as well. And don't forget to write a unit test for any bug you fix. Set up your VCS to run the unit tests before every check-in & refuse if the tests fail. Whatever you do, resist the temptation to use testing harnesses like Selenium, or continuous integration tools like Buildbot. These are wonderful, but IMO you'll spend a lot of time learning & working with them. Once the basic tests are in place and the code stops breaking when you breathe on it you can look at the cool stuff
|
# ? May 8, 2012 16:32 |
|
Kim Jong III posted:Whatever you do, resist the temptation to use testing harnesses like Selenium, or continuous integration tools like Buildbot. These are wonderful, but IMO you'll spend a lot of time learning & working with them. Once the basic tests are in place and the code stops breaking when you breathe on it you can look at the cool stuff We're going the other way at my shop - my lead was refusing to agree to let me put unit tests or stuff like Doxygen in because "I commit a lot and I don't want to have to run tests or extract documentation every time." I put all of our software into Jenkins, all of that stuff happens behind the scenes now, and he's got no arguments on those fronts left. That said, we have terrible infrastructure and practices, and I need to get out of this place.
|
# ? May 8, 2012 18:49 |
|
Coolguye posted:Does anyone have some good primers to get started properly with Bash scripting? Half of the ones I google up don't even have working code examples, which makes me wonder exactly how terrible their advice is. I'm mainly messing around with outputting stuff to the screen for use in videos, so if there's any neat tricks with curses or other psuedo-graphical outputs we can do with Bash I'd definitely like to know about that stuff. I haven't used Bash in a while but when I did this guy's guide seemed pretty good. http://tldp.org/LDP/abs/html/
|
# ? May 8, 2012 20:46 |
|
Didn't we have a cuda thread at some point? Reasoning about performance with cuda is kind of a mindfuck some times
|
# ? May 8, 2012 20:47 |
|
So I'm taking my final exam for c++ (its open internet so its not cheating, i think) and im confused because in this code:quote:pointCls point1; class point1 is defined by the cin, and I dont know how to get that to work within the program. also the lineCls l4 is defined by adding integers to it! For some reason this is stumping me, any help?
|
# ? May 9, 2012 00:50 |
Lots of operator overloading going on there. Also eww, iostreams. cin >> point1; for example, can only work if there is defined an operator>> that takes an input stream on the left-hand side and a pointCls object on the right-hand side. You can't really know what that code does without knowing what operators are overloaded and what what types, and what they actually do.
|
|
# ? May 9, 2012 01:07 |
|
|
# ? Jun 8, 2024 23:31 |
|
Well I need cin to take in an X and a Y value to create a "point" (x,y) I guess. basically this would be easier if I could just make the constructor ask for these values as a cin, but for some reason my professor has it like this in the main and I don't know, it seems like a mistake but I pointed right to it and asked if thats how its supposed to be/can we change it and he said no its correct.
|
# ? May 9, 2012 01:15 |