Daily Archives

Articles indexed Saturday April 3 2010

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

  • iteration on numbers with no 2 same digits

    - by rahmivolkan
    I dont know if it is asked (I couldn't find any). I want to iterate on this kind of numbers implemented on array; int a[10]; int i = 0; for( ; i < 10; i++ ) a[i] = i+1; now the array has "1 2 3 4 5 6 7 8 9 10" and I want to get "1 2 3 4 5 6 7 8 10 9" and then "1 2 3 4 5 6 7 9 8 10" "1 2 3 4 5 6 7 9 10 8" . . . . I tried to get an algorithm but I couldn't figure it out. Is there an easy way to implement "next" iterator for this kind of problems? Thanks in advance

    Read the article

  • ASP.net Modal Pop up extender and DropDownlist autopostback

    - by Jack
    Hi all. I have a gridview control where if the user click on the auto generated edit button. A window will pop up using modalpopup extender with a drop down list for user to select. The problem is the selectedindexchange event will not fire if autopostback is set to false but if i set the autopostback to true. the pop up will go away without going to the selectedindexchange event. is it possible to have a control with autopostback set to true inside the modal pop up?

    Read the article

  • DirectShow Filter I wrote dies after 10-24 seconds in Skype video call

    - by Robert Oschler
    I've written a DirectShow push filter for use with Skype using Delphi Pro 6 and the DSPACK DirectShow library. In preview mode, when you test a video input device in the Skype client Video Settings window, my filter works flawlessly. I can leave it up and running for many minutes without an error. However when I start a video call after 10 to 24 seconds, never longer, the video feed freezes. The call continues fine with the call duration counter clicking away the seconds, but the video feed is dead, stuck on whatever frame the freeze happened (although after a long while it turns black which I believe means Skype has given up on the filter). I tried attaching to the process from my debugger with a breakpoint literally set on every method call and none of them are hit once the freeze takes place. It's as if the thread that makes the DirectShow FillBuffer() call to my filter on behalf of Skype is dead or has been shutdown. I can't trace my filter in the debugger because during a Skype call I get weird int 1 and int 3 debugger hard interrupt calls when a Skype video call is in progress. This behavior happens even with my standard web cam input device selected and my DirectShow filter completely unregistered as a ActiveX server. I suspect it might be some "anti-debugging" code since it doesn't happen in video input preview mode. Either way, that is why I had to attach to the process after the fact to see if my FillBuffer() called was still being called and instead discovered that appears to be dead. Note, my plain vanilla USB web cam's DirectShow filter does not exhibit the freezing behavior and works fine for many minutes. There's something about my filter that Skype doesn't like. I've tried Sleep() statements of varying intervals, no Sleep statements, doing virtually nothing in the FillBuffer() call. Nothing helps. If anyone has any ideas on what might be the culprit here, I'd like to know. Thanks, Robert

    Read the article

  • NHibernate ICriteria with a bag

    - by plunk
    Hi, Just a quick question. If I've got 2 tables that are joined in a 3rd table with a many-to-many relationship, is it possible to write an ICriteria with expressions in one of the tables and the join table? Lets say the mapping file looks something like: <bag name ="Bag" table="JoinTable" cascade ="none"> <key column="Data_ID"/> <many-to-many class="Data2" column="Data2_ID"/> </bag> Is it then possible to write an ICriteria like the following? ICriteria crit = session.CreateCriteria(typeof(Data)); crit.Add(Expression.Eq("Name", name)); crit.Add(Expression.Between("Date", startDate, endDate)); crit.Add(Expression.Eq("Bag", data2IDNumber)); When I try this, it tells me I the expected type is IList, whereas the actual type is Bag. Thanks.

    Read the article

  • Would the world be a better place if there were only one programming language?

    - by Simon
    Well, perhaps not the world, but would it encourage more-re-use, less replication of basic code, or at least an uplift in what is considered basic code, more time advancing the application science and a greater encouragement to share, a more advanced base of understanding for new programmers, since the language could be taught ubiquitously and patterns of teaching would have emerged which were optimised for students learning etc etc? I think all of those things would make the programming world better and would probably have significant commercial benefit too. This is definitely not a religious debate about which language is best, and is predicated on the notion of some super-being having designed the perfect language to start with, which was improbable, but it strikes me that if, from the beginning, there were only a single programming language we may be further along in terms of the evolution of the software industry and software science. And although it is now impossible, if you buy some or all of these assertions is there an argument for standardising on a single language for the future so we can accelerate our collective progress rather than all of us re-inventing some part of the same wheel and consigning our children to the same fate?

    Read the article

  • Access denied when start sqlexpress from command line

    - by Brettski
    Windows 7 computer running SQL Server Express 2008. When I try to run net start mssql$sqlexpress I receive an error: System error 5 has occurred. Access is denied The SQL service is running under "Network Service" account The service starts fine if I use the services window. Could somebody help me figure out why I am receiving this error?

    Read the article

  • Jquery click event propagation

    - by ozsenegal
    I've a table with click events bind to it rows (tr). Also,there're A elements with it owns click events assigned inside those rows. Problem is when i click on A element,it also fires click event from TD.And Im dont want this behavior,i just want to fire A click's event. Code: //Event row TR $("tr:not(:first)").click(function(){ $(".window,.backFundo,.close").remove(); var position = $(this).offset().top; position = position < 0 ? 20 : position; $("body").append($("<div></div>").addClass("backFundo")); $("body").append($("<div></div>").addClass("window").html("<span class=close><img src=Images/close.png id=fechar /></span>").append("<span class=titulo>O que deseja fazer?</span><span class=crud><a href=# id=edit>Editar</a></span><span class=crud><a href=# id=delete codigo=" + $(this).children("td:first").html() + ">Excluir</a></span>").css({top:"20px"}).fadeIn("slow")); $(document).scrollTop(0); }); //Element event $("a").live("click",function(){alert("clicked!");}); Whenever you click the anchor it fires event from it parent row.Any ideas?

    Read the article

  • VBA-Sorting the data in a listbox, sort works but data in listbox not changed

    - by Mike Clemens
    A listbox is passed, the data placed in an array, the array is sort and then the data is placed back in the listbox. The part that does work is putting the data back in the listbox. Its like the listbox is being passed by value instead of by ref. Here's the sub that does the sort and the line of code that calls the sort sub. Private Sub SortListBox(ByRef LB As MSForms.ListBox) Dim First As Integer Dim Last As Integer Dim NumItems As Integer Dim i As Integer Dim j As Integer Dim Temp As String Dim TempArray() As Variant ReDim TempArray(LB.ListCount) First = LBound(TempArray) ' this works correctly Last = UBound(TempArray) - 1 ' this works correctly For i = First To Last TempArray(i) = LB.List(i) ' this works correctly Next i For i = First To Last For j = i + 1 To Last If TempArray(i) > TempArray(j) Then Temp = TempArray(j) TempArray(j) = TempArray(i) TempArray(i) = Temp End If Next j Next i ! data is now sorted LB.Clear ! this doesn't clear the items in the listbox For i = First To Last LB.AddItem TempArray(i) ! this doesn't work either Next i End Sub Private Sub InitializeForm() ' There's code here to put data in the list box Call SortListBox(FieldSelect.CompleteList) End Sub Thanks for your help.

    Read the article

  • removing null valued columns from dataset in asp .net

    - by N.Sai Harish
    I have a table which stores data with null valued columns for some entries .I want to retrieve only Not null data to the detail view. I tried the following foreach(string strTableField in (objDataSet.Tables[0].Columns[i])) { if(objDataSet.Tables[0].Columns[i].Equals(null)) { objDataSet.Tables[0].Columns.Remove(strTableField); objDataSet.Tables[0].AcceptChanges(); } i++; } but it is giving error .. Pls help me reg this ...

    Read the article

  • IE problem: keyboard interaction with checkbox

    - by Bobby Eickhoff
    I have an HTML table, and each row has a checkbox for selecting or deselecting its row. Whenever a checkbox changes value, I need to add or remove highlighting to the row and also ensure that the page's submit button is only enabled when at least one row is selected and disabled otherwise. The checkbox event handler is defined by the following function: function getCheckboxCallback() { return function () { var parentRow = getParentRow(this); if (!parentRow) { return; // No parent row found; abort } // Adjust the appearance of the row setSelected(parentRow, this.checked); // Count the number of selected table rows, and disable the submit // button whenever no rows are selected enforceInvariants(); return true; }; } Elsewhere in the same module, the checkboxes are given the event handlers: checkbox.onchange = getCheckboxCallback(); checkbox.onclick = getCheckboxCallback(); // alleged IE fix I'm working in Windows XP, and everything works fine in both Firefox 3 and Opera 9. However, IE 7 does not handle keyboard interaction well (mouse interaction works fine). The problem is that if a checkbox has the focus and I hit the spacebar, the checkbox doesn't get checked -- instead it gets half checked (it has the same shadowed appearance that it would get immediately after a mousedown). I have to press the spacebar a second time to actually check the box. Similarly, it requires two key presses to uncheck it. Oddly enough, if I hold down the spacebar for a few moments, then a single press works as expected. Can anyone explain what is going on here? Is there something I'm doing wrong in the JavaScript code that is causing this behavior? How can I fix this?

    Read the article

  • Can I change the emacs fancy-startup-text?

    - by ujj
    i would like to change the emacs fancy-startup-text (the splash screen that shows up, i know how to close it but not how to replace it with my own). idea is to build my own startup page that fetches some things from the web (news items, sport fixtures, word of the day etc) for emacs.

    Read the article

  • Objective-C : Member variable is losing reference between method calls.

    - by Winston
    Hello, I've been having with an objective-c class which appears to be losing its pointer reference between methods of the same class. In the MyTableViewController.h file, I declare: @interface SettingsTableViewController : UITableViewController <UITextFieldDelegate>{ OCRAppDelegate *delegate; } MyTableViewController.m file - (id) init { self = [ super initWithStyle: UITableViewStyleGrouped ]; delegate = [(OCRAppDelegate *)[[UIApplication sharedApplication] delegate] retain]; } The problem is when the "MyTableViewController" view appears again and a different method is executed within that same class, the delegate pointer (which was assigned during the init method) is no longer there. I tried to retain, but to no avail. Would anyone know why this is, it seems like perhaps it is a fundamental Objective-C issue which I am missing. Appreciate your help. Thanks, Winston

    Read the article

  • how to add annotation to map in xcode

    - by somu
    hai to all... i am trying to mark some places on map from xcode(iphone app) but now i can mark the only 1 place at a time ..i want to mark the so many places at a time with titles for them could any one help me its urgent thanks

    Read the article

  • Applying the Hibernate filter attribute to a Bag with a many-to-many relationship

    - by David P
    Consider the following Hibernate mapping file: <hibernate-mapping ...> <class name="ContentPackage" table="contentPackages"> <id name="Id" column="id" type="int"><generator class="native" /></id> ... <bag name="Clips" table="contentAudVidLinks"> <key column="fk_contentPackageId"></key> <many-to-many class="Clip" column="fk_AudVidId"></many-to-many> <filter name="effectiveDate" condition=":asOfDate BETWEEN startDate and endDate" /> </bag> </class> </hibernate-mapping> When I run the following command: _session.EnableFilter("effectiveDate").SetParameter("asOfDate", DateTime.Today); IList<ContentPackage> items = _session.CreateCriteria(typeof(ContentPackage)) .Add(Restrictions.Eq("Id", id)) .List<ContentPackage>(); The resulting SQL has the WHERE clause on the intermediate mapping table (contentAudVidLinks), rather than the "Clips" table even though I have added the filter attribute to the Bag of Clips. What am I doing wrong?

    Read the article

  • Image thumbnails flashes and then disappears in Windows Vista

    - by Hemant
    I have Windows Vista installed on my machine and I am facing this really annoying problem. Whenever I open a folder having images, image thumbnails appear for an instant and they are replaced by standard file icon. Argh... Points to note: Setting "Always show icon, never thumbnail" is unchecked Running Windows Aero theme (with transparency support) Have 4GB of RAM on my machine so memory is not a problem Please can you suggest a solution?

    Read the article

  • Word 97 installed with Outlook XP - Cannot use Word for default editor from Windows Explorer.

    - by xpda
    I am using Outlook 2002 (Office XP Update) with Word 97 and Excel 97. (The reason is that Microsoft refused to activate my legit copy of office 2003 when I got a new motherboard, Word XP crashed too much, and I prefer the newer Outlook. I would rather not send Microsoft more money to upgrade since they refuse to activate what I've already purchased. Please don't recommend an upgrade.) Now, I can tell Windows Explorer to use Word 97 to open, for example, a .txt file. But whenever I try to open the text file from Explorer, it either (a) started the Windows XP installer, or (b) tells me that the .txt file is an invalid Win32 application. Is there some way to straighten out the registry without reinstalling Windows XP? Excel 97 and Outlook 2002 are working fine.

    Read the article

  • Guessing UTF-8 encoding

    - by Dervin Thunk
    I have a question that may be quite naive, but I feel the need to ask, because I don't really know what is going on. I'm on Ubuntu. Suppose I do echo "t" > test.txt if I then file test.txt I get test.txt:ASCII text If I then do echo "å" > test.txt Then I get test.txt: UTF-8 Unicode text How does that happen? How does file "know" the encoding, or, alternatively, how does it guess it? Thanks.

    Read the article

  • Access denied when starting sqlexpress from command line

    - by Brettski
    Windows 7 computer running SQL Server Express 2008 (sp1). When I try to run net start mssql$sqlexpress I receive an error: System error 5 has occurred. Access is denied The SQL service is running under "Network Service" account The service starts fine if I use the services window. Could somebody help me figure out why I am receiving this error?

    Read the article

  • Difference in calling redefined functions in F# and Clojure

    - by Michiel Borkent
    In F#: > let f x = x + 2;; val f : int -> int > let g x = f x;; val g : int -> int > g 10;; val it : int = 12 > let f x = x + 3;; val f : int -> int > g 10;; val it : int = 12 In Clojure: (defn f [x] (+ x 2)) (defn g [x] (f x)) (g 10) ;; => 12 (defn f [x] (+ x 3)) (g 10) ;; => 13 Note that in Clojure the most recent version of f gets called in the last line. In F# however still the old version of f is called. Why is this?

    Read the article

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