|
the talent deficit posted:I have a messaging system that consumes arbitrary binary sequences from a number of producers. Assuming all producers can read all other producers output, is there a way to uniquely identify producers that makes it impossible for producers to masquerade as other producers that doesn't rely on shared keys? If you want to uniquely identify a producer, you have to have some kind of information that is unique to that producer. What, specifically, can't you do that makes you think you can't use "shared keys"? If you can be more specific about what your problem is, then we can choose a MAC that will work for you.
|
# ? Dec 6, 2010 01:53 |
|
|
# ? Jun 4, 2024 02:27 |
|
ShoulderDaemon posted:If you want to uniquely identify a producer, you have to have some kind of information that is unique to that producer. What, specifically, can't you do that makes you think you can't use "shared keys"? If you can be more specific about what your problem is, then we can choose a MAC that will work for you. I can use shared keys, but I'd like to avoid the overhead. I've got a bunch of processes (that I have no control over) writing to a single file (via a proxy that sequences the writes). I want to prevent processes from forging writes from other processes. They all have unrestricted read rights to the file, so I can't just use a unique ID per process. Right now, I use HMAC, but I'm trying to saturate the disk i/o, and the crypto overhead is preventing that. Additionally, I'd like to avoid altering the message in any way, apart from enclosing it in some sort of container. the talent deficit fucked around with this message at 02:12 on Dec 6, 2010 |
# ? Dec 6, 2010 02:10 |
|
If you can't do any sort of handshake, maybe you can do something time-sensitive? Like, hash the epoch with a unique identifier or something. Then you'd be a moving target and malicious processes couldn't simply replay a stream from a legitimate process. I suspect this is insecure on its own, but maybe it's a start.
|
# ? Dec 6, 2010 02:14 |
|
the talent deficit posted:I can use shared keys, but I'd like to avoid the overhead. I've got a bunch of processes (that I have no control over) writing to a single file (via a proxy that sequences the writes). I want to prevent processes from forging writes from other processes. They all have unrestricted read rights to the file, so I can't just use a unique ID per process. Right now, I use HMAC, but I'm trying to saturate the disk i/o, and the crypto overhead is preventing that. You're going to have a really hard time finding a solution that's less expensive than HMAC. What are you using as the underlying hash? How much data are you running the hash over? For speed you should probably be using HMAC-SHA1 (or HMAC-MD5, which is currently secure although it's deprecated for a good reason) and be hashing over a short unique record number (such as its initial byte offset in the file or something). About the best I can think of that doesn't involve any crypto overhead would be having the scheduling proxy maintain a second file in parallel that the processes don't have read permission for, use that to track ownership of the writes, then have an attestation proxy that can answer queries about ownership.
|
# ? Dec 6, 2010 02:18 |
|
Yeah, I suspected as much. There's a few other ways to do it, but the all involve modifying the data written and adding padding. I think I'm going to have to stick with the HMAC.
|
# ? Dec 6, 2010 02:23 |
|
I'm using a intermediate language based on Java. Is there any reason why I should do this: code:
code:
The reason I ask is because the example documentation for this code does it the former way, but it seems I can just skip a step (and some lines of code) doing it the second way.
|
# ? Dec 6, 2010 20:23 |
|
They're nearly identical. The only real difference is that if the getValue failed for some reason, the DDEOutput constructor would not be called. If, say, getValue was prone to error for some reason and the constructor to DDEOutput was expensive, you'd want to attempt to run getValue first.
|
# ? Dec 6, 2010 20:44 |
|
mik posted:I'm using a intermediate language based on Java. It's plausible that the example documentation is trying to be clear and explicit for ease of understanding.
|
# ? Dec 6, 2010 21:48 |
|
mik posted:I'm using a intermediate language based on Java. It's slightly easier to see things clearly in a debugger with more intermediate variables, but that's about all I can think of.
|
# ? Dec 7, 2010 03:51 |
|
Meganiuma posted:It's slightly easier to see things clearly in a debugger with more intermediate variables, but that's about all I can think of. Similarly, it lets you add/remove a log message without changing the surrounding lines.
|
# ? Dec 7, 2010 06:24 |
|
So I'm about to graduate with a boring business degree, but haven't realized until this semester how awesome programming is and how much I like it. The problem I'm seeing, though, is that for most programming jobs they want: A) A CS Degree with some experience B) A ton of experience if you have no CS Degree The problem being that it seems like it'd be difficult to meet the experience requirement without the degree since no one hires non-CS majors for programming jobs. What are my options? Get another degree? Teach myself and work on open-source or personal projects?
|
# ? Dec 7, 2010 06:28 |
|
If you like coding and you want to get a job coding without a degree, build a portfolio of projects. It doesn't matter how long you take, it doesn't matter what license you apply (if any), it doesn't even matter what it does. Pick a project, build it, reflect on your successes and failures, repeat. Companies that only hire CS majors for software engineering jobs aren't (in general) companies you'd want to work for in the first place.
|
# ? Dec 7, 2010 06:37 |
|
edit: missed your last sentence. Thanks for the reply!
|
# ? Dec 7, 2010 06:38 |
|
All other things being equal, the CS degree is useful because it demonstrates a breadth of understanding. I can expect someone with a CS degree to understand algorithmic complexity, the costs, benefits and implementation details of data structures and a wide range of elementary algorithms. In practice, all things are not equal. I have interviewed many people with a CS degree who couldn't program their way out of a soaking wet paper bag. I worked with an incredibly competent build engineer who was hired out of college with a physics degree. If you have a good grasp of basic skills and you're interested enough in programming to do it in your free time, I don't think it should be a major stumbling block. I will qualify this by saying my experiences have been with relatively small companies.
|
# ? Dec 7, 2010 06:45 |
|
So, I have a Cocoa/ObjC program that displays a little square on the screen for each key on the keyboard, and I want to make it so that whenever you press a key, the corresponding one flashes onscreen. I hacked together something using an NSAnimation, but when I type at about 80 WPM, it uses 15-20% of my CPU on my MacBook Pro, even if I'm not actually changing the color of anything. Is graphics really that expensive, or am I just doing something horribly wrong?
|
# ? Dec 7, 2010 10:47 |
|
Profile it in Instruments.
|
# ? Dec 7, 2010 22:53 |
|
UML has been covered in here before but not for a while. I'm really just wondering what the recommended UML "development environments" (is it really a D.E., I don't know) is, on Windows these days. I have a few diagrams to do for work and I've been using StarUML but it's been out of development for ages now and I don't know if there's anything nicer out there. Thanks.
|
# ? Dec 8, 2010 10:27 |
|
Are there any AutoIT gurus here? I'm having a bunch of weird loving issues getting basic scripts to run. For example, using ControlCommand to check a checkbox alternately checks and unchecks it (like my script is saving state somehow), and UnCheck doesn't do anything. I also get this using ControlSetText, where it only sets the text every other time. This is weird!
|
# ? Dec 8, 2010 20:30 |
|
pokeyman posted:Profile it in Instruments. I did, and it tells me that most of the samples were in kevent and mach_msg_trap. If I disable the setNeedsDisplay call in the animation, the CPU usage goes down to something like 6%, so I'm pretty sure that that's what's screwing me over here.
|
# ? Dec 8, 2010 23:09 |
|
GrumpyDoctor posted:Are there any AutoIT gurus here? I'm having a bunch of weird loving issues getting basic scripts to run. For example, using ControlCommand to check a checkbox alternately checks and unchecks it (like my script is saving state somehow), and UnCheck doesn't do anything. I also get this using ControlSetText, where it only sets the text every other time. This is weird! Does it happen for just a certain app you're trying to automate, or does it happen system wide? (I do lots of AutoIT stuff)
|
# ? Dec 9, 2010 00:45 |
|
I want to use git commit with the -v option, but, embarrassingly, I don't know how to save and commit the file, after I've entered some text to describe the changes. Do I need to use a keyboard shortcut (Windows git bash), or what do I do to send it along?
|
# ? Dec 9, 2010 01:45 |
|
Thermopyle posted:Does it happen for just a certain app you're trying to automate, or does it happen system wide? (I do lots of AutoIT stuff) Two out of two apps I've tried. I figured out one cause: WaitWindowActive wasn't actually doing what it said it was doing, and if it returned before the window was actually active nothing would happen (apparently this happened exactly every other time). I don't know about the checkbox thing though - and I wrote that app, so I might have hosed up something with the form design. I'll post a more concrete question about this later I guess.
|
# ? Dec 9, 2010 02:19 |
|
ufarn posted:I want to use git commit with the -v option, but, embarrassingly, I don't know how to save and commit the file, after I've entered some text to describe the changes. Do I need to use a keyboard shortcut (Windows git bash), or what do I do to send it along? Depends on what editor it's using. I don't recall which one wingit uses by default. If it's vi, try hitting escape a few times and then typing :wq<enter>. If it's pico or nano, try ctrl-O <enter> ctrl-X. Alternately, configure it to use an editor that you know how to use - for example, git config --global core.editor nano
|
# ? Dec 9, 2010 02:46 |
|
ToxicFrog posted:Depends on what editor it's using. I don't recall which one wingit uses by default. The bottom line says ~\repo\.git\COMMIT_EDITMSG[+][RO] [unix], if that says anything.
|
# ? Dec 9, 2010 02:50 |
|
Suggestions for a CMS for a technical blog for posting tips and tricks related to an application my company has developed? Nothing too special required - basic posting from multiple users with the ability to imbed images/movies. A comment system of some sort would be nice. It looks like WordPress and Moveable Type are the big ones so I'd be curious about those as well as any other options that might make sense.
|
# ? Dec 9, 2010 04:54 |
|
yaoi prophet posted:I did, and it tells me that most of the samples were in kevent and mach_msg_trap. If I disable the setNeedsDisplay call in the animation, the CPU usage goes down to something like 6%, so I'm pretty sure that that's what's screwing me over here. If you post the code somewhere I can take a look if you'd like, but NSAnimation is kind of generally lovely. You'll probably want to look into Core Animation if you can. That said, it does sound like an inordinately high amount of CPU, so I'd be interested to poke around.
|
# ? Dec 9, 2010 05:06 |
|
I'm getting a headache from trying to get through this review for my fundamentals of programing class. My teacher isn't specific enough in his questions for me to really understand what he's asking and I was hoping someone with more experience could help me translate what he's asking for. he doesn't provide any answers to his review, and I have the test tomorrow. I would have gone to his hours to get help with trying to decipher exactly what he meant, but my work schedule wasn't accommodating. this a link to his review http://www.austincc.edu/rblack/courses/COSC1315/lectures/ExamThreeReview/index.html questions like these I'm having troubles understanding what he asking. I asked my boyfriend for help and he doesn't know he's got about 4 years for java under his belt. My teachers great he has wonderful lectures and labs it's his written stuff that gets me he's way to vague with questions. these are the questions I'm having issues with I guess I'm confused with the questions: # QUESTION: How does the computer actually find a chunk of data in memory? # QUESTION: How do we tell a function where a chunk of data lives in memory? # QUESTION: How would you write a loop that initializes every element of the array? # QUESTION: How do we send an array to a function as a parameter? Be sure you understand what parameters are needed to make this work. # QUESTION: What are the major processes that a compiler performs on your program code? thank you
|
# ? Dec 9, 2010 05:18 |
|
ufarn posted:No dice. It's the default terminal-esque client you get when you install the Windows git package. What's "no dice"? The key sequences I suggested didn't work? 'git config' didn't? Neither? Changing core.editor should definitely work in msysgit, I've done it before. And that's the editor status line (telling you what file you're editing, what mode it has, what line ending convention it uses, etc), but I don't recognize which editor uses that format.
|
# ? Dec 9, 2010 05:28 |
|
Queen Anneka posted:these are the questions I'm having issues with I guess I'm confused with the questions: A1: It has an address - a (16/32/64 bit location in memory). As for how it gets one initially, I don't know. A2: We pass it an address. This would mean giving it a pointer -> passing by reference in C++. A3: code:
code:
code:
A5: preprocessing, code generation, linking. maybe?
|
# ? Dec 9, 2010 07:02 |
|
ToxicFrog posted:What's "no dice"? The key sequences I suggested didn't work? 'git config' didn't? Neither? Changing core.editor should definitely work in msysgit, I've done it before.
|
# ? Dec 9, 2010 11:01 |
|
Need some help with an excel problem I've come across. I have a drop down list with names of cities in it. I want to set this up so when you pick a city from that list another field will populate with an address associated with that city. I know it has to do with formulas and all that but I am totally lost. Any help?
|
# ? Dec 9, 2010 18:16 |
|
There is also an Excel thread where you might get better, swifter help.
|
# ? Dec 9, 2010 18:47 |
|
Wasn’t really sure where to put this so I’ll just post here… So I’m interviewing for a position as a Validation Engineer at a big chip company. I graduated with a Bachelor’s in CS in June. I’ve taken some courses in Computer Architecture but it’s not something I’m great at. I’m obviously going to brush up on some fundamentals but I have no idea how much detail the interview questions can be. Anybody have any advice?
|
# ? Dec 9, 2010 21:47 |
|
Talk to jawnv6 on irc
|
# ? Dec 9, 2010 22:42 |
|
ufarn posted:The shortcuts didn't seem to work. I like using the regular git bash, since it works fine aside from the whole not being able to commit thing. ...what shortcuts? You haven't said anything about shortcuts - I thought we were talking about editing commit messages when you're making a commit from the command line? Please try the stuff I suggested, both the key sequences and changing core.editor to something you're more comfortable with. (If you aren't familiar with any text-mode editors, try 'nano' or 'pico', they're pretty friendly.)
|
# ? Dec 10, 2010 01:34 |
|
pokeyman posted:If you post the code somewhere I can take a look if you'd like, but NSAnimation is kind of generally lovely. You'll probably want to look into Core Animation if you can. Here's my code; keep in mind this is my first time doing any kind of GUI programming so I have no clue what I'm doing wrong.
|
# ? Dec 10, 2010 02:12 |
|
yaoi prophet posted:Here's my code; keep in mind this is my first time doing any kind of GUI programming so I have no clue what I'm doing wrong. I sent you a pull request with the changes I made; CPU usage is now a third of what it was. I wouldn't say you were doing anything wrong. There are some common pitfalls in view drawing. The biggest one is: Avoid implementing -drawRect: if at all possible. If you must implement it, make it as fast as you can and your views as simple as possible. I changed your view code to get rid of -drawRect: entirely, and your KeyView no longer has any subviews. Also, you were sending way more -setNeedsDisplay:YES than you needed, so I added a little check in the -decay method to only update if the colour would actually change. We can take this off-thread if you'd like (check my profile), but I wrote this post in case anyone was following along at home.
|
# ? Dec 10, 2010 04:14 |
|
pokeyman posted:I sent you a pull request with the changes I made; CPU usage is now a third of what it was. Thanks; I merged the changes in and it did decrease the CPU load while actually typing to about 15%, which I think is about as good as it's going to get.
|
# ? Dec 10, 2010 04:55 |
|
I've got some tic tac toe code that i've been messing around with for a final and it works but I want it to pause after someone wins. any suggestions? #include<iostream> using namespace std; char board[9] ={'1','2','3','4','5','6','7','8','9'}; void drawboard() {cout << "\n " << board[0] << " | " << board[1] << " | " << board[2] << endl; cout<< " ---------" << endl; cout<< board[3] << " | " << board[4] << " | " << board[5] << endl; cout<< " ---------" << endl; cout<< board[6] << " | " << board[7] << " | " << board[8] << endl;} int winning(char f[]) {if(board[0] == board[1] && board[2] == board[0] ) return 1; else if(board[3] == board[4] && board[5] == board[3]) return 1; else if(board[6] == board[7] && board[8] == board[6]) return 1; else if(board[0] == board[3] && board[6] == board[0]) return 1; else if(board[1] == board[4] && board[7] == board[1]) return 1; else if(board[2] == board[5] && board[8] == board[2]) return 1; else if(board[0] == board[4] && board[8] == board[0]) return 1; else if(board[2] == board[4] && board[6] == board[2]) return 1; else return 0;} int main() {char c[2] ={'X','O'}; int move; int player=2; for(int i=0;i<=9;i++){ if(i<9 && winning(board)==0) {drawboard(); if(player ==1) player =2; else player =1; cout<<"player "<<player<<" please move"<<endl; cin>>move; board[move-1]=c[player-1]; {if(winning(board) == 1) {cout<<"player "<<player<<" wins."<<endl; return 0; }}} else if(i==9&&winning(board)==0) cout<<"CAT game"<<endl; else cin.get(); } }
|
# ? Dec 12, 2010 22:29 |
|
|
# ? Jun 4, 2024 02:27 |
|
Step 1: Use the [code] tags.
|
# ? Dec 12, 2010 23:15 |