Search Results

Search found 2579 results on 104 pages for 'mike t'.

Page 56/104 | < Previous Page | 52 53 54 55 56 57 58 59 60 61 62 63  | Next Page >

  • use bouncy castle to create public key on j2me

    - by mike
    I got the public key from the certificate, keypair is a java.security.KeyPair object String public_key = keypair.getPublic().toString(); I want to send this to the via an http connection to a J2me application. I cannot find any documentation to convert the transmitted string to a Public key that can be used to encrypt Strings. I also want the J2me to verify signed strings from the server. I want to then send the encrypted strings back to the server.

    Read the article

  • Android ScrollView jumps around when setting child visibility to View.GONE

    - by Mike
    I have a ScrollView that contains an number of other views (TextViews, ImageViews, etc.). The ScrollView is taller than the screen. I have an AsyncTask that updates the children of the ScrollView based on an http response. I've discovered an interesting behavior that I can't figure out how to work around. If I set any of the children's visibilities to View.INVISIBLE as part of the AsyncTask.onPostExecute(), everything works fine. However, if I set any of the children's visibilities to View.GONE, the ScrollView jumps down from the top when onPostExecute() is called. Exactly how far seems to vary. I'm guessing that re-laying out the ScrollView is causing it to scroll away from the top for some reason. So the question is: is there a way to either prevent or work around this behavior? PS. Using ScrollView.jump(FOCUS_UP) as a workaround isn't ideal since that'll force the user to the top even if they had intended to scroll down.

    Read the article

  • Why can't I attach the debugger?

    - by Mike
    I'm using Visual Studio 2008 SP1 and trying to debug a website created in ASP Classic. I have read numerous tutorials, however nothing seems to be working (PEBKAC?). I have enabled server-side debugging in IIS and am attaching the debugger to dllhost.exe. When I open my page in Google Chrome, set breakpoints and set VS to debug, nothing happens. I don't get any errors so I'm not sure what else to post. Any ideas? Thank you. :)

    Read the article

  • In XPath how to select the element content

    - by Mike Q
    Hi all, Is there a way of writing an XPath expression to select the content of the element. e.g. <Element>xxx</Element> Assuming I can write XPath (/Element) to get Element how do I tweak the XPath to get xxxx returned rather than the Element wrapper.

    Read the article

  • iphone - using NSInvocation: constant value

    - by Mike
    I am dealing with an old iPhone OS 2.x project and I want to keep compatibility, while designing for 3.x. I am using NSInvocation, is a code like this NSInvocation* invoc = [NSInvocation invocationWithMethodSignature: [cell methodSignatureForSelector: @selector(initWithStyle:reuseIdentifier:)]]; [invoc setTarget:cell]; [invoc setSelector:@selector(initWithStyle:reuseIdentifier:)]; int arg2 = UITableViewCellStyleDefault; //???? [invoc setArgument:&arg2 atIndex:2]; [invoc setArgument:&identificadorNormal atIndex:3]; [invoc invoke]; to call 3.0 APIs on 2.0. I am having a problem on the line I marked with question marks. The problem there is that I am trying to assing to arg2, a constant that has not been defined in OS 2.0. As everything with NSInvocation is to do stuff indirectly to avoid compiler errors, how do I set this constant to a variable in an indirect way? Some sort of performSelector "assign value to variable"... is that possible? thanks for any help.

    Read the article

  • Collaborative Filtering Program: What to do for a Pearson Score When There Isn't Enough Data

    - by Mike
    I'm building a recommendation engine using collaborative filtering. For similarity scores, I use a Pearson correlation. This is great most of the time, but sometimes I have users that only share a 1 or 2 fields. For example: User 1{ a: 4 b: 2 } User 2{ a: 4 b: 3 } Since this is only 2 data points, a Pearson correlation would always be 1 (a straight line or perfect correlation). This obviously isn't what I want, so what value should I use instead? I could just throw away all instances like this (give a correlation of 0), but my data is really sparse right now and I don't want to lose anything. Is there any similarity score I could use that would fit in with the rest of my similarity scores (all Pearson)?

    Read the article

  • Why would this div have an unnecessarily large computed height?

    - by Mike Crittenden
    Link: http://www.fraynepainting.com/services The problem is that div#dditem_2 (the div with the "Take a look..." text) is getting a computed height of around 500px for no reason that I can find in the CSS, which is pushing the UL below it down really really far. I discovered that if you set display: none or position: absolute (or anything else that removes it from the flow of elements) on the sidebar, then the bottom UL moves up like it should, so it looks like maybe the UL is trying to clear the sidebar, but I can't figure out why that would be either. I've reproduced the problem in Firefox and Chrome so far. Any ideas?

    Read the article

  • Are there any libraries to allow Python or Ruby to get info from SVN?

    - by Mike Trpcic
    I'm looking for plugins that will allow my codebase to interact with, browse, and poll an SVN server for information about a repository. Trac can do this, but I was hoping there was an easy-to-use library available to accomplish the task, rather than trolling through the Trac codebase. Googling for this returns mostly vague results about storing your code in and SVN repository, which is far from what I'm looking for.

    Read the article

  • Rails undefined method 'generated_methods' for nil:NilClass

    - by mike
    Okay so I was just starting this rails app and generated my first model ruby script/generate model Grid req:string class:string ctitle:string credits:float grade:string pass:boolean created my table rake db:migrate (in C:/Users/Michael/InstantRails/rails_apps/studentGrid) == CreateGrids: migrating ==================================================== -- create_table(:grids) - 0.0150s == CreateGrids: migrated (0.0150s) =========================================== and went to the console to add some data to my table Grid = Grid(id: integer, req: string, class: string, ctitle: string, credits: float, grade: string, pass: boolean, created_at: datetime, updated_at: datetime) Grid.create(:req="Math Elective", :class="Math 111", :ctitle="Calculus I", :credits=3.0) Pretty standard I thought, but then I get this error and I don't understand why NoMethodError: undefined method 'generated_methods' for nil:NilClass from C:/Users/Michael/InstantRails/ruby/lib/ruby/gems/1.8/gems/activesup port-2.3.5/lib/active_support/whiny_nil.rb:52:inmethod_missing' from C:/Users/Michael/InstantRails/ruby/lib/ruby/gems/1.8/gems/activerec ord-2.3.5/lib/active_record/attribute_methods.rb:352:in respond_to?' from C:/Users/Michael/InstantRails/ruby/lib/ruby/gems/1.8/gems/activerec ord-2.3.5/lib/active_record/base.rb:2746:inattributes=' from C:/Users/Michael/InstantRails/ruby/lib/ruby/gems/1.8/gems/activerec ord-2.3.5/lib/active_record/base.rb:2742:in each' from C:/Users/Michael/InstantRails/ruby/lib/ruby/gems/1.8/gems/activerec ord-2.3.5/lib/active_record/base.rb:2742:inattributes=' from C:/Users/Michael/InstantRails/ruby/lib/ruby/gems/1.8/gems/activerec ord-2.3.5/lib/active_record/base.rb:2438:in initialize' from C:/Users/Michael/InstantRails/ruby/lib/ruby/gems/1.8/gems/activerec ord-2.3.5/lib/active_record/base.rb:721:innew' from C:/Users/Michael/InstantRails/ruby/lib/ruby/gems/1.8/gems/activerec ord-2.3.5/lib/active_record/base.rb:721:in `create' from (irb):2 from :0

    Read the article

  • Perl, array referencing

    - by Mike
    Consider this Perl code my @a=[[1]]; print $a[0][0] . "\n"; **output** ARRAY(0x229e8) Why does it print an Array instead of 1? I would have expected @a to create an array of size 1 with a reference to a second array containing only one element, 1

    Read the article

  • Can't play wav file from Javascript in Firefox for Mac

    - by Mike Royle
    I have the following html file that plays a wav file when the user hovers over the 'Play' anchor tag. It works perfectly on IE, Chrome, Firefox, Opera, Safari on both Windows and Mac - except for Firefox on the Mac which does not play the file. <html> <head> <title></title> <script> function PlayAudio() { var s = document.getElementById("soundFile"); s.Play(); } </script> </head> <body> <embed src="MySound.wav" enablejavascript="true" type="audio/wav" autostart="false" width="0" height="0" id="soundFile" /> <a href="#" onmouseover="PlayAudio()">Play</a> </body> </html> If the autostart attribute of the embed tag is set to true then the wav file plays as expected in Firefox for Mac, but not on the mouseover of the anchor tag. Any ideas?

    Read the article

  • Global Timer in Javascript with Multiple Callbacks

    - by Mike Beepo
    I want to create a global timer object in javascript and then be able to add callbacks to it on the fly. This way I can just use one global timer in my script to execute all actions at a certain interval rather than wasting resources by using multiples. This is how I want to be able to piece things together: var timer = new function() { clearInterval( this.interval ); //[1] At this point I want the Callbacks to be run var self = this; setTimeout(function() {self.timer()}, 200); } function otherObject = new function() { //When created I want to bind my object's function called cb to the global timer at [1] } otherObject.prototype.cb = function() { //Stuff that should be done every time the timer is run } var someObject = new otherObject(); How would I make it possible bind any number functions (most of which are functions within other objects) to run at the interval of my timer on the fly?

    Read the article

  • forwarding a notification to another class

    - by Mike
    I am using this method - (void)keyboardWillShow:(NSNotification *)notification that is triggered when the keyboard shows. When this method is triggered, it receives a notification that contains several parameters about the keyboard, as the animation duration, animation curve and frame. I need to forward this notification and all its parameters to another class. So, I've tried to do this inside keyboardWillShow: [[NSNotificationCenter defaultCenter] postNotificationName:@"doSomething" object:notification userInfo:nil]; the doSomething notification runs doSomething method on another class, and it has this form: - (void) doSomething:(NSNotification *)notification { but when I try to read the notification values on this other class, using, for example, myRect = [[[notification userInfo] objectForKey:UIKeyboardFrameEndUserInfoKey] CGRectValue]; I obtain zero for all values. The notification is losing its parameters and not being forwarded. How can I do that? thanks.

    Read the article

  • Neural Network: Handling unavailable inputs (missing or incomplete data)

    - by Mike
    Hopefully the last NN question you'll get from me this weekend, but here goes :) Is there a way to handle an input that you "don't always know"... so it doesn't affect the weightings somehow? Soo... if I ask someone if they are male or female and they would not like to answer, is there a way to disregard this input? Perhaps by placing it squarely in the centre? (assuming 1,0 inputs at 0.5?) Thanks

    Read the article

  • GLib Hash Table - Pointer

    - by Mike
    I'm trying to increment the value of some specific key if it was found. For some reason I keep getting the (pointer) address when I dump all keys:values from the hash table. Output a: 153654132 // should be 5 b: 1 c: 153654276 // should be 3 d: 1 e: 1 f: 153654420 // should be 3 int proc() { struct st stu; gpointer ok, ov; //... some non-related code here if(!g_hash_table_lookup_extended(table, key, &ok, &ov)){ stu.my_int = g_malloc(sizeof(guint)); *(stu.my_int) = 0; g_hash_table_insert(table, g_strdup(key), GINT_TO_POINTER(1)); }else{ stu.my_int = g_malloc(sizeof(guint)); *(stu.my_int)++; g_hash_table_insert(table, g_strdup(key), stu.my_int); } } Any ideas will be appreciate it.

    Read the article

  • GLib Hash Table - Pointer

    - by Mike
    I'm trying to increment the value of some specific key if it was found. For some reason I keep getting the (pointer) address when I dump all keys:values from the hash table. Output a: 153654132 // should be 5 b: 1 c: 153654276 // should be 3 d: 1 e: 1 f: 153654420 // should be 3 int proc() { struct st stu; gpointer ok, ov; //... some non-related code here if(!g_hash_table_lookup_extended(ht, key, &ok, &ov)){ stu.my_int = g_malloc(sizeof(guint)); *(stu.my_int) = 0; g_hash_table_insert(table, g_strdup(key), GINT_TO_POINTER(1)); }else{ stu.my_int = g_malloc(sizeof(guint)); *(stu.my_int)++; g_hash_table_insert(table, g_strdup(key), stu.my_int); } } Any ideas will be appreciate it.

    Read the article

  • Some special characters defined in "ISO-8859-1" can't be shown when encoding with "UTF-8"

    - by Mike.Huang
    I need to get a string from URL request of brower, and then create a text image by requested text. I know the default encoding of the Java net transmission is "ISO-8859-1", it can works normally with all characters what defined in "ISO-8859-1". But when I request a multi-byte Unicode character (e.g. chinese or something like ¤?), then I need to decode it by "UTF-8" from "ISO-8859-1". My codes like: String reslut = new String(requestString.getBytes("ISO-8859-1"), "UTF-8"); Everything is fine, but I found some characters in ISO-8859-1 are not been shown now, which characters are 0x80 - 0xFF(defined in" ISO-8859-1"), i.e. the characters after 0x80 (in "ISO-8859-1") not been shown when converted to "UTF-8" from "ISO-8859-1". Any other method can solve this query?

    Read the article

  • REST for ASP.NET MVC included in MVC 2?

    - by Mike Hodnick
    Are the REST for ASP.NET MVC bits automatically included with MVC 2, or do you need to download/install/use the REST for ASP.NET MVC bits separately? Specifically, I'm referring to the REST for ASP.NET MVC download here: http://aspnet.codeplex.com/releases/view/24471#DownloadId=79561 I want to use REST for ASP.NET MVC for the automatic json/xml serialization based on the incoming request's accepted content type. I'm not really finding any info about MVC2's ability to do this out of the "box".

    Read the article

  • NameError: uninitialized constant Nokogiri::HTML::DocumentFragment

    - by Mike Sutton
    About three hours ago I started seeing the above error in my production server. It comes from a call to the sanitize gem: vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:276:in 'load_missing_constant' vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:468:in `const_missing' vendor/gems/sanitize-1.2.0/lib/sanitize.rb:91:in `clean!' vendor/gems/sanitize-1.2.0/lib/sanitize.rb:84:in `clean' vendor/gems/sanitize-1.2.0/lib/sanitize.rb:49:in `clean' app/helpers/application_helper.rb:28:in `display_none' app/views/main/_blogs.html.erb:13:in `_run_erb_47app47views47main47_blogs46html46erb' The error only occurs on the production server (linux), not my development machine (windows) I tried rolling back my latest deployment but it didn't fix it. I've updated to sanitize 1.2.0 (which was the latest version brought down by gem update sanitize, though I note my host is running 1.3.6. Can anyone provide any clues to help fix this?

    Read the article

  • How do I convert integers to characters in C#?

    - by Mike Webb
    I am trying to convert an index of 1 to 27 into the corresponding uppercase letter. I know that in C++ I could type this: char letter = 'A' + (char)(myIndex % 27); This same code does not work in C#. How can I accomplish this task in C#? EDIT: I'd rather not have to encode an enum or switch statement for this if there is a better mathematical solution like the one above.

    Read the article

  • Syncing two separate structures to the same master data

    - by Mike Burton
    I've got multiple structures to maintain in my application. All link to the same records, and one of them could be considered the "master" in that it reflects actual relationships held in files on disk. The other structures are used to "call out" elements of the main design for purchase and work orders. I'm struggling to come up with a pattern that deals appropriately with changes to the master data. As an example, the following trees might refer to the same data: A |_ B |_ C |_ D |_ E |_ B |_ C |_ D A |_ B E C |_ D A |_ B C D E These secondary structures follow internal rules, but their overall structure is usually user-determined. In all cases (including the master), any element can be used in multiple locations and in multiple trees. When I add a child to any element in the tree, I want to either automatically build the secondary structure for each instance of the "master" element or at least advertise the situation to the user and allow them to manually generate the data required for the secondary trees. Is there any pattern which might apply to this situation? I've been treating it as a view problem, but it turns out to be more complicated than that when you look at the initial generation of the data.

    Read the article

  • C# switch: case not falling through to other cases limitation

    - by Mike Fielden
    This question is kind of an add-on to this question In C#, a switch case cannot fall through to other cases, this causes a compilation error. In this case I am just adding some number to the month total for the selected month and each subsequent month thereafter. (simple example, not meant to be real) switch (month) { case 0: add something to month totals case 1: add something to month totals case 2: add something to month totals default: break; } Is there a logical alternative to this in C# without having to write out a ton of if statements? if (month <= 0) add something to month if (month <= 1) add something to month if (month <= 2) add something to month .... etc

    Read the article

  • Database access through collections

    - by Mike
    Hi All, I have an 3 tiered application where I need to get database results and populated the UI. I have a MessagesCollection class that deals with messages. I load my user from the database. On the instantiation of a user (ie. new User()), a MessageCollection Messages = new MessageCollection(this) is performed. Message collection accepts a user as a parameter. User user = user.LoadUser("bob"); I want to get the messages for Bob. user.Messages.GetUnreadMessages(); GetUnreadMessages calls my Business Data provider which in turn calls the data access layer. The Business data provider returns List. My question is - I am not sure what the best practice is here - If I have a collection of messages in an array inside the MessagesCollection class, I could implement ICollection to provide GetEnumerator() and ability to traverse the messages. But what happens if the messages change and the the user has old messages loaded? What about big message collections? What if my user had 10,000 unread messages? I don't think accessing the database and returning 10,000 Message objects would be efficient.

    Read the article

  • IE is ignoring Z-Index on positioned elements

    - by Mike
    IE yet again is proving to be the bane of my existence. The top of a site I'm working on has a horizontal menu, an item of which triggers a pure-CSS menu that is positioned absolute within the parent menu DIV (positioned relative). This places the menu perfectly in both IE and the W3C compliant browsers. The problem arises when I have more positioned elements further down on the page. These are also positioned relative, because there is data inside them that needs to be positioned absolute... again, this displays properly in all browsers I've tested it on. The problem is, that then the top menu is opened, part is obscured by the positioned elements further down the page - in effect, it's positioned BELOW these elements even though there are z-index properties defined on all. (in both the CSS file and inline). The only way to get IE to display this properly is to place the actual HTML for the menu at the bottom of the page, below (in DOM terms) the positioned elements elsewhere on the page. I would only do this as an absolute last resort. All Elements are the same type (div). Here is the relevant HTML: <div id='menu'> <div id='cat_menu' style='display:none;z-index:10000;'> <table cellspacing='0' cellpadding='0' class='brmenu' width='100%'> [data] </table> </div> <div class='product_new' style='z-index:20;'>[data]</div> <div class='product_listing' style='background-color:#FFFFFF;'>[data]</div> And the relevant CSS: div#menu { height: 26px; padding: 0; position: relative; } div#cat_menu { position: absolute; top: 25px; left: 115px; width: 300px; z-index: 1000; } div.product_new { background-image: url("/images/sp_images.png"); background-position: 0 -108px; background-repeat: no-repeat; padding 0px; height: 40px; font-size: 9pt; margin-top: 5px; position: relative; z-index: 20; }

    Read the article

  • I need information about Informatica

    - by Mike
    I need some information about the Informatica ETL tool. I am a rookie with that, so could you please recommend where can I get some tutorials to get started. Can I download the tool, and if so where can I download it? What are the alternatives to Informatica?

    Read the article

< Previous Page | 52 53 54 55 56 57 58 59 60 61 62 63  | Next Page >