Search Results

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

Page 78/104 | < Previous Page | 74 75 76 77 78 79 80 81 82 83 84 85  | Next Page >

  • python send/receive hex data via TCP socket

    - by Mike
    I have a ethenet access control device that is said to be able to communicate via TCP. How can i send a pachet by entering the HEX data, since this is what i have from their manual (a standard format for the communication packets sent and received after each command)

    Read the article

  • Creating mock Objects in PHP unit

    - by Mike
    Hi, I've searched but can't quite find what I'm looking for and the manual isn't much help in this respect. I'm fairly new to unit testing, so not sure if I'm on the right track at all. Anyway, onto the question. I have a class: <?php class testClass { public function doSomething($array_of_stuff) { return AnotherClass::returnRandomElement($array_of_stuff); } } ?> Now, clearly I want the AnotherClass::returnRandomElement($array_of_stuff); to return the same thing every time. My question is, in my unit test, how do I mockup this object? I've tried adding the AnotherClass to the top of the test file, but when I want to test AnotherClass I get the "Cannot redeclare class" error. I think I understand factory classes, but I'm not sure how I would apply that in this instance. Would I need to write an entirely seperate AnotherClass class which contained test data and then use the Factory class to load that instead of the real AnotherClass? Or is using the Factory pattern just a red herring. I tried this: $RedirectUtils_stub = $this->getMockForAbstractClass('RedirectUtils'); $o1 = new stdClass(); $o1->id = 2; $o1->test_id = 2; $o1->weight = 60; $o1->data = "http://www.google.com/?ffdfd=fdfdfdfd?route=1"; $RedirectUtils_stub->expects($this->any()) ->method('chooseRandomRoot') ->will($this->returnValue($o1)); $RedirectUtils_stub->expects($this->any()) ->method('decodeQueryString') ->will($this->returnValue(array())); in the setUp() function, but these stubs are ignored and I can't work out whether it's something I'm doing wrong, or the way I'm accessing the AnotherClass methods. Help! This is driving me nuts.

    Read the article

  • Problems getting PowerPoint Combobox to list items correctly

    - by mike toyn
    I am creating a PowerPoint in which I want users to be able to select an item from a list in a combo box. Nothing needs to happen after this, it is just to provide a record, on screen, of their choice. My problem is that I seem to either be able to populate the combo box and users can select an item but the list gets longer each time the combobox is clicked on (i.e each time it is clicked on the list gets duplicated). Or alternatively, I can clear the combo box, then populate it but in this scenario, the users choice also seems to get cleared. VBA example 1: Private Sub ComboBox1_DropButtonClick() With ComboBox1 .AddItem " ", 0 .AddItem "speed", 1 .AddItem "provisionality", 2 .AddItem "automation", 3 .AddItem "replication", 4 .AddItem "communicability", 5 .AddItem "multi-modality", 6 .AddItem "non-linearity", 7 .AddItem "capacity", 8 .AddItem "interactivity", 9 End With End Sub VBA example 2: Private Sub ComboBox1_DropButtonClick() ComboBox1.Clear With ComboBox1 .AddItem " ", 0 .AddItem "speed", 1 .AddItem "provisionality", 2 .AddItem "automation", 3 .AddItem "replication", 4 .AddItem "communicability", 5 .AddItem "multi-modality", 6 .AddItem "non-linearity", 7 .AddItem "capacity", 8 .AddItem "interactivity", 9 End With End Sub Can anyone help?

    Read the article

  • Which PHP framework is closest to Ruby on Rails? CakePHP? CodeIgniter?

    - by Mike Duncan
    I'm going to be switching back and forth between Ruby on Rails projects and some as-of-yet undecided PHP MVC framework projects. Which of the PHP MVC frameworks out there (CakePHP, CodeIgniter?, others?) is most similar to Ruby on Rails in that the most conventions, locations, workflows, etc are preserved? I'm looking for the similarity in the way things are done such as directory structures, conventions, etc, not a pros vs cons in speed, extra features, etc.

    Read the article

  • Linq grouping question

    - by Mike C.
    I have the following objects in a collection: Transaction: Type = "Widget" Date = "3/1/2011" Name = "Foo" Transaction: Type = "Widget" Date = "3/4/2011" Name = "Bar" Transaction: Type = "Gadget" Date = "3/2/2011" Name = "Baz" Transaction: Type = "Gizmo" Date = "3/1/2011" Name = "Who" Transaction: Type = "Gizmo" Date = "3/2/2011" Name = "What" Transaction: Type = "Gizmo" Date = "3/6/2011" Name = "When" I want to end up with the following, grouped by Type. If there are multiple, return only the first one chronologically by date. Transaction: Type = "Widget" Date = "3/1/2011" Name = "Foo" Transaction: Type = "Gadget" Date = "3/2/2011" Name = "Baz" Transaction: Type = "Gizmo" Date = "3/1/2011" Name = "Who"

    Read the article

  • JavaScript: Changing src-attribute of a embed-tag

    - by Mike
    I have the following scenario. I show the user some audio files from the server. The user clicks on one, then onFileSelected is eventually executed with both the selected folder and file. What the function does is change the source from the embedded object. So in a way, it is a preview of the selected file before accepting it and save the user's choice. A visual aid. HTML <embed src="/resources/audio/_webbook_0001/embed_test.mp3" type="audio/mpeg" id="audio_file"> JavaScript function onFileSelected(file, directory) { jQuery('embed#audio_file').attr('src', '/resources/audio/'+directory+'/'+file); }; Now, this works fine in Firefox, but Safari and Chrome simply refuse to change the source, regardless of Operating System. jQuery finds the object (jQuery.size() returns 1), it executes the code, but no change in the HTML Code. Why does Safari prevent me from changing the <embed> source and how can I circumvent this?

    Read the article

  • Batch convert Malformed PDFs to TIF on Linux

    - by Mike Driscoll
    I need to convert a multipage PDF to TIF, but it appears to be a malformed PDF provided by our client. I tried using ImageMagick and GhostScript, but they do not convert the file correctly. The result is only about 85-90% correct. The only thing I've found that appears to do the job is GIMP, but I can't find an example to use it via its Batch Processing methods for PDFs. Here are the warnings I get from ImageMagick and GhostScript: **** Warning: Tf refers to an unknown resource name: FORMS$.f Assuming it's a font name. **** Warning: Tf refers to an unknown resource name: P06BOB.f Assuming it's a font name. **** Warning: Tf refers to an unknown resource name: UN308E.f Assuming it's a font name. **** Warning: Tf refers to an unknown resource name: P06BOB.f Assuming it's a font name. **** Warning: Tf refers to an unknown resource name: UN308E.f Assuming it's a font name. **** Warning: Tf refers to an unknown resource name: P06BOB.f Assuming it's a font name. **** Warning: Tf refers to an unknown resource name: UN308E.f Assuming it's a font name. **** Warning: Tf refers to an unknown resource name: UN307A.f Assuming it's a font name. **** Warning: Tf refers to an unknown resource name: UN104A.f Assuming it's a font name. **** Warning: Tf refers to an unknown resource name: UN308E.f Assuming it's a font name. **** Warning: Tf refers to an unknown resource name: UN208E.f Assuming it's a font name. **** Warning: Tf refers to an unknown resource name: UN308E.f Assuming it's a font name. **** Warning: Tf refers to an unknown resource name: UN208E.f Assuming it's a font name. **** Warning: Tf refers to an unknown resource name: HE14BP.f Assuming it's a font name. **** Warning: Tf refers to an unknown resource name: UN208E.f Assuming it's a font name. **** Warning: Tf refers to an unknown resource name: UN106E.f Assuming it's a font name. **** Warning: Tf refers to an unknown resource name: UN208E.f Assuming it's a font name. **** Warning: Tf refers to an unknown resource name: UN106E.f Assuming it's a font name. **** Warning: Tf refers to an unknown resource name: UN208E.f Assuming it's a font name. **** Warning: Tf refers to an unknown resource name: HE08BP.f Assuming it's a font name. **** Warning: Tf refers to an unknown resource name: HE11BP.f Assuming it's a font name. **** Warning: Tf refers to an unknown resource name: AR10NP.f Assuming it's a font name. **** Warning: Tf refers to an unknown resource name: UN308E.f Assuming it's a font name. **** Warning: Tf refers to an unknown resource name: JIMP2.l Assuming it's a font name. **** Warning: Tf refers to an unknown resource name: HS11C.l Assuming it's a font name. **** Warning: Tf refers to an unknown resource name: FORMS$.f Assuming it's a font name. **** Warning: Tf refers to an unknown resource name: UN104A.f Assuming it's a font name. **** Warning: Tf refers to an unknown resource name: UN208E.f Assuming it's a font name. **** Warning: Tf refers to an unknown resource name: UN307E.f Assuming it's a font name. **** This file had errors that were repaired or ignored. **** Please notify the author of the software that produced this **** file that it does not conform to Adobe's published PDF **** specification. I'm open to other suggestions too. Thanks!

    Read the article

  • How to get iPhones current orientation?

    - by Mike Rychev
    Is there a special method to get iPhones orientation? I don't need it in degrees or radians, I want it to return an UIInterfaceOrientation object. I just need it for an if-else construction like if(currentOrientation==UIInterfaceOrientationPortrait ||currentOrientation==UIInterfaceOrientationPortraitUpsideDown) { //Code } if (currentOrientation==UIInterfaceOrientationLandscapeRight ||currentOrientation==UIInterfaceOrientationLandscapeLeft ) { //Code } Thanks in advance!

    Read the article

  • YUI Image Loader Images Above Fold Not Loading Until Scroll event.

    - by Mike
    I have a function that is called on the window.onload event to create a group of images and render via the scroll event. function LoadImages(){ var foldGroup = new YAHOO.util.ImageLoader.group(window, 'scroll'); for(var i=0; i<someCounter; i++){ var locationId = locationsArr[i]; foldGroup.registerSrcImage('Location_' + locationId, GetImageDomain()+'/templates/Includes/imagehandler.ashx?locationId=' + locationid); } foldGroup.foldConditional = true; foldGroup.addTrigger(window, 'resize'); } The problem I'm having is that when the page loads, the images "above the fold" are not rendered until I scroll. Is there any tips on troubleshooting this? I'm totally not a js/frontend guy :) Thanks in advance!

    Read the article

  • How should I generate HTML to represent class and its properties?

    - by Mike
    Currently I have a class that represents a document. This document needs to be displayed as HTML. I would like to have a method to call such as GetHTML() that would then call GetHTML() on any properties/sections of the document that needed to be rendered. I was initially thinking about using linq and XElement but am wondering if that may cause issues with certain tags in HTML. Would I better off using an HtmlTextWriter? I am open to any suggestions or best practives for this situation. Thanks!

    Read the article

  • Separate Datasource for Gridview Footer

    - by Mike Keller
    I need to able to display the results from a seperate query in the footer of a gridview. What is the best way to go about this? I did some google searches and what I found pretty much revolves using the original datasource and doing something like addition to display the information in the footer. However I really need to be able to display this single line of information from a seperate query. Any direction given would be appreciated. Links, tips, tricks, etc. Thanks.

    Read the article

  • Text Editor for comments

    - by Mike Silvis
    I am using the CKEditor for my website along with PHP, and want to allow only <b>, <i>, <a>, and <img> tags. This is easy, however our problem is that a user could essentially add a <b> tag some where and then not close it resulting in all of the comments thereafter and the rest of that page being bolded. How do we check and make sure that whatever tag is opened is now closed?

    Read the article

  • When a tech document states that something is IP-Aware was does that specifically mean?

    - by Mike
    I need a class room definition for IP-aware for a research assignment. I.E. something that would be used, lets say, in a dictionary. Does anyone know or provide me with a link to a defintiion, I am having no luck with searches. Are IP-Aware devices only devices that can read/find/make decisions based on IP addresses. For example a router would be one, but a network printer would not?

    Read the article

  • Cannot debug tests using Resharper

    - by Mike
    Hi, I'm not able to debug my tests using Resharper-Debug option in my project. I have seen this issue raised by lots of people, but has't come across a solid suggestion which solves my issue. The strange thing is that, if I create a sample project and write a simple unit test, I'm able to debug it without any issues.However when I try to do this in my current project, it simply throws a dialog box saying "Cannot Launch Debugger".I have checked this with my peers, and they does't face this issue :( Also I don't have any issues while running the test. It's an XP machine and following is the version of resharper: JetBrains ReSharper 5.1 C# Edition Build 5.1.1753.4 on 2010-10-15T15:51:30 Licensed to: XXXXXXX Plugins: none. Visual Studio 9.0.21022.8. Copyright © 2003–2011 JetBrains s.r.o.. All rights reserved. Thanks, -M

    Read the article

  • php/mysql append state to city

    - by mike
    Hello, Having a hard time figuring out the best way to do this... I have a search function that takes "search terms" and "search location". In the location input, I have an suggestion feature that brings up "city, state abbreviation" but it seems some users just do not use it(or can't) so they end up entering just a city name... I need to append the state abbreviation after the form is submitted. I have a table with all city and state names in the U.S. but the problem is... there are multiple cities with the same name in different states... I would like to add the state abbreviation for the state that the city is most popular for(does that make sense?). For example, if the user enters "Miami" I would like it to become "Miami, FL" as opposed to "Miami, WV"... Any ideas? Thanks!

    Read the article

  • Doxygen with C# internal access modifier

    - by Mike Gates
    I am using Doxygen to generate some API docs for a C# project I am working on. I have quite a bit of "internal" functionality in this project and don't want Doxygen producing these signatures in the generated html it produces. I have tried enabling HIDE_FRIEND_COMPOUNDS but this still results in my internal classes being exposed in the generated documentation. Does anyone know how to do this?

    Read the article

  • setCursor on container without it changing cursor of sub components

    - by Mike
    JPanel panel = new JPanel(null); panel.setSize(400, 400); panel.add(new JButton("Test")); panel.setCursor(Cursor.getCursor(Cursor.SOMETHING_SOMETHING_CURSOR)); The panel will have a custom cursor, but I don't want the button to have a custom cursor. I don't want to have to set the cursor of every sub component, because in my application I have many and I don't want to litter the code with setCursor statements. Is there a way, like overriding a method on the JPanel or something? A "contains" method somewhere is used to determine if a cursor needs to be set. Could I fool it into thinking the mouse is not in the container if it's really in a sub component? Any other nifty little trick?

    Read the article

  • any simple jquery <table> paginators

    - by Mike
    I'm looking for a jquery plugin so I can paginate my html tables (the content of which is generated by a jsp c:forEach). But so far I haven't found anything that worked. The plugin doesn't need to be fancy, in fact something like the first example on http://dl.dropbox.com/u/4151695/html/pajinate-0.2/examples/example1.html would do fine. I'm still very new to jquery so I don't have the knowledge yet to write one myself. So does anyone have any pointers where I could find one?

    Read the article

  • Detect at runtime which country's App Store my iPhone app was downloaded from?

    - by Mike McMaster
    I have a feature in my iPhone application that, for business reasons, should only be shown/available to customers in the US. If I want to release this app to App Stores outside the US, what's the best way to figure out which country I'm in without relying on user-defined settings such as language and locale? In my mind, the ideal solution is that there's some runtime property that can tell me which App Store country the app was downloaded from, and I can take action accordingly. Looking through the docs and searching the web, I'm not coming up with anything in this department. I don't expect the solution to be 100% foolproof as far as users not being in the country they say they're from, but as close as possible would be nice. I suppose one solution would be to make a separate build for a new product on the App Store and have two versions, one for the US and one for the others, but that doesn't seem ideal. I'm hoping it can be the same product on the App Store to prevent things like fragmentation of user reviews. Thanks in advance!

    Read the article

  • update portlet without refreshing portal page

    - by mike
    I'm trying to create a simple agena portlet. Now I've developed a basic one using spring-portlet-mvc, it allows you to navigate to the next and previous month with thusly named links that invoke a previousMonth or nextMonth function in my controller. Now the problem I'm having is that this navigation causes my whole page to refresh. Now I was wondering what the best way to fix this was. I've been looking around a bit and it looks like jquery/ajax will do the trick, but since I don't have any experience yet with that technology I was wondering if anyone had any pointers/better ideas to solve my problem.

    Read the article

< Previous Page | 74 75 76 77 78 79 80 81 82 83 84 85  | Next Page >