Search Results

Search found 3380 results on 136 pages for 'tim b james'.

Page 73/136 | < Previous Page | 69 70 71 72 73 74 75 76 77 78 79 80  | Next Page >

  • C# to Javascript: Custom Event Delegation?

    - by James Simpson
    I'm working on a project in Unity3D with Javascript, and I'm trying to implement the SmartFoxServer API (http://smartfoxserver.com) in Javascript instead of their example C# code. I've gotten most of it converted correctly, but I am still getting an error at runtime with the following line involving delegation to a C# file that is in the API (SFSEvent.cs). C# original: SFSEvent.onConnection += HandleConnection; Javascript (or whatever I've turned it into): SFSEvent.onConnection = Delegate.Combine(HandleConnection); Error: InvalidCastException: Cannot cast from source type to destination type.

    Read the article

  • Generate webservice soap client from wsdl when server using Windows Integrated Authentication

    - by James Black
    There is an SAP server that has some webservices I need to use, so I am trying to use wsimport to generate the client stubs. I don't want to find all the wsdls and schemas that are referenced and modify them to do it locally, as that isn't sustainable, if they service should change. So, how can I use wsimport to fetch a wsdl and generate the client stubs when the server is using Windows Integrated Authentication, where even the wsdl requires credentials.

    Read the article

  • Bitrate Switching in xml playlist not loading video

    - by James Williams
    Using JW Player ver 5.4 and JW Embedder. Plugins are grid by Dabbler and fbit (Facebook). The Bitrate switching is not working. Does work fine for one video with HTML5 Video tag. When more than one video, it only shows the first video pic. Works fine with no bitrate switching. Code - HTML5 <script type="text/javascript" src="jwplayer/jwplayer.js"></script> <video id="container"></div> <script type="text/javascript"> jwplayer("container").setup({ flashplayer: "jwplayer/player.swf", streamer: "rtmp://server/location/", playlistfile: "playlists/playlist.xml", plugins: { grid: { rows: 4, distance: 60, horizontalmargin: 75, verticalmargin: 75 }, fbit: { link: "http://www.domain.com" } }, height: 375, width: 850, dock: true }); </script> XML - ATOM/MEDIA xmlns:jwplayer='http://developer.longtailvideo.com/trac/wiki/FlashFormats' Demostration Playlist Video 1 rtmp rtmp://server/location/ Video 2 rtmp rtmp://server/location/ have tried it with both video and div tags for the container. Div tag just shows a blank video area and a Null exception on Line 1 char 1863, this is probably the jwplayer.js file. XML is larger than this, this is to give you a brief syntax of my code and xml. I have searched for over 6 hrs on both longtail and search engine searches. Thank you in advance.

    Read the article

  • How to create a Facebook-App style notifications custom table?

    - by Tim Büthe
    I want to add a custom table to my iPhone app, that should look and work like the one used in the facebook app showing the notifications. It should contain rows with links in it. The text should be black, while the tap-able parts should appear blue. As a already figured out, labels only have one font, color and so on and you can't mix styles within it, I would have to use different components. The tab-able text parts maybe UIButtons with custom style without any border. I tried different approches to build the custom cell. I used Interface Builder, to layout components, but since the different parts have variable lengths they overlaid each other. I also tried to add instances of UIButton and UILabel as a subview to the cell's contentView as descibed in Apple's tutorial. The problem with this is that: The position and size of the components is fix and set when they get created using "initWithFrame:...". My code in "tableView:cellForRowAtIndexPath:" looks like this: UIButton *usernameButton; UILabel *mainLabel, *secondLabel; UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; if (cell == nil) { // cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease]; cell = [[[UITableViewCell alloc] initWithFrame:CGRectMake(0.0, 0.0, 220.0, 60.0) reuseIdentifier:CellIdentifier] autorelease]; [cell setBackgroundColor: [UIColor yellowColor]]; usernameButton = [[[UIButton alloc] initWithFrame:CGRectMake(0.0, 0.0, 220.0, 15.0)] autorelease]; usernameButton.tag = USERNAME_BUTTON_TAG; // ... format, font etc. usernameButton.autoresizingMask = UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleHeight; [cell.contentView addSubview:usernameButton]; mainLabel = [[[UILabel alloc] initWithFrame:CGRectMake(0.0, 20.0, 220.0, 15.0)] autorelease]; mainLabel.tag = MAINLABEL_TAG; // ... format, font etc. mainLabel.autoresizingMask = UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleHeight; [cell.contentView addSubview:mainLabel]; secondLabel = [[[UILabel alloc] initWithFrame:CGRectMake(0.0, 40.0, 220.0, 15.0)] autorelease]; secondLabel.tag = SECONDLABEL_TAG; // ... format, font etc. secondLabel.autoresizingMask = UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleHeight; [cell.contentView addSubview:secondLabel]; } else { usernameButton = (UIButton *) [cell.contentView viewWithTag:USERNAME_BUTTON_TAG]; mainLabel = (UILabel *)[cell.contentView viewWithTag:MAINLABEL_TAG]; secondLabel = (UILabel *)[cell.contentView viewWithTag:SECONDLABEL_TAG]; } usernameButton.titleLabel.text = @"Peter"; mainLabel.text = @"sent you a message: ..."; secondLabel.text = @"11 minutes ago"; return cell; In a nutshell, I want to add the labels and buttons without a fix position or size, the buttons clickable and the cell height should automatically set according to the content. Here is an example of the cell's content: Peter sent you a message: "Hello! What are you doing?" Peter should be click/tab-able and his message, which has a variable length, should be italic and wrapped if necessary.

    Read the article

  • Class generation on the fly

    - by James P.
    Is it possible to generate subclasses at runtime or while an application is running? If so, how is this achieved and what precautions should be taken to prevent a rogue object wreaking havoc inside an application?

    Read the article

  • FileFinder using SQL

    - by James Morgan
    I was thinking of working on a project while I have some free time and this one looks pretty nice: http://mindprod.com/project/filefinder.html One thing I'm wondering about is that will it really be much faster compared to the regular windows search if I use SQL? I'm planning to use MySQL since it's open source. Also, do I need to be good at databases for this? I have basic knowledge about relational databases and can definitely make some SQL statements. Thanks.

    Read the article

  • WPF Visibility of a UI element based on combo selection

    - by tim
    Trying to show a label only when a certain item in a combo is selected. Code should pretty much explain it. <ComboBox Name="comboMyCombo"> <ComboBoxItem>Don't show the label</ComboBoxItem> <ComboBoxItem>Show the label</ComboBoxItem> </ComboBox> <Label Visibility="Collapsed">This is my label <Label.Style> <Style> <Style.Triggers> <DataTrigger Binding="{Binding ElementName=comboMyCombo, Path=SelectedValue}" Value="Show the label"> <Setter Property="Label.Visibility" Value="Visible"></Setter> </DataTrigger> </Style.Triggers> </Style> </Label.Style> </Label>

    Read the article

  • Racket list in struct

    - by Tim
    I just started programming with Racket and now I have the following problem. I have a struct with a list and I have to add up all prices in the list. (define-struct item (name category price)) (define some-items (list (make-item "Book1" 'Book 40.97) (make-item "Book2" 'Book 5.99) (make-item "Book3" 'Book 20.60) (make-item "Item" 'KitchenAccessory 2669.90))) I know that I can return the price with: (item-price (first some-items)) or (item-price (car some-items)). The problem is, that I dont know how I can add up all Items prices with this. Answer to Óscar López: May i filled the blanks not correctly, but Racket mark the code black when I press start and don't return anything. (define (add-prices items) (if (null? items) (+ 0 items) ; Here I don't really know what to write for a 0. ; I tried differnt thnigs like null and this version. (+ (item-price (first some-items)) (add-prices (item-price (rest some-items))))))

    Read the article

  • Regex to match 0 - 999 but not blank

    - by James Cadd
    I'm working on a regex to match valid integer numbers such as the following: 0 1 99 999 However it should not allow matching an empty string. The closest I can get is: (0)|\\d{1,3} Which to me says a matching string will have either a zero or a series of digits between 1 and 3 characters long. However, empty strings still appear to match this pattern. What's the proper way to exclude empty strings from this regex?

    Read the article

  • Configuring 32-Bit ASP.NET Application on a 64-Bit IIS Server

    - by Tim
    Hello, I’m trying to install a 32-bit ASP.NET application onto a 64-bit IIS server running on Windows Server 2008. This is a clean installation of the operating system with no other applications installed. As a prerequisite for our installation, we run the 32-bit version of aspnet_regiis –i It fails with the following message: The error indicates that IIS is not installed on the machine. Please install IIS before using this tool. Additionally: IIS is definitely installed. The 64 bit version of aspnet_regiis runs cleanly without warnings. “Enable 32 bit applications” is set to True in the DefaultAppPool’s Advanced Settings. The IIS Metabase and IIS 6 configuration compatibility” component is installed. We have a test VM where this error occurs as well as test VM where both the 32 bit and 64 bit versions of aspnet_regiis run without errors. We've had no luck distinguishing the differences between the two test VMs. We have struggled with this issue for several days to no avail. Any suggestions would be greatly appreciated!

    Read the article

  • Bibliography with BibLaTeX

    - by Tim
    I'm using the MLA style. I would like to print out a bibliography subdivided into different sections. I also want annotations on each source. Is this possible with BibLaTeX? Should I just do it manually?

    Read the article

  • Trying to use contains selector within nested divs

    - by James
    <div> <div>test</div> </div> $("div:contains('test')").css('display','none'); I know I am going to kick myself on this. The problem is that when this runs all divs are hidden due to nesting. How do I make it so that the parent div does not get hidden? I am limited to using 1.2.6

    Read the article

  • Hibernate MySQL transaction configuration issue

    - by James
    I'm having trouble starting a transaction with Hibernate and MySQL while running in JUnit. I'm getting a HibernateException which states: "No TransactionManagerLookup specified". I believe this error is because I don't have a proper configuration setting for hibernate.transaction.manager_lookup_class. I see that under the namespace of org.hibernate.transaction there are quite a few different lookup classes that I could use. All of the documentation that I could find on these was very vague. My question is what is the appropriate one for MySQL?

    Read the article

  • How to Use Grizzly Embedded Server for Mule as Well as Jersey

    - by Tim
    I'm currently using JerseyTest w/ Grizzly embedded server to test some code. I do some very simple configuration to point it to the proper resources: Map<String, String> initParams = new HashMap<String, String>(); initParams.put("com.sun.jersey.config.property.packages", "com.sample.service"); ApplicationDescriptor appDescriptor = new ApplicationDescriptor(); appDescriptor.setServletInitParams(initParams); super.setupTestEnvironment(appDescriptor); This works fine and the Jersey components are available and working as expected. I'm now trying to add some Mule functionality to some of these Jersey calls, but Mule is not being properly initialized/configured by Grizzly. Has anyone gotten this kind of setup running? What additional configuration do I need to do with JerseyTest/GrizzlyWebServer to get it to initialize Mule properly?

    Read the article

  • How do I use Python's itertools.groupby()?

    - by James Sulak
    I haven't been able to find an understandable explanation of how to actually use Python's itertools.groupby() function. What I'm trying to do is this: take a list - in this case, the children of an objectified lxml element - divide it into groups based on some criteria, and then later iterate over each of these groups separately. I've reviewed the documentation (http://docs.python.org/lib/itertools-functions.html), and the examples, (http://docs.python.org/lib/itertools-example.html), but I've had trouble trying to apply them beyond a simple list of numbers. So, how do I use of itertools.groupby()? Is there another technique I should be using? Pointers to good "prerequisite" reading would also be appreciated.

    Read the article

  • String comparison in Objective-C

    - by james.ingham
    Hey, I've currently got a webserver set up which I communicate over SOAP with my iPhone app. I am returning a string containing a GUID and when I attempt to compare this with another string I get some strange results: Why would this not fire? Surely the two strings are a match? Thanks

    Read the article

  • Error Handling without Exceptions

    - by James
    While searching SO for approaches to error handling related to business rule validation , all I encounter are examples of structured exception handling. MSDN and many other reputable development resources are very clear that exceptions are not to be used to handle routine error cases. They are only to be used for exceptional circumstances and unexpected errors that may occur from improper use by the programmer (but not the user.) In many cases, user errors such as fields that are left blank are common, and things which our program should expect, and therefore are not exceptional and not candidates for use of exceptions. QUOTE: Remember that the use of the term exception in programming has to do with the thinking that an exception should represent an exceptional condition. Exceptional conditions, by their very nature, do not normally occur; so your code should not throw exceptions as part of its everyday operations. Do not throw exceptions to signal commonly occurring events. Consider using alternate methods to communicate to a caller the occurrence of those events and leave the exception throwing for when something truly out of the ordinary happens. For example, proper use: private void DoSomething(string requiredParameter) { if (requiredParameter == null) throw new ArgumentExpcetion("requiredParameter cannot be null"); // Remainder of method body... } Improper use: // Renames item to a name supplied by the user. Name must begin with an "F". public void RenameItem(string newName) { // Items must have names that begin with "F" if (!newName.StartsWith("F")) throw new RenameException("New name must begin with /"F/""); // Remainder of method body... } In the above case, according to best practices, it would have been better to pass the error up to the UI without involving/requiring .NET's exception handling mechanisms. Using the same example above, suppose one were to need to enforce a set of naming rules against items. What approach would be best? Having the method return a enumerated result? RenameResult.Success, RenameResult.TooShort, RenameResult.TooLong, RenameResult.InvalidCharacters, etc. Using an event in a controller class to report to the UI class? The UI calls the controller's RenameItem method, and then handles an AfterRename event that the controller raises and that has rename status as part of the event args? The controlling class directly references and calls a method from the UI class that handles the error, e.g. ReportError(string text). Something else... ? Essentially, I want to know how to perform complex validation in classes that may not be the Form class itself, and pass the errors back to the Form class for display -- but I do not want to involve exception handling where it should not be used (even though it seems much easier!) Based on responses to the question, I feel that I'll have to state the problem in terms that are more concrete: UI = User Interface, BLL = Business Logic Layer (in this case, just a different class) User enters value within UI. UI reports value to BLL. BLL performs routine validation of the value. BLL discovers rule violation. BLL returns rule violation to UI. UI recieves return from BLL and reports error to user. Since it is routine for a user to enter invalid values, exceptions should not be used. What is the right way to do this without exceptions?

    Read the article

  • Why am I seeing a crash when trying to call CDHtmlDialog::OnInitDialog()

    - by Tim
    I added a helpAbout menu item to my mfc app. I decided to make the ddlg derive from CDHTMLDialog. I override the OnInitDialog() method in my derived class and the first thing I do is call the parent's OnInitDialog() method. I then put in code that sets the title. On some machines this works fine, but on others it crashes in the call to CDHtmlDialog::OnInitDialog() - Trying to read a null pointer. the call stack has nothing useful - it is in mfc90.dll Is this a potential problem with mismatches of mfc/win32 dlls? It works on my vista machines but crashes on a win2003 server box. BOOL HTMLAboutDlg::OnInitDialog() { // CRASHES on the following line CDHtmlDialog::OnInitDialog(); CString title = "my title"; // example of setting title // i try to get version info //set the title CModuleVersion ver; char filename[ _MAX_PATH ]; GetModuleFileName( AfxGetApp()->m_hInstance, filename, _MAX_PATH ); ver.GetFileVersionInfo(filename); // get version from VS_FIXEDFILEINFO struct CString s; s.Format("Version: %d.%d.%d.%d\n", HIWORD(ver.dwFileVersionMS), LOWORD(ver.dwFileVersionMS), HIWORD(ver.dwFileVersionLS), LOWORD(ver.dwFileVersionLS)); CString version = ver.GetValue(_T("ProductVersion")); version.Remove(' '); version.Replace(",", "."); title = "MyApp - Version " + version; SetWindowText(title); return TRUE; // return TRUE unless you set the focus to a control } And here is the relevant header file: class HTMLAboutDlg : public CDHtmlDialog { DECLARE_DYNCREATE(HTMLAboutDlg) public: HTMLAboutDlg(CWnd* pParent = NULL); // standard constructor virtual ~HTMLAboutDlg(); // Overrides HRESULT OnButtonOK(IHTMLElement *pElement); HRESULT OnButtonCancel(IHTMLElement *pElement); // Dialog Data enum { IDD = IDD_DIALOG_ABOUT, IDH = IDR_HTML_HTMLABOUTDLG }; protected: virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support virtual BOOL OnInitDialog(); DECLARE_MESSAGE_MAP() DECLARE_DHTML_EVENT_MAP() }; I can't figure out what is going on - why it works on some machins and crashes on others. Both have VS2008 installed EDIT: VS versions VISTA - no crashes 9.0.30729.1 SP 2003 server: (crashes) 9.0.21022.8 RTM

    Read the article

  • struct method linking

    - by James
    I'm updating some old code that has several POD structs that were getting zero'd out by memset (don't blame me...I didn't write this part). Part of the update changed some of them to classes that use private internal pointers that are now getting wiped out by the memset. So I added a [non-virtual] reset() method to the various structs and refactored the code to call that instead. One particular struct developed an "undefined reference to `blah::reset()'" error. Changing it from a struct to a class fixed the error. Calling nm on the .o file h, the mangled function names for that method look the same (whether it's a class or a struct). I'm using g++ 4.4.1, on Ubuntu. I hate the thought that this might be a compiler/linker bug, but I'm not sure what else it could be. Am I missing some fundamental difference between structs and classes? I thought the only meaningful ones were the public/private defaults and the way everyone thinks about them.

    Read the article

  • Stop a stopwatch

    - by James Morgan
    I have the following code in a JPanel class which is added to a another class (JFrame). What I'm trying to implement is some sort of a stopwatch program. startBtn.addActionListener(new startListener()); class startListener implements ActionListener { public void actionPerformed(ActionEvent e) { Timer time = new Timer(); time.scheduleAtFixedRate(new Stopwatch(), 1000, 1000); } } This is another class which basically the task. public class Stopwatch extends TimerTask { private final double start = System.currentTimeMillis(); public void run() { double curr = System.currentTimeMillis(); System.out.println((curr - start) / 1000); } } The timer works fine and this is definitely far from complete but I'm not sure how to code the stop button which should stop the timer. Any advice on this? BTW I'm using java.util.timer

    Read the article

  • Connecting to a self hosted WCF service from a Flex application - policy issues

    - by James S
    Hello, I am trying to accomplish the following: I wrote a Flex application that is trying to connect to a WCF service hosted on the clients computer. I also wrote a windows forms application for the client to run. This application exposes a self-hosted WCF service that the Flex application is supposed to connect to. This works fine if I'm loading the Flex application from my local IIS. The problem starts when the Flex application is hosted on a different domain. When this occurs, the flash player requires a crossdomain.xml policy file on the clients computer. I also managed to expose the crossdomain.xml on the clients computer using another WCF self-hosted service and WebHttpBinding on the clients computer. This also works fine. My problem is that the flash player requires that the crossdomain.xml or a meta policy file will be in the root directory of the domain. If I used my WCF service to expose something on the root directory of the clients computer I will run over any existing web server capabilities the client has on the computer (such as IIS). I know it's a bit complicated scenario, but any help would be appreciated. Thanks!

    Read the article

  • XAMPP Mercurial installation on Windows Apache --> HgWebDir.cgi Script Error

    - by Tim
    I try to publish multiple existing mercurial repository-locations though XAMPP Apache via CGI Python script hgwebdir.cgi ... as in this tutorial http://mercurial.selenic.com/wiki/HgWebDirStepByStep I get the following error from the apache error logs, when I try to access the repository path with a browser: Premature end of script headers: hgwebdir.cgi [Tue Apr 20 16:00:50 2010] [error] [client 91.67.44.216] Premature end of script headers: hgwebdir.cgi [Tue Apr 20 16:00:50 2010] [error] [client 91.67.44.216] File "C:/hostdir/xampp/cgi-bin/hg/hgwebdir.cgi", line 39\r [Tue Apr 20 16:00:50 2010] [error] [client 91.67.44.216] test = c:/hostdir/mercurial/test/\r [Tue Apr 20 16:00:50 2010] [error] [client 91.67.44.216] ^\r [Tue Apr 20 16:00:50 2010] [error] [client 91.67.44.216] SyntaxError: invalid syntax\r This is the path of the file where the script fails (and if I remove it, I get an empty HTML page shown with no visual elements in it): [paths] test = c:/hostdir/mercurial/test/ /hg = c:/hostdir/mercurial/** / = c:/hostdir/mercurial/ Does anybody have a clue for me?

    Read the article

< Previous Page | 69 70 71 72 73 74 75 76 77 78 79 80  | Next Page >