Daily Archives

Articles indexed Saturday June 5 2010

Page 22/79 | < Previous Page | 18 19 20 21 22 23 24 25 26 27 28 29  | Next Page >

  • Open new panel with button clicked.

    - by bat
    Java Swing GUI: I am using ActionListener to preform the action when a button is clicked. What i want to do is when a button is clicked, open a new panel, but load/get the new panel from a different file. This is what i have so far but i rather just link to another file. THANKS! =] public void actionPerformed(java.awt.event.ActionEvent e) { //something like this... loadFile(newPlane.java); }

    Read the article

  • How to programmatically generate an audio podcast file with chapters and text track?

    - by adib
    Hi Anybody know how to programmatically generate audio podcast files with bookmarks that can be used in iTunes / iPod / iPhone / iPod touch? Specifically text bookmarks (bookmarks with titles) that the listener can skip to a specific point in time in the audio file. Also how to add the text transcription of the podcast's content. Even better if you have an example Cocoa code or library to write the audio file. Thanks.

    Read the article

  • strange doctrine update problem

    - by larryzhao
    Hi, guys, I have a simple table like following: class SnookerCurrentInfo extends Doctrine_Record { public function setTableDefinition() { $this->hasColumn('current_frame_id', 'integer', 4, array('notnull' => 'false')); $this->hasColumn('current_player_id', 'integer', 4, array('notnull' => 'false')); $this->hasColumn('current_score1', 'integer', 4, array('notnull' => 'false')); $this->hasColumn('current_score2', 'integer', 4, array('notnull' => 'false')); } public function setUp(){ $this->setTableName('snooker_current_info'); } } and I would like to keep only one entry in this table. So every time the value is changed I read the entry with id = 1 out and change the object and execute save. like the following: $info = Doctrine::getTable('SnookerCurrentInfo')->find(1); $info->current_frame_id = $jsonInfo['current_frame_id']; $info->current_player_id = $jsonInfo['current_player_id']; $info->current_score1 = $jsonInfo['current_score1']; $info->current_score2 = $jsonInfo['current_score2']; $info->save(); but the strange thing is, I try to make it clear. Let's say at first, the entry is (30, 1, 1, 0) and I switch player, so update the entry to (30, 2, 1, 0). and I switch the player back again, so the entry should be updated to (30, 1, 1, 0), but this is not affected to the database!! In the database, the entry still remains as (30, 2, 1, 0)!!!! But if after (30, 2, 1, 0), I update the score to (30, 2, 1, 1) and then switch the player back (30, 1, 1, 1) then this is ok. What's that? How should I deal with it? Thanks for a lot helping, really urgent!!

    Read the article

  • uploading file size

    - by Anup Prakash
    As we all know, By default in PHP+MySQL, we can upload a file of size 1.4MB (max). 1) My Question is how can i increase the limitation of this uploading file size? 2) What is the maximum limitation for file to be uploaded in database? Thanx for viewing my query and special thanx for answering my questin.

    Read the article

  • Getting all pdf files from a domain (for example *.adomain.com)

    - by Zack
    I need to download all pdf files from a certain domain. There are about 6000 pdf on that domain and most of them don't have an html link (either they have removed the link or they never put one in the first place). I know there are about 6000 files because I'm googling: filetype:pdf site:*.adomain.com However, Google lists only the first 1000 results. I believe there are two ways to achieve this: a) Use Google. However, how I can get all 6000 results from Google? Maybe a scraper? (tried scroogle, no luck) b) Skip Google and search directly on domain for pdf files. How do I do that when most them are not linked?

    Read the article

  • Set value of hidden field in a form using jQuery's ".val()" doesn't work !

    - by texens
    I've been trying to set the value of a hidden field in a form using jQuery, but without success. Here is a sample code that explains the problem. If I keep the input type to "text", it works without any trouble. But, changing the input type to "hidden", doesn't work ! <html> <head> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript"> $(document).ready(function(){ $("button").click(function(){ $("input:text#texens").val("tinkumaster"); }); }); </script> </head> <body> <p>Name: <input type="hidden" id="texens" name="user" value="texens" /></p> <button>Change value for the text field</button> </body> </html> I also tried the following workaround, by setting the input type to "text" and then using a "display:none" style for the input box. But, this also fails ! It seems jQuery has some trouble setting hidden or invisible input fields. Any ideas? Is there a workaround for this that actually works? Thanking in anticipation

    Read the article

  • TTPhotoViewController: How to show small images

    - by Sali
    Hi, I posted this question on Three20 google group but did not get any response. So I thought I try this forum. I am using TTPhotoViewController to display photos. I am following sample code given in Three20 sample project: TTCatalog/PhotoTest1Controller.m. In my case some of the images are less than (320,480). The problem which I am facing is that when my image is 200*300 then TTPhotoViewController re-sizes it to full screen on load which distorts the image. I was wondering if there is a way to tell TTPhotoViewController to display image in its actual size and not to resize it. The only thing which I have changed is viewDidLoad function in PhotoTest1Controller.m. (void)viewDidLoad { self.photoSource = [[[MockPhotoSource alloc] initWithType:MockPhotoSourceNormal title:@"Photo 1" photos:[NSArray arrayWithObjects:[[[MockPhoto alloc] initWithURL:@"http://test/test.jpg" smallURL:@"http://test/test.jpg" size:CGSizeMake(200, 300) caption:@"This is a caption."] autorelease], nil] photos2:nil] autorelease]; } I will appreciate your help. Thanks

    Read the article

  • Authoritative Excel range syntax reference

    - by olefevre
    Sorry if this has been asked before but I can't find it. I am looking for an authoritative description of all valid strings that can be used as a reference, e.g., "A1:C5", "$A:$A", $A2" etc etc. That seems a pretty basic thing yet I've wasted hours trying to locate it. All I can find is a swamp of "helpful" examples but no reference.

    Read the article

  • Given a vector of maximum 10 000 natural and distinct numbers, find 4 numbers(a, b, c, d) such that

    - by king_kong
    Hi, I solved this problem by following a straightforward but not optimal algorithm. I sorted the vector in descending order and after that substracted numbers from max to min to see if I get a + b + c = d. Notice that I haven't used anywhere the fact that elements are natural, distinct and 10 000 at most. I suppose these details are the key. Does anyone here have a hint over an optimal way of solving this? Thank you in advance! Later Edit: My idea goes like this: '<<quicksort in descending order>>' for i:=0 to count { // after sorting, loop through the array int d := v[i]; for j:=i+1 to count { int dif1 := d - v[j]; int a := v[j]; for k:=j+1 to count { if (v[k] > dif1) continue; int dif2 := dif1 - v[k]; b := v[k]; for l:=k+1 to count { if (dif2 = v[l]) { c := dif2; return {a, b, c, d} } } } } } What do you think?(sorry for the bad indentation)

    Read the article

  • Haskell Tuple Size Limit

    - by SHiNKiROU
    Why I can't construct large tuples in Haskell? Why there's a tuple size limit? Prelude> (1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1) <interactive>:1:0: No instance for (Show (t, t1, t2, ... t23)) arising from a use of `print' at <interactive>:1:0-48 Possible fix: add an instance declaration for (Show (t, t1, t2, ... t23)) In a stmt of a 'do' expression: print it

    Read the article

  • Boost::Asio - Remove the "null"-character in the end of tcp packets.

    - by shump
    I'm trying to make a simple msn client mostly for fun but also for educational purposes. And I started to try some tcp package sending and receiving using Boost Asio as I want cross-platform support. I have managed to send a "VER"-command and receive it's response. However after I send the following "CVR"-command, Asio casts an "End of file"-error. After some further researching I found by packet sniffing that my tcp packets to the messenger server got an extra "null"-character (Ascii code: 00) at the end of the message. This means that my VER-command gets an extra character in the end which I don't think the messenger server like and therefore shuts down the connection when I try to read the CVR response. This is how my package looks when sniffing it, (it's Payload): (Hex:) 56 45 52 20 31 20 4d 53 4e 50 31 35 20 43 56 52 30 0a 0a 00 (Char:) VER 1 MSNP15 CVR 0... and this is how Adium(chat client for OS X)'s package looks: (Hex:) 56 45 52 20 31 20 4d 53 4e 50 31 35 20 43 56 52 30 0d 0a (Char:) VER 1 MSNP15 CVR 0.. So my question is if there is any way to remove the null-character in the end of each package, of if I've misunderstood something and used Asio in a wrong way. My write function (slightly edited) looks lite this: int sendVERMessage() { boost::system::error_code ignored_error; char sendBuf[] = "VER 1 MSNP15 CVR0\r\n"; boost::asio::write(socket, boost::asio::buffer(sendBuf), boost::asio::transfer_all(), ignored_error); if(ignored_error) { cout << "Failed to send to host!" << endl; return 1; } cout << "VER message sent!" << endl; return 0; } And here's the main documentation on the msn protocol I'm using. Hope I've been clear enough.

    Read the article

  • How to break out of a nested parallel (OpenMP) Fortran loop idiomatically?

    - by J.F. Sebastian
    Here's sequential code: do i = 1, n do j = i+1, n if ("some_condition") then result = "here's result" return end if end do end do Is there a cleaner way to execute iterations of the outer loop concurrently other than: !$OMP PARALLEL private(i,j) !$OMP DO do i = 1, n if (found) goto 10 do j = i+1, n if (found) goto 10 if ("some_condition") then !$OMP CRITICAL !$OMP FLUSH if (.not.found) then found = .true. result = "here's result" end if !$OMP FLUSH !$OMP END CRITICAL goto 10 end if end do 10 continue end do !$OMP END DO NOWAIT !$OMP END PARALLEL

    Read the article

  • Connect root domain name to dyndns?

    - by user36175
    Is there any way to connect the root of a domain name to a dyndns account? This question reveals how to get www.whatever.com to point to dyndns, but is there a way to get whatever.com itself to point to it? The domain is registered with GoDaddy if that matters.

    Read the article

  • Creating custom IP-STS for sharepoint foundation 2010 without ADFS

    - by user252229
    I plan to create very simple custom IP-STS for SharePoint foundation 2010 without ADFS server so anyone can integrate Windows Live ID to SharePoint foundation 2010 simply without ADFS, I can't use ADFS server because it could not install on Windows Web Server 2008 (Web Edition), also I found many article use LDAP provider but it does not exists in SharePoint Foundation too (it requires Sharepoint Server Edition). After too much searching I just found the following article and find all technique except one problem. 1) Creating Custom Claim Provider: blogs.technet.com/b/speschka/archive/2010/03/13/writing-a-custom-claims-provider-for-sharepoint-2010-part-1.aspx 2) Creating Custom STS Provider: http://blogs.msdn.com/b/chunliu/archive/2010/04/02/how-to-make-use-of-a-custom-ip-sts-with-sharepoint-2010-part-1.aspx Only one step remains: I got following error after enter username in STS site and redirect to localhost/_trust/default.aspx , ( I leave EncryptingCertificateName empty). Operation is not valid due to the current state of the object I expect to get access denied error instead of that error. 1.Is it possible anyway? 2.Can anyone help me where can I find working article to create custom IP-STS without ADFS server Any idea will help me Thanks

    Read the article

  • Time Calculation in Python

    - by user343934
    Hi everyone, I have two python cgi pages (index, display), what i need to do is calculate time frame between the execution. Work flow: Index.py (submit) After submit it redirect to display.py page display.py page has got class with execute(),display() &init_main() functions In init_main() i have created class object which access to above functions I need to calculate time interval between the submit (index.py) to execute() end, so i can show user how much time does different weighted file takes on real time. Hoping to see your suggestions Thanks

    Read the article

  • Why loading of analytics blocks site loading?

    - by HasanGursoy
    Stupid government of Turkey have blocked Google's some IPs which were used for YouTube and now we can't access services like: translate, analytics. And the problem is some web-sites do not load until ga.js returns a response or request timeout. Even sometimes I'm expecting slow loading on stackoverflow and page load never completes. How can I make this web sites load faster and skip Google analytics files?

    Read the article

  • INSTEAD OF triggers do not support direct recursion

    - by senzacionale
    ALTER TRIGGER [dbo].[TRG_DeleteUser] ON [dbo].[Users] INSTEAD OF DELETE AS BEGIN SET NOCOUNT ON DECLARE @AspNetUserGuid UniqueIdentifier DECLARE @UserId NVARCHAR(36) BEGIN SET @AspNetUserGuid = (SELECT AspNetUserGuid FROM deleted) SET @UserId = (SELECT UserId FROM dbo.Users WHERE AspNetUserGuid = @AspNetUserGuid) IF @AspNetUserGuid IS NOT NULL AND @UserId IS NOT NULL BEGIN EXECUTE [dbo].UsersDelete @AspNetUserGuid, @UserId END END SET NOCOUNT OFF END problem is here: EXECUTE [dbo].UsersDelete @AspNetUserGuid, @UserId i need to call triger before row is actually deleted-

    Read the article

  • Python: Pass parameter one time, but use more times

    - by Gabriel L. Oliveira
    I'm trying to do this: commands = { 'py': 'python %s', 'md': 'markdown "%s" "%s.html"; gnome-open "%s.html"', } commands['md'] % 'file.md' But like you see, the commmands['md'] uses the parameter 3 times, but the commands['py'] just use once. How can I repeat the parameter without changing the last line (so, just passing the parameter one time?)

    Read the article

  • Rolling back a transaction in a Grails Service

    - by UltraVi01
    I have been updating all my services to be transactional by using Grail's ability to rollback when a RuntimeException is thrown in the service. I have, in most cases, doing this: def domain = new Domain(field: field) if (!domain.save()) { throw new RuntimeException() } Anyways, I wanted to verify that this indeed will rollback the transaction... it got me thinking as to whether at this point it's already been committed.. Also, if not, would setting flush:true change that? I am not very familiar with how Spring/Hibernate does all of this :)

    Read the article

  • What language is better suited for P2P video streaming?

    - by Roman
    I would like to write a Skype like software which allows P2P video/audio streaming. What language is better suited for that? There are several requirements: Software should be easy to install. It should be easy to program. I want to have access to video information. For example to make a face expression recognition on the fly. It should be free. I am thinking of Python and Java. Which one would be better? Or may be there is a third choice which is better? ADDED Flash is an attractive option since users can use their browser in which flash is installed by default and if not, it's easy to install flash. But I do not know if I can have access to video (if I want to do some processing). Moreover, Flash is not free.

    Read the article

  • recursive find in emacs?

    - by Stephen
    Is there a recursive find function for a find in emacs? I thought the 'nix "find" was implemented in eshell but perhaps not (I've been using it on OS X but it must have been calling FreeBSD's "find")... I know of rgrep, find-grep, grep-find, in emacs, but I don't actually need the grepping part. Perhaps it's a feature in one of dired's functions (though I didn't find it)? Using windows and I miss some 'nix utilities... thought emacs 23.2 might fill in for me.

    Read the article

< Previous Page | 18 19 20 21 22 23 24 25 26 27 28 29  | Next Page >