Search Results

Search found 152 results on 7 pages for 'cliff cheung'.

Page 2/7 | < Previous Page | 1 2 3 4 5 6 7  | Next Page >

  • Java sound doesn't work under Linux

    - by Cliff
    I just installed Fedora 12 and after downloading and running the Java Sound Demo I get exceptions. If I run just a vanilla Java program that plays a .wav file it runs silently with no sound and no exceptions. Every other app seems to play sound. I also took some advice from this thread in the Ubuntu forums which almost seemed to work. (Installing aoss got rid of the initial exceptions in the sound demo but I still hear nothing when I play.) I'm getting frustrated by the individual hoops I have to go through to eek sound out of my speakers when running Java apps on Linux platforms! Can somebody help me figure out what's wrong?

    Read the article

  • RouterLess, house-wired network using multiple powerline adapters

    - by Cliff Arnell
    related to the 'old days' of one ethernet cable tapped with Ts for each monitor.... my question might be very simple... or not. I have an over-the-air internet provider with a wire dish with a powered transceiver and cat5 cable out of the providers supplied modem. I'm presently connecting the output of the modem into my wireless router which sends the internet signal all over the house. Standard stuff, I believe. My Question. Can I just connect the output of the modem into 1 powerline adapter and tie all my equipment such as computer, printer, laptop, Tivo recorder, etc. into 1-each local powerline adapters located near each devices resulting in a 'house-wired' network and no router? I'm bothered by the idea that my over-the-air provider might be using something in my router to establish and keep my IP connection alive. I did have to configure the router for my IP, a router which, in my proposed scenario, would no longer exist. Thank you for your help.

    Read the article

  • Force Browser Mode=IE8 and document mode=IE8 Standards

    - by Dennis Cheung
    I have a internal website hosted on IIS. I added the following meta code and also add http-header that the page should in IE8 Browser mode and document mode. <meta http-equiv="X-UA-Compatible" content="IE=8" > We tested it on Visual Studio and and it works very well. However, after we publish the code to another IIS server, one developer reported that the page render in "IE8 Comatiblity" Browser Mode which causes some JavaScript to fail. There are more then 4 people working on the same windows server 2003 (RDP sessions). We use the same version of IE (same IE actually). Everyone get "IE8" Browser Mode but one person gets "IE8 Compatibility" Browser Mode. What else can make a specific user's IE load the page in a mode other than IE8 mode? PS. We checked the compatibility list in the IE; it is empty.

    Read the article

  • Force "Internet Explorer 8" browser mode in intranet

    - by Dennis Cheung
    There are "Internet Explorer 8", "Internet Explorer 8 Compatibility Mode", and IE7 mode in IE8. However, the default setting in IE make all intranet website use "IE8 Compatibility Mode" even I have setted doctype, the meta tag, http header as suggested to force it into IE8 mode. I have <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd" and <meta http-equiv="X-UA-Compatible" content="IE=8" But it still goes into "IE8 Compatibility Mode", without any changes in IE setting. How to force it into pure "IE8" mode, without change any browser's setting? PS. I am not talking "document mode" here.

    Read the article

  • Github post commit trigger build in Hudson with security enabled

    - by Jerry Cheung
    Github has no problem with triggering a build in Hudson with security turned off because the build is a public URL. But I'd like to be able to have logins required on Hudson so that people can't arbitrarily build. I tried looking for a HTTP basic auth method so I can include the credentials in the URL itself, but couldn't find anything like that. Has anyone used Hudson with Github and run into this problem?

    Read the article

  • How to store UTC time values in Mongo with Mongoid?

    - by Jerry Cheung
    The behavior I'm observing with the Mongoid adapter is that it'll save 'time' fields with the current system timezone into the database. Note that it's the system time and not Rail's environment's Time.zone. If I change the system timezone, then subsequent saves will pick up the current system timezone. # system currently at UTC -7 @record.time_attribute = Time.now.utc @record.save # in mongo, the value is "time_attribute" : "Mon May 17 2010 12:00:00 GMT-0700 (QYZST)" @record.reload.time_attribute.utc? # false

    Read the article

  • Processing incoming emails on Heroku

    - by Jerry Cheung
    For my side project kwiqi, I use ActionMailer's 'receive' method to process incoming email messages for tracking my expenses. Heroku doesn't have a local mail server running that same code will not work. One solution I've thought of is to periodically hit a controller action that will pull messages from Gmail. Are there other solutions that are reasonable? Is anyone processing incoming emails in Heroku?

    Read the article

  • Convert large raster graphics image(bitmap, PNG, JPEG, etc) to non-vector postscript in C#

    - by Dennis Cheung
    How to convert an large image and embed it into postscript? I used to convert the bitmap into HEX codes and render with colorimage. It works for small icons but I hit a /limitcheck error in ghostscript when I try to embed little larger images. It seem there is a memory limit for bitmap in ghostscript. I am looking a solution which can run without 3rd party/pre-processing other then ghostscript itself.

    Read the article

  • How to speed up the reading of innerHTML in IE8?

    - by Dennis Cheung
    I am using JQuery with the DataTable plugin, and now I have a big performnce issue on the following line. aLocalData[jInner] = nTds[j].innerHTML; // jquery.dataTables.js:2220 I have a ajax call, and result string in HTML format. I convert them into HTML nodes, and that part is ok. var $result = $('<div/>').html(result).find("*:first"); // simlar to $result=$(result) but much more faster in Fx Then I activate enable the result from a plain table to a sortable datatable. The speed is acceptable in Fx (around 4sec for 900 rows), but unacceptable in IE8 (more then 100 seconds). I check it deep using the buildin profiler, and found the above single line take all 99.9% of the time, how can I speed it up? anything I missed? nTrs = oSettings.nTable.getElementsByTagName('tbody')[0].childNodes; for ( i=0, iLen=nTrs.length ; i<iLen ; i++ ) { if ( nTrs[i].nodeName == "TR" ) { iThisIndex = oSettings.aoData.length; oSettings.aoData.push( { "nTr": nTrs[i], "_iId": oSettings.iNextId++, "_aData": [], "_anHidden": [], "_sRowStripe": '' } ); oSettings.aiDisplayMaster.push( iThisIndex ); aLocalData = oSettings.aoData[iThisIndex]._aData; nTds = nTrs[i].childNodes; jInner = 0; for ( j=0, jLen=nTds.length ; j<jLen ; j++ ) { if ( nTds[j].nodeName == "TD" ) { aLocalData[jInner] = nTds[j].innerHTML; // jquery.dataTables.js:2220 jInner++; } } } }

    Read the article

  • is it possible to display video information from an rtsp stream in an android app UI

    - by Joseph Cheung
    I have managed to get a working video player that can stream rtsp links, however im not sure how to display the videos current time position in the UI, i have used the getDuration and getCurrentPosition calls, stored this information in a string and tried to display it in the UI but it doesnt seem to work in main.xml: TextView android:id="@+id/player" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_margin="1px" android:text="@string/cpos" / in strings.xml: string name="cpos""" /string in Player.java private void playVideo(String url) { try { media.setEnabled(false); if (player == null) { player = new MediaPlayer(); player.setScreenOnWhilePlaying(true); } else { player.stop(); player.reset(); } player.setDataSource(url); player.getCurrentPosition(); player.setDisplay(holder); player.setAudioStreamType(AudioManager.STREAM_MUSIC); player.setOnPreparedListener(this); player.prepareAsync(); player.setOnBufferingUpdateListener(this); player.setOnCompletionListener(this); } catch (Throwable t) { Log.e(TAG, "Exception in media prep", t); goBlooey(t); try { try { player.prepare(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } Log.v(TAG, "Duration: === " + player.getDuration()); } catch (IllegalStateException e) { // TODO Auto-generated catch block e.printStackTrace(); } } } private Runnable onEverySecond = new Runnable() { public void run() { if (lastActionTime 0 && SystemClock.elapsedRealtime() - lastActionTime 3000) { clearPanels(false); } if (player != null) { timeline.setProgress(player.getCurrentPosition()); //stores getCurrentPosition as a string cpos = String.valueOf(player.getCurrentPosition()); System.out.print(cpos); } if (player != null) { timeline.setProgress(player.getDuration()); //stores getDuration as a string cdur = String.valueOf(player.getDuration()); System.out.print(cdur); } if (!isPaused) { surface.postDelayed(onEverySecond, 1000); } } };

    Read the article

  • Calling a WCF from ASP.NET with same the single-signon user LogonUserIdentity

    - by Dennis Cheung
    I have a ASP.NET MVC page, which call WCF logic. The system is single-signon using NTML. Both the ASP page and the WCF will use the UserIdentity to get user login information. Other then NTML, I will also have a Form based authorization (with AD) in same system. The ASP page, is it simple and I can have it from HttpContext.Current.Request.LogonUserIdentity. However, it seem it is missing from the WCF which call by the ASP, not from browser. How to configure to pass the ID pass from the ASP to the WCF?

    Read the article

  • UIScrollView does not scroll

    - by Preston Cheung
    I got a problem about UIScrollView. I am making a custom view which inherits UIView. The view has a UIScrollView on which there are lots of buttons which should scroll left and right. The UIScrollView and buttons can show normally. But I cannot scroll the buttons. Could someone give me some suggestions? Thanks a lot! MZMPhotoCalenderSwitcher.h #import <UIKit/UIKit.h> @interface MZMPhotoCalenderSwitcher : UIView <UIScrollViewDelegate> @property (strong, nonatomic) UIScrollView *topSwitcher; @end MZMPhotoCalenderSwitcher.m - (void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after loading the view. self.topSwitcher = [[UIScrollView alloc] initWithFrame:CGRectMake(0, LABEL_HEIGHT + VIEW_Y, self.view.bounds.size.width, TOP_SWITCHER_HEIGHT)]; self.topSwitcher.backgroundColor = [UIColor greenColor]; self.topSwitcher.pagingEnabled = YES; self.topSwitcher.showsHorizontalScrollIndicator = NO; self.topSwitcher.showsVerticalScrollIndicator = NO; [self add:3 ButtonsOnView:self.topSwitcher withButtonWidth:44.8f andHeight:20.0f]; } - (void)add:(int)num ButtonsOnView:(UIScrollView *)view withButtonWidth:(CGFloat)width andHeight:(CGFloat)height { CGFloat totalTopSwitcherWidth = num * width; [view setContentSize:CGSizeMake(totalTopSwitcherWidth, view.bounds.size.height)]; CGFloat xOffset = 0.0f; for (int i=1; i<=num; i++) { UIButton *button = [UIButton buttonWithType:UIButtonTypeRoundedRect]; [button setFrame:CGRectMake(xOffset, 0, width, height)]; xOffset += width; [button setTitle:[NSString stringWithFormat:@"%d", i] forState:UIControlStateNormal]; button.titleLabel.font = [UIFont systemFontOfSize:10]; [button setTitleColor:[UIColor blueColor] forState:UIControlStateNormal]; [button setTitleColor:[UIColor blackColor] forState:UIControlStateSelected]; [button setTag:i]; [button addTarget:self action:@selector(buttonEvent) forControlEvents:UIControlEventTouchUpInside]; if (i % 2 == 0) [button setBackgroundColor:[UIColor yellowColor]]; else [button setBackgroundColor:[UIColor redColor]]; [view addSubview:button]; } }

    Read the article

  • Free PHP framework/library for single-sign on / cross domain login

    - by Dennis Cheung
    I am looking for free (non GPL is better) SSO framework/library implementation or code samples. There are many kind of SSO implementation. Sharing cookie, sharing session, one time token, associative accounts, etc, etc. (BTW, any good article compare them?) Is there any keyword I should google and reuse before before I start to implement our own wheel. I know OpenID, but which is too much and it is not our need. We rather keep it KISS. We just want share the credentials of user that could save users from another login form.

    Read the article

  • Integration test failing through NUnit Gui/Console, but passes through TestDriven in IDE

    - by Cliff
    I am using NHibernate against an Oracle database with the NHibernate.Driver.OracleDataClientDriver driver class. I have an integration test that pulls back expected data properly when executed through the IDE using TestDriven.net. However, when I run the unit test through the NUnit GUI or Console, NHibernate throws an exception saying it cannot find the Oracle.DataAccess assembly. Obviously, this prevents me from running my integration tests as part of my CI process. NHibernate.HibernateException : The IDbCommand and IDbConnection implementation in the assembly Oracle.DataAccess could not be found. Ensure that the assembly Oracle.DataAccess is located in the application directory or in the Global Assembly Cache. If the assembly is in the GAC, use element in the application configuration file to specify the full name of the assembly.* I have tried making the assembly available in two ways, by copying it into the bin\debug folder and by adding the element in the config file. Again, both methods work when executing through TestDriven in the IDE. Neither work when executing through NUnit GUI/Console. The NUnit Gui log displays the following message. 21:42:26,377 ERROR [TestRunnerThread] ReflectHelper [(null)]- Could not load type Oracle.DataAccess.Client.OracleConnection, Oracle.DataAccess. System.BadImageFormatException: Could not load file or assembly 'Oracle.DataAccess, Version=2.111.7.20, Culture=neutral, PublicKeyToken=89b483f429c47342' or one of its dependencies. An attempt was made to load a program with an incorrect format. File name: 'Oracle.DataAccess, Version=2.111.7.20, Culture=neutral, PublicKeyToken=89b483f429c47342' --- System.BadImageFormatException: Could not load file or assembly 'Oracle.DataAccess' or one of its dependencies. An attempt was made to load a program with an incorrect format. File name: 'Oracle.DataAccess' I am running NUnit 2.4.8, TestDriven.net 2.24 and VS2008sp1 on Windows 7 64bit. Oracle Data Provider v2.111.7.20, NHibernate v2.1.0.4. Has anyone run into this issue, better yet, fixed it?

    Read the article

  • bottom align text in div with floated H1?

    - by Cliff
    I have a block of text, and inside the block I have an h1 tag floated left. I would like the first line of text to align with the bottom of the first line of text. Here is the sample site: http://myhealthsense.abyteshosting.com/ The block in question is the block under the header that says "Welcome! I am a..." I want the 'Welcome!' to have it's bottom aligned with the rest of the sentence, and for the next line to wrap under the 'Welcome!'. As it is now, there are two lines wrapped to the right of 'Welcome!'. Of course I could do this easily if all the text was together in a line, and I could use spans to set the sizes. But, since this is all generated out of drupal, the content comes as it is. In other words, the text in the block comes from the database, and is generated in a div, but the 'welcome!' has to be in the template. If I put it in the content div, my user will mess it up every time they edit the content. Any hints are appreciated.

    Read the article

  • Using kAudioSessionProperty_OtherMixableAudioShouldDuck on iPhone

    - by Cliff
    Hello, I'm trying to get consistant behavior out of the kAudioSessionProperty_OtherMixableAudioShouldDuck property on the iPhone to allow iPod music blending and I'm having trouble. At the start of my app I set an Ambient category like so: -(void) initialize { [[AVAudioSession sharedInstance] setCategory: AVAudioSessionCategoryAmbient error: nil]; } Later on when I attempt to play audio I set the duck property using the following method: //this will crossfade the audio with the ipod music - (void) toggleCrossfadeOn:(UInt32)onOff { //crossfade the ipod music AudioSessionSetProperty(kAudioSessionProperty_OtherMixableAudioShouldDuck,sizeof(onOff),&onOff); AudioSessionSetActive(onOff); } I call this passing a numeric "1" just before playing audio like so: [self toggleCrossfadeOn:1]; [player play]; I then call the crossfade method again passing a zero when my app's audio completes using a playback is stopping callback like so: -(void) playbackIsStoppingForPlayer:(MQAudioPlayer*)audioPlayer { NSLog(@"Releasing player"); [audioPlayer release]; [self toggleCrossfadeOn:0]; } In my production app this exact code works as expected, causing the ipod to fade out just before playing my app's audio then fade back in when the audio finishes playing. In a new project I recently started, I get different behavior. The iPod audio fades down and never fades back in. In my production app I use the AVAudioPlayer where in my new app I've written a custom audio player that uses audio queues. Could somebody help me understand the differences and how to properly use this API?

    Read the article

  • What's the best value for money c# code protection for a single developer

    - by Cliff Cawley
    What's the best value for money c# code protection? Some just use obfuscation, others add win32 wrapping, some cost a fortune. So far I've come up with http://www.eziriz.com/ who's Intellilock looks promising. Any other suggestions? Any reasons why this is not a good idea? I know its impossible to completely protect but I'd prefer the ability to protect my code so that it would require a lot of effort in order to recover it. I do hope to sell my products eventually, while also releasing some for free.

    Read the article

  • Java sound doesn't work under Linux

    - by Cliff
    Help! I'm getting frustrated by the individual hoops I have to go through to eek sound out of my speakers when running Java apps on Linux platforms! I just installed Fedora 12 and after downloading and running the Java Sound Demo I get exceptions. If I run just a vanilla Java program that plays a wav file it runs silently with no sound and no exceptions. Every other app seems to play sound. I also took some advice from this thread in the Ubuntu forums which almost seemed to work. (Installing aoss got rid of the initial exceptions in the sound demo but I still hear nothing when I play.) can somebody help me figure out what's wrong?

    Read the article

  • XCode 3.2 does not mark unit test assert failures in the editor

    - by Cliff
    I've been off in Java land for about a month or so and now, upon returning to XCode I feel lost. I've upgraded 1st to 3.1.2 then recently to 3.2 and also got a new Mac with Snow Leopard so I'm not exactly sure when the problem surfaced. I just know that I used to get little red bubbles in my unit test next to the failing asserts and that no longer seems to happen. Is there a way to restore this? I've been trying to use Apple's own SenTesting framework instead of GoogleTools for mac like I used to. Should I revert to Google Tools? Does anyone have an answer?

    Read the article

  • CAScrollLayer doesn't scroll!

    - by Cliff
    Maybe it's because it's late. Whatever the reason I can't figure out why I'm having trouble with a simple CSScrollLayer example I'm trying. I add a 50 pixel Eclipse icon to a view based project and in my initialize method (called from initWithNibName:bundle:) I have this: -(void) initialize { CAScrollLayer *scrollLayer = [CAScrollLayer layer]; scrollLayer.backgroundColor = [[UIColor blackColor] CGColor]; CGRect bounds = self.view.bounds; scrollLayer.bounds = CGRectMake(0, 0, bounds.size.width, bounds.size.height); scrollLayer.contentsRect = CGRectMake(0, 0, bounds.size.width + 800, bounds.size.height + 800); scrollLayer.borderWidth = 2.5; scrollLayer.borderColor = [[UIColor redColor] CGColor]; scrollLayer.position = CGPointMake(self.view.center.x, self.view.center.y - 20); scrollLayer.scrollMode = kCAScrollBoth; [self.view.layer addSublayer:scrollLayer]; UIImage *image = [UIImage imageNamed:@"eclipse32.gif"]; for(int i=0; i<6; i++) { layer = [CALayer layer]; layer.backgroundColor = [[UIColor blackColor] CGColor]; layer.bounds = CGRectMake(0, 0, 100, 100); layer.contents = (id)[image CGImage]; layer.position = CGPointMake(layer.bounds.size.width * i, self.view.center.y); [scrollLayer addSublayer:layer]; } // [button removeFromSuperview]; // [self.view addSubview:button]; // self.view.userInteractionEnabled = YES; [image release]; } The scroll layer shows, the icon is repeated on the layer I have a border around the edge of the screen. Everything is lovely except I can't scroll the icons. I've tried with/without setting scroll mode. I've tried with a single stretched icon that falls off screen. I've tried everything. What am I doing wrong?

    Read the article

  • Google Mock for iPhone development?

    - by Cliff
    I have an interesting situation where I am refactoring a bunch of ObjC iPhone code to create a C++ API. I'm a novice to C++ and looking into C++ mocking frameworks to augment the work I'd done using OCUnit and poor man's mocks. I ran across googlemock and wanted to know if anyone has ever used it for iPhone development? Also, how can I share this (or mockpp) with other devs as it is an installable package and doesn't seem to lend itself to checking into a repository?

    Read the article

  • Write wave files to memory in Java

    - by Cliff
    I'm trying to figure out why my servlet code creates wave files with improper headers. I use: AudioSystem.write( new AudioInputStream( new ByteArrayInputStream(memoryBytes), new AudioFormat(22000, 16, 1, true,false), memoryBytes.length ), AudioFileFormat.Type.WAVE, servletOutputStream ); taking a byte array from memory containing raw PCM samples and a servlet output stream that gets returned to the client. In the result I get a normal wave file but with zeros in the chunk size fields. Is the API broken? I would think that the size could be filled in using the size passed in the audio input stream. But now, after typing this out I'm thinking its not making this info available to the outer write() method on AudioSystem. It seems like the AudioSystem.write call needs a size parameter unless it is able to pull the size from the stream... which wouldn't work with an arbitrary sized stream. Does anyone know how to make this example work?

    Read the article

  • I write bad wave files using Java

    - by Cliff
    I'm writing out wave files in Java using AudioInputStream output = new AudioInputStream(new ByteArrayInputStream(rawPCMSamples), new AudioFormat(22000,16,1,true,false), rawPCMSamples.length) AudioSystem.write(output, AudioFileFormat.Type.WAVE, new FileOutputStream('somefile.wav')) And I get what appears to be corrupt wave files on OSX. They won't play from Finder however using the same code behind a servlet writing directly to the response stream and setting the Content-Type to audio/wave seems to play fine in quicktime. What gives?

    Read the article

  • What would you recommend for a large-scale Java data grid technology: Terracotta, GigaSpaces, Cohere

    - by cliff.meyers
    I've been reading up on so-called "data grid" solutions for the Java platform including Terracotta, GigaSpaces and Coherence. I was wondering if anyone has real-world experience working any of these tools and could share their experience. I'm also really curious to know what scale of deployment people have worked with: are we talking 2-4 node clusters or have you worked with anything significantly larger than that? I'm attracted to Terracotta because of its "drop in" support for Hibernate and Spring, both of which we use heavily. I also like the idea of how it decorates bytecode based on configuration and doesn't require you to program against a "grid API." I'm not aware of any advantages to tools which use the approach of an explicit API but would love to hear about them if they do in fact exist. :) I've also spent time reading about memcached but am more interested in hearing feedback on these three specific solutions. I would be curious to hear how they measure up against memcached in the event someone has used both.

    Read the article

< Previous Page | 1 2 3 4 5 6 7  | Next Page >