Daily Archives

Articles indexed Thursday April 29 2010

Page 15/119 | < Previous Page | 11 12 13 14 15 16 17 18 19 20 21 22  | Next Page >

  • OCaml: Currying without defined values

    - by nicotine
    I have two functions f and g and I am trying to return f(g(x)) but I do not know the value of x and I am not really sure how to go about this. A more concrete example: if I have functions f = x + 1 and g = x * 2 and I am trying to return f(g(x)) I should get a function equal to (x*2) + 1

    Read the article

  • Auto-complete editor for SQL statement

    - by Stan
    Is there any plugings or text editor to auto-complete SQL statement? I am using SQL Server Management Studio (ssms) 90% of time, but most of time I have to type SELECT FROM WITH(NOLOCK) WHERE blahblah. Trying to find a more efficient way. Thanks.

    Read the article

  • Usage of Minidump within a COM Object

    - by nimo
    hi, I'm developing a COM dll which is an add-in to MSoffice. Since I'm not creating any logs within add-in I would like to add a crash report generator into my add-in. Hopefully 'Minidump' would be the best choice, but I have never use Minidump inside a COM object. I appreciate if somebody can point out possibilities of creating such crash dump with minidump inside a COM object. Thank You

    Read the article

  • Can this extension method be improved?

    - by Newbie
    I have the following extension method public static class ListExtensions { public static IEnumerable<T> Search<T>(this ICollection<T> collection, string stringToSearch) { foreach (T t in collection) { Type k = t.GetType(); PropertyInfo pi = k.GetProperty("Name"); if (pi.GetValue(t, null).Equals(stringToSearch)) { yield return t; } } } } What it does is by using reflection, it finds the name property and then filteres the record from the collection based on the matching string. This method is being called as List<FactorClass> listFC = new List<FactorClass>(); listFC.Add(new FactorClass { Name = "BKP", FactorValue="Book to price",IsGlobal =false }); listFC.Add(new FactorClass { Name = "YLD", FactorValue = "Dividend yield", IsGlobal = false }); listFC.Add(new FactorClass { Name = "EPM", FactorValue = "emp", IsGlobal = false }); listFC.Add(new FactorClass { Name = "SE", FactorValue = "something else", IsGlobal = false }); List<FactorClass> listFC1 = listFC.Search("BKP").ToList(); It is working fine. But a closer look into the extension method will reveal that Type k = t.GetType(); PropertyInfo pi = k.GetProperty("Name"); is actually inside a foreach loop which is actually not needed. I think we can take it outside the loop. But how? PLease help. (C#3.0)

    Read the article

  • How to get the row and column of button clicked, in the grid event handler?

    - by younevertell
    Once the added button in grid is clicked, how to find which row and column the button is located in the grid event handler, like click event or some other events? Not the button click event handler #region Grid event handler setup myGrid.MouseEnter += new MouseEventHandler(myGrid_MouseEnter); myGrid.MouseLeave += new MouseEventHandler(myGrid_MouseLeave); myGrid.MouseDown += new MouseButtonEventHandler(myGrid_MouseDown); myGrid.MouseUp += new MouseButtonEventHandler(myGrid_MouseUp); #endregion Thanks I notice that Boyan has some solution for the button click event handler case http://stackoverflow.com/questions/363100/in-wpf-how-can-i-determine-what-column-row-in-a-grid-a-control-is In the Click event handler for the button you say: int row; Button btn = sender as Button; if (btn != null) { row = Grid.GetRow(btn); // And you have the row number... } else { // A nasty error occurred... }

    Read the article

  • DShow : Enumeration sequence of IEnumMoniker

    - by KenC
    Hello, This is a question about DirectShow IEnumMoniker. Out of some reason, I have to know "what kind of order" IEnumMoniker enumerates items. (I mean, it's alphabetically or...?) The following pages are documents about IEnumMoniker, however, it doesn't mention about this : http://msdn.microsoft.com/en-us/library/ms692852(v=VS.85).aspx http://msdn.microsoft.com/en-us/library/dd407292%28VS.85%29.aspx If anybody has the idea about the enumeration sequence, please let me know. Thanks a lot.

    Read the article

  • Firebird 2.1: gfix -online returns "database shutdown"

    - by darvids0n
    Hey all. Googling this one hasn't made a bit of difference, unfortunately, as most results specify the syntax for onlining a database after using gfix -shut -force 30 (or any other number of seconds) as gfix -online dbname, and I have run gfix -online dbname with and without login credentials for the DB in question. The message that I get is: database dbname shutdown Which is fine, except that I want to bring it online now. It's out of the question to close fbserver.exe (running on a Windows box, afaik it's Classic Server 2.1.1 but it may be Super) since we have other databases running off of that which need almost 24/7 uptime. The message from doing another gfix -shut -force or -attach or -tran is invalid shutdown mode for dbname which appears to match with the documentation of what happens if the database is already fully shut down. Ideas and input greatly appreciated, especially since at the moment time is a factor for me. Thanks! EDIT: The whole reason I shut down the DB is to clear out "active" transactions which were linked to a specific IP address, and that computer is my dev terminal (actually a virtual machine where I develop frontends for the database software) but I had no processes connecting to the database at the time. They looked like orphaned transactions to me, and they weren't in limbo afaik. Running a manual sweep didn't clear them out, deleting the rows from MON$STATEMENTS didn't work even though Firebird 2.1 supposedly supports cancelling queries that way. My last resort was to "restart" the database, hence the above issue.

    Read the article

  • Subsonic how do I filter a loaded collection?

    - by Kamikaze
    Currently I am using Subsonic 2.1 and .NET 2.1 and I have an issue where I am attempting to filter a pre-loaded collection with 300+ items. I am using the following to attempt to preform the filter: orders = MasterOrders.Where("account", mbrAccount).Load(); The end results is setting orders equal to the entire MasterOrders collection and not the filtered results. Any suggestions?

    Read the article

  • Have a reloadData for a UITableView animate when changing

    - by Chris Butler
    Hi everyone. I have a UITableView that has two modes. When we switch between the modes I have a different number of sections and cells per section. Ideally, it would do some cool animation when the table grows or shrinks. Here is the code I tried, but it doesn't do anything: CGContextRef context = UIGraphicsGetCurrentContext(); [UIView beginAnimations:nil context:context]; [UIView setAnimationCurve:UIViewAnimationCurveEaseInOut]; [UIView setAnimationDuration:0.5]; [self.tableView reloadData]; [UIView commitAnimations]; Any thoughts on how I could do this? Thanks in advance.

    Read the article

  • iPhone Dev: Animating PNG Sequences

    - by Franky
    What is the best or recommended technique for animating PNG Sequences. Heres what I've learned: Do it Manually Using MutableArrays containing Strings, you can animate a UIImageView with a timer which increments an index number UIImage - animation methods This works, the only problem is to find if an image has completed its animation, you have to check the isAnimating BOOL, and to do that you need a timer. What is the best and recommended? Looking to do Oldschool game sprite animations, ie: Idle Animation Attack Animation Walk Animation ect... Let me know if any one has something. @lessfame

    Read the article

  • Parsing String to Time and insert in mysqldatabase

    - by kawtousse
    Goal: Parse a string from an input type text into TIME type to be inserted in MYSQL Database. String start= request.getParameter("startp"); System.out.println("start:" +start); SimpleDateFormat sdf = new SimpleDateFormat("HH:mm:ss"); long ms=0; try { ms = sdf.parse(start).getTime(); System.out.println(" the value of ms is:" +ms); } catch (ParseException e1) { // TODO Auto-generated catch block e1.printStackTrace(); } Time ts = new Time(ms); System.out.println("the value of ts is:" +ts); start:14:12 (value witch i entered actually in the form at the start field named startp) the value of ts is :01:00:00 java.text.ParseException: Unparseable date: "14:12" at java.text.DateFormat.parse(Unknown Source) ms not displayed I ensure that database type of the following parameter is TIME. Thanks.

    Read the article

  • Blackberry - Custom EditField Cursor

    - by varun
    Hi, I am new to Blackberry Development.This is my first Question for you people. I am creating a search box for my project. But it looks like blackberry doesn't have an internal api for creating single line Edit field. I have created a Custom Field by extending BasciEditField overriding methods like layout, paint. In paint i am drawing a rectangle with getpreferred width and height. But the cursor is coming at default position (top-left) in Edit Field. Can any body tell me how i can draw it where my text is(i.e in middle of Edit Field by calling drwaText()). Thanks,

    Read the article

  • mouse listener event

    - by user161004
    I have got a program having an array of buttons, each of these button has their mouselistener event. Now, how can i find which of the buton is clicked through the mouse listener.

    Read the article

  • SSL Certifcate Request s2003 DC CA DNS Name not Avaiable.

    - by Beuy
    I am trying to submit a request for an SSL certificate on a Domain Controller in order to enable LDAP SSL, and having no end of problems. I am following the information provided at http://support.microsoft.com/default.aspx?scid=kb;en-us;321051 & http://adldap.sourceforge.net/wiki/doku.php?id=ldap_over_ssl Steps taken so far: Create Servername.inf with the following information ;----------------- request.inf ----------------- [Version] Signature="$Windows NT$ [NewRequest] Subject = "CN=servername.domain.loc" ; replace with the FQDN of the DC KeySpec = 1 KeyLength = 1024 ; Can be 1024, 2048, 4096, 8192, or 16384. ; Larger key sizes are more secure, but have ; a greater impact on performance. Exportable = TRUE MachineKeySet = TRUE SMIME = False PrivateKeyArchive = FALSE UserProtected = FALSE UseExistingKeySet = FALSE ProviderName = "Microsoft RSA SChannel Cryptographic Provider" ProviderType = 12 RequestType = PKCS10 KeyUsage = 0xa0 [EnhancedKeyUsageExtension] OID=1.3.6.1.5.5.7.3.1 ; this is for Server Authentication ;----------------------------------------------- Create Certificate request by running: certreq -new Servername.inf Servername.req Attempt to submit Certificate request to CA by running: certreq -submit -attrib "CertificateTemplate: DomainController" request.req At which point I get the following error: The DNS name is unavailable and cannot be added to the Subject Alternate Name. 0x8009480f (-2146875377) Trouble shooting steps I have taken so far 1. Modify the Domain Controller Template to supply Subject Name in Request restart Certificate Service, include SAN in Request, same error. 2. Re-installed Certificate Services / IIS / Restarted machine countless times Any help resolving the issue would be greatly appreciated.

    Read the article

  • Cisco Linksys SLM2024/2048 firmware update

    - by pplrppl
    The initial firmware is 1.0.1 the new firmware is 2.0.0.8 http://www.cisco.com/en/US/docs/switches/lan/csbss/slm2024/release/notes/SLM2024-SLM2048_Release_Note.pdf Release notes say "Supports new GUI Style" and mention the default user name and pw. Does anyone have any experience with the new firmware? Is it Better, Worse, or totally cosmetic with no functional change?

    Read the article

  • Is there any SMS/MMS server for LAN environment

    - by Chau Chee Yang
    I am looking for a solution to send SMS/MMS message to mobile device from desktop or browser in LAN environment. As such, it is most probably using TCP/IP protocol to transmit request/response. The server may attach to a GSM device with SIM card attached. An server application would then start accept the request from any LAN client and convey the SMS/MMS to one or more recipients. The server may log all requests for further traffic analysis in later stage. Is there any solution that able to perform what I describe here. Please advice.

    Read the article

  • Modifying Bresenham's line algorithm

    - by sphennings
    I'm trying to use Bresenham's line algorithm to compute Field of View on a grid. The code I'm using calculates the lines without a problem but I'm having problems getting it to always return the line running from start point to endpoint. What do I need to do so that all lines returned run from (x0,y0) to (x1,y1) def bresenham_line(self, x0, y0, x1, y1): steep = abs(y1 - y0) > abs(x1 - x0) if steep: x0, y0 = y0, x0 x1, y1 = y1, x1 if x0 > x1: x0, x1 = x1, x0 y0, y1 = y1, y0 if y0 < y1: ystep = 1 else: ystep = -1 deltax = x1 - x0 deltay = abs(y1 - y0) error = -deltax / 2 y = y0 line = [] for x in range(x0, x1 + 1): if steep: line.append((y,x)) else: line.append((x,y)) error = error + deltay if error > 0: y = y + ystep error = error - deltax return line

    Read the article

  • Reload UIVIew on UIVIew from Xib

    - by ludo
    Hi, I have a UIViewController that I launch from a Xib file who's contain a UIView (0,0,320,480) and this UIView contain another UIView (0,0,320,250). Inside my ViewController, I need to reload the second UIView bu clicking on a button, how to do that? Thanks,

    Read the article

  • iPhone Developer Program registration for UK trading partnership

    - by CMLloyd
    I have been looking into this for a long time and have found no definitive answer. I can't be the only person to have faced this problem and am wondering how you guys proceeded in similar cases. I'm part of a partnership, based in the UK, trading as, lets say, "ABCD iPhone Apps" (legally, a perfectly legitimate way of doing business). I've now developed an iPhone App and I want our company name ("ABCD iPhone Apps") to appear as the seller in the App Store. This way, any future Apps that we develop can all get released under the "ABCD iPhone Apps" aegis too. Given that we aren't an incorporated company (and probably never will be), is it possible for us to enroll in the iPhone Developer Program as a company? Or is there another solution? (Note: I do also have an Individual account but that is for personal projects and is in no way connected to the partnership, and shall remain that way) EDIT: I've just spoken to a guy at ADC UK and he tells me there is no other solution. For a company to be approved on the Developer Program, Apple needs to see a copy of the company's Certificate of Incorporation during the registration process, otherwise no approval.

    Read the article

< Previous Page | 11 12 13 14 15 16 17 18 19 20 21 22  | Next Page >