Search Results

Search found 600 results on 24 pages for 'aaron levin'.

Page 17/24 | < Previous Page | 13 14 15 16 17 18 19 20 21 22 23 24  | Next Page >

  • open source gossip-based membership protocol?

    - by Aaron
    I am looking for a library which I can plug into a distributed application which implements any gossip-based membership protocol. Such a library would allow me to send/receive membership lists, merge received membership lists, etc... Even better would be if the library implemented a protocol with performance O(logn) performance guarantees. Does anyone know of any open source library like this? It doesn't need to meet all of the aforementioned requirements; even something partially implemented would be helpful.

    Read the article

  • ISO/IEC Website and Charging for C and C++ Standards

    - by Michael Aaron Safyan
    The ISO C Standard (ISO/IEC 9899) and the ISO C++ Standard (ISO/IEC 14882) are not published online; instead, one must purchase the PDF for each of those standards. I am wondering what the rationale is behind this... is it not detrimental to both the C and C++ programming languages that the authoritative specification for these languages is not made freely available and searchable online? Doesn't this encourage the use of possibly inaccurate, non-authoritative sources for information regarding these standards? While I understand that much time and effort has gone into developing the C and C++ standards, I am still somewhat puzzled by the choice to charge for the specification. The OpenGroup Base Specification, for example, is available for free online; they make money buy charging for certification. Does anyone know why the ISO standards committees don't make their revenue in certifying standards compliance, instead of charging for these documents? Also, does anyone know if the ISO standards committee's atrociously looking website is intentionally made to look that way? It's as if they don't want people visiting and buying the spec. One last thing... the C and C++ standards are generally described as "open standards"... while I realize that this means that anyone is permitted to implement the standard, should that definition of "open" be revised? Charging for the standard rather than making it openly available seems contrary to the spirit of openness. P.S. I do have a copy of the ISO/IEC 9899:1999 and ISO/IEC 14882:2003, so please no remarks about being cheap or anything... although if you are tempted to say such things, you might want to consider the high school, undergraduate, and graduate students who might not have all that much extra cash. Also, you might want to consider the fact that the ISO website is really sketchy and they don't even tell you the cost until you proceed to the checkout... doesn't really encourage one to go and get a copy, now does it?

    Read the article

  • vector<string> or vector<char *>?

    - by Aaron
    Question: What is the difference between: vector<string> and vector<char *>? How would I pass a value of data type: string to a function, that specifically accepts: const char *? For instance: vector<string> args(argv, argv + argc); vector<string>::iterator i; void foo (const char *); //*i I understand using vector<char *>: I'll have to copy the data, as well as the pointer Edit: Thanks for input!

    Read the article

  • For Loop help In a Hash Cracker Homework.

    - by aaron burns
    On the homework I am working on we are making a hash cracker. I am implementing it so as to have my cracker. java call worker.java. Worker.java implements Runnable. Worker is to take the start and end of a list of char, the hash it is to crack, and the max length of the password that made the hash. I know I want to do a loop in run() BUT I cannot think of how I would do it so it would go to the given max pasword length. I have posted the code I have so far. Any directions or areas I should look into.... I thought there was a way to do this with a certain way to write the loop but I don't know or can't find the correct syntax. Oh.. also. In main I divide up so x amount of threads can be chosen and I know that as of write now it only works for an even number of the 40 possible char given. package HashCracker; import java.util.*; import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; public class Cracker { // Array of chars used to produce strings public static final char[] CHARS = "abcdefghijklmnopqrstuvwxyz0123456789.,-!".toCharArray(); public static final int numOfChar=40; /* Given a byte[] array, produces a hex String, such as "234a6f". with 2 chars for each byte in the array. (provided code) */ public static String hexToString(byte[] bytes) { StringBuffer buff = new StringBuffer(); for (int i=0; i<bytes.length; i++) { int val = bytes[i]; val = val & 0xff; // remove higher bits, sign if (val<16) buff.append('0'); // leading 0 buff.append(Integer.toString(val, 16)); } return buff.toString(); } /* Given a string of hex byte values such as "24a26f", creates a byte[] array of those values, one byte value -128..127 for each 2 chars. (provided code) */ public static byte[] hexToArray(String hex) { byte[] result = new byte[hex.length()/2]; for (int i=0; i<hex.length(); i+=2) { result[i/2] = (byte) Integer.parseInt(hex.substring(i, i+2), 16); } return result; } public static void main(String args[]) throws NoSuchAlgorithmException { if(args.length==1)//Hash Maker { //create a byte array , meassage digestand put password into it //and get out a hash value printed to the screen using provided methods. byte[] myByteArray=args[0].getBytes(); MessageDigest hasher=MessageDigest.getInstance("SHA-1"); hasher.update(myByteArray); byte[] digestedByte=hasher.digest(); String hashValue=Cracker.hexToString(digestedByte); System.out.println(hashValue); } else//Hash Cracker { ArrayList<Thread> myRunnables=new ArrayList<Thread>(); int numOfThreads = Integer.parseInt(args[2]); int charPerThread=Cracker.numOfChar/numOfThreads; int start=0; int end=charPerThread-1; for(int i=0; i<numOfThreads; i++) { //creates, stores and starts threads. Runnable tempWorker=new Worker(start, end, args[1], Integer.parseInt(args[1])); Thread temp=new Thread(tempWorker); myRunnables.add(temp); temp.start(); start=end+1; end=end+charPerThread; } } } import java.util.*; public class Worker implements Runnable{ private int charStart; private int charEnd; private String Hash2Crack; private int maxLength; public Worker(int start, int end, String hashValue, int maxPWlength) { charStart=start; charEnd=end; Hash2Crack=hashValue; maxLength=maxPWlength; } public void run() { byte[] myHash2Crack_=Cracker.hexToArray(Hash2Crack); for(int i=charStart; i<charEnd+1; i++) { Cracker.numOfChar[i]////// this is where I am stuck. } } }

    Read the article

  • Nhibernate: Stop it from joining to a table that is not needed

    - by Aaron
    I have two tables (tbArea, tbPost) that relate to the following classes. class Area { int ID string Name ... } class Post { int ID string Title Area Area ... } These two classes map up with Fluent Nhibernate. Below is the post mapping. public class PostMapping : ClassMap<Post> { public PostMapping() { Cache.NonStrictReadWrite(); this.Table("tbPost"); Id(x => x.ID) .Column("PostID") .GeneratedBy .Identity(); References(x => x.Area) .ForeignKey("AreaID") .Column("AreaID"); ... } } Any time I perform a query on the Post table "where AreaID = 1(any AreaId)", nhibernate will join to the area table. (What Nhibernate generates for a query) SELECT post fields , area fields (automatically added) FROM tbPost p LEFT JOIN tbArea a on p.areaid = a.areaid where p.areaid = 1 I have tried setting Area to LazyLoad, to Fetch.Select, ReadOnly, and any other setting on the reference and still it will always join to Area. I am trying to optimize the backend database queries, and since I don't need the area object loaded just filtered I would like to eliminate the unnecessary join to Area each time I Query post. What configurations do I need to change or mappings to get area to still be related to post in my objects, but not query it when I filter on AreaID?

    Read the article

  • How can I render an in-memory UIViewController's view Landscape?

    - by Aaron
    I'm trying to render an in-memory (but not in hierarchy, yet) UIViewController's view into an in-memory image buffer so I can do some interesting transition animations. However, when I render the UIViewController's view into that buffer, it is always rendering as though the controller is in Portrait orientation, no matter the orientation of the rest of the app. How do I clue this controller in? My code in RootViewController looks like this: MyUIViewController* controller = [[MyUIViewController alloc] init]; int width = self.view.frame.size.width; int height = self.view.frame.size.height; int bitmapBytesPerRow = width * 4; unsigned char *offscreenData = calloc(bitmapBytesPerRow * height, sizeof(unsigned char)); CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB(); CGContextRef offscreenContext = CGBitmapContextCreate(offscreenData, width, height, 8, bitmapBytesPerRow, colorSpace, kCGImageAlphaPremultipliedLast); CGContextTranslateCTM(offscreenContext, 0.0f, height); CGContextScaleCTM(offscreenContext, 1.0f, -1.0f); [(CALayer*)[controller.view layer] renderInContext:offscreenContext]; At that point, the offscreen memory buffers contents are portrait-oriented, even when the window is in landscape orientation. Ideas?

    Read the article

  • How to prevent Spell checking code in MS Office?

    - by Aaron
    We use MS Office. Outlook for emails, Word for some documentation and I use OneNote a lot for my own note taking. What bugs me is when I drop some code or use key words or even camel case into these apps the spell checking picks them up and I have red squiggles everywhere. Ignore is pretty much useless, so either I have to turn off Spell Check altogether start adding these to the custom dictionary. What would be good is if I can use the Set Language function to mark a whole block of text to just not be spell checked. Has anyone found a nice solution to this or do you know of a blank dictionary is best to use? I found using "Mohawk" kind of does that... might just use that for now. Maybe create a macro to switch between them.

    Read the article

  • Radio buttons: Replacing the stock round ones with built in android buttons

    - by Aaron Kapitsk
    Hi all, how do I create a group of radio buttons where the buttons look like nice stock android buttons? This is what I have found so far: * The look of radio button can be replaced with 4 drawables. * There is an example of ^^ on the web. This does not work for me. So I have figured out two bad choices: A) Use stock buttons -do the radio logic in java. //Gross B) Render the buttons to drawables set them at runtime //Blah Any ideas are very appreciated. (This is my first question here. Hope it is well formulated.)

    Read the article

  • Accidentally deleted /opt/local/bin without backup. Any help?

    - by Aaron
    Hi all, I'm on a Mac OS X 10.5.8 I was recently uninstalling mysql5 from /opt/local/bin. I typed: rm -rf /opt/local/bin mysql* instead of rm -rf /opt/local/bin/mysql* This deleted my entire /opt/local/bin directory which puts me in a bit of a bind. Is there any way to recover these files? If not, I have a friend that is using a similar set of programs, would it be possible to use the contents of his folder? If I end up needing to re-install everything in this folder, what is the best way to go about doing this? Thanks in advance!

    Read the article

  • Python 2.6, 3 abstract base class misunderstanding

    - by Aaron
    I'm not seeing what I expect when I use ABCMeta and abstractmethod. This works fine in python3: from abc import ABCMeta, abstractmethod class Super(metaclass=ABCMeta): @abstractmethod def method(self): pass a = Super() TypeError: Can't instantiate abstract class Super ... And in 2.6: class Super(): __metaclass__ = ABCMeta @abstractmethod def method(self): pass a = Super() TypeError: Can't instantiate abstract class Super ... They both also work fine (I get the expected exception) if I derive Super from object, in addition to ABCMeta. They both "fail" (no exception raised) if I derive Super from list. I want an abstract base class to be a list but abstract, and concrete in sub classes. Am I doing it wrong, or should I not want this in python?

    Read the article

  • Safari javascript cookie issue

    - by Aaron Moodie
    I've hit a bit of a weird issue in Safari in regards to setting a js cookie. The cookie itself is just a rgb colour value, which gets set using .click(), and is working fine in Chrome and Firefox, yet in Safari the value of the cookie is incomplete, showing up as rgb(193 instead of rgb(193, 184, 76) as the other browsers do. The jQuery function I'm using to set the cookie is: $('.project_link a').click(function() { var link_colour = $(this).css("color"); document.cookie = "colour="+link_colour+";expires=;path=/"; });

    Read the article

  • How to verify a digital signature with openssl

    - by Aaron Carlino
    I'm using a thirdparty credit card processing service (Paybox) that, after a successful transaction, redirects back to the website with a signature in the URL as a security measure to prevent people from manipulating data. It's supposed to prove that the request originated from this service. So my success URL looks something like this: /success.php?signature=[HUGE HASH] I have no idea where to start with verifying this signature. This service does provide a public key, and I assume I need to create a private key, but I don't know much beyond that. I'm pretty good with linux, and I know I'll have to run some openssl commands. I'm writing the verification script in PHP, which also has native openssl() functions. If anyone could please push me in the right direction with some pseudo code, or even functional code, I'd be very grateful. Thanks.

    Read the article

  • WYSIWYG text editor in Java

    - by Aaron Digulla
    I'd like to collect all WYSIWYG text editors for Java here. Some rules for entries: There must be a link to the project/product You must state whether it's open source or commercial Is it possible to extend the editor (add new features like a "violet centered sudoku")? Is that simple or complex? Does it come with lots of features (fancy character and paragraph styles with online spell checking for several languages in the same document) or just the basics (bold, italics, no underline)? List important dependencies (does it run on bare Java with Swing? SWT? MacOS?) Your personal opinion This list should help developers determine which editor to choose. I'm not looking for "the best" but more "what's there".

    Read the article

  • Arbitrary Form Processing with Drupal

    - by Aaron
    I am writing a module for my organization to cache XML feeds to static files to an arbitrary place on our webserver. I am new at Drupal development, and would like to know if I am approaching this the right way. Basically I: Expose a url via the menu hook, where a user can enter in a an output directory on the webserver and press the "dump" button and then have PHP go to drupal and get the feed xml. I don't need help with that functionality, because I actually have a prototype working in Python (outside of Drupal).. Provide a callback for the form where I can do my logic, using the form parameters. Here's the menu hook: function ncbi_cache_files_menu() { $items = array(); $items['admin/content/ncbi_cache_files'] = array( 'title' => 'NCBI Cache File Module', 'description' => 'Cache Guide static content to files', 'page callback' => 'drupal_get_form', 'page arguments' => array( 'ncbi_cache_files_show_submit'), 'access arguments' => array( 'administer site configuration' ), 'type' => MENU_NORMAL_ITEM, ); return $items; } I generate the form in: function ncbi_cache_files_show_submit() { $DEFAULT_OUT = 'http://myorg/foo'; $form[ 'ncbi_cache_files' ] = array( '#type' => 'textfield', '#title' => t('Output Directory'), '#description' => t('Where you want the static files to be dumped. This should be a directory that www has write access to, and should be accessible from the foo server'), '#default_value' => t( $DEFAULT_OUT ), '#size' => strlen( $DEFAULT_OUT ) + 5, ); $form['dump'] = array( '#type' => 'submit', '#value' => 'Dump', '#submit' => array( 'ncbi_cache_files_dump'), ); return system_settings_form( $form ); } Then the functionality is in the callback: function ncbi_cache_files_dump( $p, $q) { //dpm( get_defined_vars() ); $outdir = $p['ncbi_cache_files']['#post']['ncbi_cache_files']; drupal_set_message('outdir: ' . $outdir ); } The question: Is this a decent way of processing an arbitrary form in Drupal? I not really need to listen for any drupal hooks, because I am basically just doing some URL and file processing. What are those arguments that I'm getting in the callback ($q)? That's the form array I guess, with the post values? Is this the best way to get the form parameters to work on? Thanks for any advice.

    Read the article

  • How can I add my application to Tomcat in Eclipse?

    - by Aaron
    I have a web app built with Maven. Most of the time, I built the application using Intellij IDEA, but now I want to import the application in Eclipse to see something in this IDE. After mvn eclipse:eclipse, I add in Eclipse the app, but when I try to add the app to the server (tomcat), I receive: There are no resources that can be added or removed from the server Solutions?

    Read the article

  • Different background colors for the top and bottom of a UITableView

    - by Aaron Brethorst
    If you look at your Inbox in iPhone OS 3.0's Mail app, you'll see that swiping down displays a grayish background color above the UISearchBar. Now, if you scroll down to the bottom of the table, you'll see that the background color at that end is white. I can think of a couple ways of solving this problem, but they're pretty hacky: Change the table view's background color depending on the current scrollOffset by overriding -scrollViewDidScroll: Give the UITableView a clear background color and then set its superview's backgroundColor to a gradient pattern image. Does anyone know what the "best practice" solution is for this problem? thanks.

    Read the article

  • Determine branch of origin from bzr blame

    - by Dave Aaron Smith
    I had a complicated change that affected a bunch of files. I don't remember what bazaar branch I wrote that change in. We have a somewhat complicated merge setup, so the branch I'm in now lumps that change in with a lot of other changes. I'd like to do some very similar work so it would be nice to pull the original diff. I feel like I should be able to use bzr blame. I run this command on one of the files bzr blame --long path/to/file and I find one of the pertinent lines and get something like 1107.6.213 dsmith@satie 20091202 | tinyMCE.init({ Can I use that to figure out what branch and revision the original change came from? What do the 6 and 213 stand for?

    Read the article

  • jQuery pagination without all the rows of data before hand

    - by Aaron Mc Adam
    Hi guys, I'm trying to find a solution for paginating my search results. I have a built the links and everything works without jQuery. I've also got AJAX working for the links, but I just need a way of tidying up the list of links, as some search results return up to 60 pages and the links spread to two rows in my template. I am searching the Amazon API, and can only return 10 results at a time. Upon clicking the pagination links, the next 10 results are returned. I have access to the total results number from the XML, but not all the data at once, so I can't put all the data into a "hiddenResults" div that the jQuery Pagination plugin needs. Here is the jQuery I have for the pagination: var $pagination = $("#pagination ul"); $pagination.delegate('.pagenumbers', 'click', function() { var $$this = $(this); $$this.closest('li').addClass('cached'); $pagination.find("#currentPage").removeAttr('id').wrapInner($('<a>', {'class':'pagenumbers', 'href':'book_data.php?keywords='+keywords})); $$this.closest('li').attr('id','currentPage').html( $$this.text() ); $.ajax({ type : "GET", cache : false, url : "book_data.php", data : { keywords : keywords, page : $$this.text() }, success : show_results }); return false; }); function show_results(res) { $("#searchResults").replaceWith($(res).find('#searchResults')).find('table.sortable tbody tr:odd').addClass('odd'); detailPage(); selectForm(); if ( ! ( $pagination.find('li').hasClass('cached') ) ) { $.get("book_data.php", { keywords : keywords, page : ( $pagination.find("#currentPage").text() + 1 ) } ); } }

    Read the article

  • Randomly generate sound from onClick and onShake events?

    - by Aaron
    I've literally looked everywhere on the net and found very little clarification on how to do this. Pretty much, I have 8 sound files laid out in an array.xml file and I need to play a randomly chosen file ONCE per or onClick or onShake. First off, what technique should I use to achieve this? ARRAY-RANDOM- STRING-PLAY? RANDOM INT-PLAY? RANDOM INT-STRING-PLAY? Any kind of direction will help greatly cause I'm almost 3 weeks worth of research into this. *NOTE: MediaPlayer mp = MediaPlayer.create(JelloMan.this, R.raw.sound) ...is what I'm stuck on being you can't replace the "R.raw" part with a string...

    Read the article

  • C++ Singleton Constructor and Destructor

    - by Aaron
    Does it matter if the constructor/destructor implementation is provided in the header file or the source file? For example, which way is preferred and why? Way 1: class Singleton { public: ~Singleton() { } private: Singleton() { } }; Way 2: class Singleton { public: ~Singleton(); private: Singleton(); }; In the source .cc file: Singleton::Singleton() { } Singleton::~Singleton() { } Initially, I have the implementation in a source file, but I was asked to remove it. Does anyone know why?

    Read the article

  • lightweight/portable VCS for server-hopping DBA?

    - by Aaron
    I'm looking for a VCS that'll help me keep all of my work scripts in-sync. Requirements: Portable (as in flash drive, not code-level) Run on Windows XP and Server 2003+ No installation dependencies (Cygwin, perl, Python) I use Mercurial on my work machine for version control of the various T-SQL, ksh, perl, and CMD/BAT scripts that I maintain as a MS SQL Server DBA and Unix sysadmin. So far, hg has worked for my AIX boxes- I mount my home directory as I login, and deal with the repo as if it were local. I haven't been able to find a similar solution for the Windows machines I use. Most of them I do not have Local Admin rights; even if I did, I'd rather not install (and maintain) Python + Mercurial on all of them. I can't get to my home directory on them remotely, which leaves a client running on each machine as the only option. Bonus points for an answer that would let me use a single repo for both the Windows and Unix machines. :) I'm running WinXP, with heavy use of Cygwin and a CrunchBang VM.

    Read the article

  • how to order a group result with Linq?

    - by Aaron
    How can I order the results from "group ... by... into..." statement in linq? For instance: var queryResult = from records in container.tableWhatever where records.Time >= DateTime.Today group records by tableWhatever.tableHeader.UserId into userRecords select new { UserID = userRecords.Key, Records = userRecords }; The query returns records in table "contain.tableWhatever" grouped by "UserId". I want the returned results within each group ordered by time decending. How can I do that? More specific, assume the above query return only one group like the following: {UserID = 1, Records= {name1 5/3/2010_7:10pm; name2 5/3/2010_8:10pm; name3 5/3/2010_9:10pm} } After insert the orderby statement in the above query, the returned results should be like this: {UserID = 1, Records= {name3 5/3/2010_9:10pm; name2 5/3/2010_8:10pm; name1 5/3/2010_7:10pm} } Thanks for help!

    Read the article

< Previous Page | 13 14 15 16 17 18 19 20 21 22 23 24  | Next Page >