Daily Archives

Articles indexed Sunday April 18 2010

Page 20/77 | < Previous Page | 16 17 18 19 20 21 22 23 24 25 26 27  | Next Page >

  • An analog of String.Join(string, string[]) for IEnumerable<T>

    - by abatishchev
    class String contains very useful method - String.Join(string, string[]). It creates a string from an array, separating each element of array with a symbol given. But general - it doesn't add a separator after the last element! I uses it for ASP.NET coding for separating with "<br />" or Environment.NewLine. So I want to add an empty row after each row in asp:Table. What method of IEnumerable<TableRow> can I use for the same functionality?

    Read the article

  • C# Create Snap To Grid Functionality

    - by Nathan
    I am trying to create some snap to grid functionality to be used at run time but I am having problems with the snapping part. I have successfully drawn a dotted grid on a panel but when I add a label control to the panel how to I snap the top, left corner of the label to the nearest dot? Thanks

    Read the article

  • Top10 List before Migrating to the Cloud

    - by Webgui
    Everybody's talking about putting their apps on the Cloud these days. But what do they really need to know when considering such a project?! Chevy (Fleischman) Weiss & Itzik Spitzen of Visual WebGui have put together a list of the 10 most important things you need to know and check before you start migrating your apps to the Cloud. Read the list >

    Read the article

  • How do I call functions of an object inside the same object?

    - by Roly
    I have the following Javascript code add_num = { f: function(html, num) { alert(this.page); }, page : function() { return parseInt(this.gup('page')); }, gup : function(name) { name = name.replace(/[\[]/,'\\\[').replace(/[\]]/,'\\\]'); var regex = new RegExp('[\\?&]'+name+'=([^&#]*)'); var results = regex.exec(window.location.href); if(results == null) return ''; else return results[1]; } } But when I call add_num.f() what I get from alert() is the actual code of page. That is, it returns function() { return parseInt(this.gup('page')); } I was expecting a numeric value and not any code at all.

    Read the article

  • WebService or WebRequest for database updates in ASP.NET

    - by eugeneK
    I'm currently making some system that will gather statistical reports from different sites, for any user transaction in there. My question is for would be better to implement from you experience ... All websites that will report data to statistics sites are on my servers. So whats better to user WebRequest to send GET data to page or to use Webservice for that... thanks

    Read the article

  • Post/Redirect/Get Pattern and Sticky Forms

    - by Scott Christopherson
    I'm using the Post/Redirect/Get pattern on a form of mine. I've never used this approach before and I'm trying to figure something out: Normally, I always just displayed the posted form again when there were validation errors and displayed POST values in the form (sticky form). However with the PRG pattern, the form is displayed after a redirect, so there aren't any POST values. So my question is, how can I implement the PRG pattern and still have sticky forms?

    Read the article

  • Hibernate proxy serialization and receive on client side.

    - by Bubba88
    I lack understanding of how does the generated proxy class object (CGLib enhanced POJO) is transferred to the remote client and still pertains its ability to generate Lazy Init. Exceptions. Does that mean that there is some kind of contract that all the transferred objects of some kind of class (a proxy) will be reinstantiated as proxies again? Where does the client obtain those generated classes? Sorry, but I totally do not understand.

    Read the article

  • TAPI lineGetAddressID() fails with LINEERR_INVALADDRESS

    - by PaulH
    I have a windows mobile 6 application using TAPI 2.0. lineGetAddressID() is needed to get the address identifier used by several calls in the telephone api, but I can't get it to work. I have tried the following to no avail: HLINE line; // valid handle from lineOpen(); DWORD addr_id = 0; result = ::lineGetAddressID( line, &addr_id, LINEADDRESSMODE_DIALABLEADDR, L"1234", 5 ); result = ::lineGetAddressID( line, &addr_id, LINEADDRESSMODE_DIALABLEADDR, L"5551234", 8 ); result = ::lineGetAddressID( line, &addr_id, LINEADDRESSMODE_DIALABLEADDR, L"1115551234", 11 ); result = ::lineGetAddressID( line, &addr_id, LINEADDRESSMODE_DIALABLEADDR, L"11115551234", 12 ); All of them return LINEERR_INVALADDRESS. Can anybody point out what I may be doing wrong? As a side question, how can I programmaticly get the address? It appears in the LINEADDRESSCAPS structure returned by lineGetAddressCaps(), but that requires an address identifier (which would need to come from lineGetAddressID(), which requires an address...). Note: I realize I could use 0 as the address ID and it will probably work, but I have no guarantee it will work for every platform. I would like to get this solved 'right'. Thanks, PaulH

    Read the article

  • C# - NetworkChangeEventHandler

    - by Andy
    I have small application which catches Network Availability change and its working very fine in client Desktop m/c (which is having XP) But when I tested the same in Vista by disabling the network and enabling it again..the event is not getting triggered. NetworkChange.NetworkAvailabilityChanged += new NetworkAvailabilityChangedEventHandler(NetworkChange_NetworkAvailabilityChanged); private void NetworkChange_NetworkAvailabilityChanged(object sender, NetworkAvailabilityEventArgs e) {.....} Does .Net framework 3.5 got any new solution introduced ...

    Read the article

  • Datetime NOW PHP mysql (+ PDO variant)

    - by Chris
    Thanks for looking. All helpful answers/comments are up voted. In php, you can use NOW() like this: mysql_query("INSERT INTO tablename (id, value, time_created) VALUES ('{$id}', '{$value}', NOW())"); How can I do the same thing in PDO. When I bind like this, I get an error: $stmt->bindParam(':time_added', NOW(), PDO::PARAM_STR); Is it the PDO:PARAM_STR?

    Read the article

  • Print an array elements

    - by 1ace1
    Hello guys, this is my first post and im still a beginner in the programming world so bare with me. I just created an array with 100 initialized values and i want to print out 10 elements on each line so it would be somthing like this 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 ...26 this is the code i used and i managed to do it for the first 10 elements but i couldnt figure out how to do it for the rest public static void main(String[] args) { int[] numbers = { 0,1,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17}; int i, count = 0; for (i = 0; i < numbers.length; i++) { System.out.print(numbers[i] + " "); count++; if (count == 9) for (i = 9; i < numbers.length; i++) System.out.println(numbers[i] + " "); } } thanks!

    Read the article

  • (C# - windows forms) changing properties of controls that were added at runtime

    - by user257412
    I have a form in which several buttons are added at runtime via a 'for' method public Form() { for (int i = 0 ... ) Button b = new Button() b.text = (string) i ; etc.. etc.. } . now i wish to change the text property of the buttons on a certain event. How can this be accomplished? I have tried a few things but none worked.. since the buttons variables are inside the method , they are not available outside. Thanks

    Read the article

  • win7 amd64 guest in kvm does not have sound

    - by davidshen84
    hi, my host system is gentoo amd64, guest system is win 7 amd64. the guest system can work, except it does not have sound. i start kvm with -soundhw ac97, QEMU_AUDIO_DRV='alsa', and after i get into the guest system, i can see a 'Multimedia Audio Controller' in the device manager. but win7 cannot find the driver for it. i searched the network for a long time, and i cannot find a driver for intel ac97 for win7 amd64. i also tried -soundhw sb16, es1370, none of them work. please help me fix this.

    Read the article

  • Vibrations when exploding/repacking movie

    - by Stefano Borini
    Please bear with me, I know that what I'm doing can sound strange, but I can guarantee there's a very good reason for that. I took a movie with my camera, as avi. I imported the movie into iMovie and then exploded the single frames as PNG. Then I repacked these frames into mov using the following code movie, error = QTMovie.alloc().initToWritableFile_error_(out_path, None) mt = QTMakeTime(v, scale) attrib = {QTAddImageCodecType: "jpeg"} for path in png_paths: image = NSImage.alloc().initWithContentsOfFile_(path) movie.addImage_forDuration_withAttributes_(image, mt, attrib) movie.updateMovieFile() The resulting mov works, but it looks like the frames are "nervous" and shaky when compared to the original avi, which appears smoother. The size of the two files is approximately the same, and both the export and repacking occurred at 30 fps. The pics also appear to be aligned, so it's not due to accidental shift of the frames. My question is: by knowing the file formats and the process I performed, what is the probable cause of such result ? How can I fix it ?

    Read the article

  • Is there a redraw-event for HTML5's canvas element?

    - by valmar
    As the title says, I need a notification when the content of a canvas element was redrawn. Is this possible? If not, a notification when the whole page was redrawn would also be ok (reDRAWN not reLOADED!). The reason why I need this is that I want to get the current FPS of an animation running inside a canvas.

    Read the article

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