Daily Archives

Articles indexed Wednesday March 31 2010

Page 31/124 | < Previous Page | 27 28 29 30 31 32 33 34 35 36 37 38  | Next Page >

  • Invoking cl.exe (MSVC compiler) in Cygwin shell

    - by barcarole
    I'm heavily using Cygwin (with Putty shell). But, it's quite tricky to invoke cl.exe (i.e., Visual C++ compiler toolchain) in the Cygwin bash shell. Running vcvars*.bat in the bash shell doesn't work obviously. I tried to migrate VC++'s environment variables to Cygwin, but it's not that easy. Is there anyone who ever tried to run VC++ compiler in Cygwin bash shell? Thanks, JJ

    Read the article

  • Is single float assignment an atomic operation on the iPhone?

    - by iter
    I assume that on a 32-bit device like the iPhone, assigning a short float is an atomic, thread-safe operation. I want to make sure it is. I have a C function that I want to call from an Objective-C thread, and I don't want to acquire a lock before calling it: void setFloatValue(float value) { globalFloat = value; }

    Read the article

  • Java portable media detection

    - by quosoo
    I would like to write a piece of java code that synchronizes files between local hard drive and a usb storage. I would like to have a different synchronization configuration depending on which usb storage is plugged in and I would like to have apropriate configuration to be selected automatically rather than chosen by the user. I've just read the JSR-80 and jUSB documentation as well as a bunch of articles and SO posts, but all of those are very old and it seems that since that time (around 2005) all the efforts have been abandoned especially for Windows platform, while the OS-independence is quite important to me (at least Windows and Linux need to be supported). Do I really need to use any of the USB APIs to recognize external drives that are connected to the system? I need something that is more unique than file path, drive letter or drive label... And if yes which one would you recommend (unless I missed something jUnit is actually the only for which Windows support exists).

    Read the article

  • TestDriven.net, right click, run test, doesn't re-build

    - by jeff
    I am using testDriven.net and when I right-click and run tests, it appears to build, then runs the test. Only it doesn't really do the build. I keep making changes and the test still fails:) I have to do a VS Build, then run the testDriven.net to get changes to take effect. This clears up for a while if I delete the solution's .SUO file. Any thoughts?

    Read the article

  • deriving from NSTabViewItem

    - by Jonny
    I'm writing a Cocoa app. One dialog has 3 tabs, some of the tabs needs more loading time, so I want to load them lazily. Since each Tab is a NSTabViewItem class, so I'm trying to derive from it and overriding its view property. In the view getter method, I use a ViewController to load a view and returns out. In Debugging, I found NSTabViewItem -view method is get called correctly, but after that NSTabView tries to set Initial FirstResponder and crashed with message: * Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'In -[NSTabViewItem setInitialFirstResponder:], the first responder must descend from the tab view item's view. (Item: Invalid responder: )' I tried to override the -initialFirstResponder method to return a sub-view of my loaded view, but it still crashes the same place. does anyone know how to get it work correctly? Also is it correct way to do this by deriving the NSTabViewItem? thanks! -Jonny

    Read the article

  • Linq to LLBLGen query problem

    - by Jeroen Breuer
    Hello, I've got a Stored Procedure and i'm trying to convert it to a Linq to LLBLGen query. The query in Linq to LLBGen works, but when I trace the query which is send to sql server it is far from perfect. This is the Stored Procedure: ALTER PROCEDURE [dbo].[spDIGI_GetAllUmbracoProducts] -- Add the parameters for the stored procedure. @searchText nvarchar(255), @startRowIndex int, @maximumRows int, @sortExpression nvarchar(255) AS BEGIN SET @startRowIndex = @startRowIndex + 1 SET @searchText = '%' + @searchText + '%' -- SET NOCOUNT ON added to prevent extra result sets from -- interfering with SELECT statements. SET NOCOUNT ON; -- This is the query which will fetch all the UmbracoProducts. -- This query also supports paging and sorting. WITH UmbracoOverview As ( SELECT ROW_NUMBER() OVER( ORDER BY CASE WHEN @sortExpression = 'productName' THEN umbracoProduct.productName WHEN @sortExpression = 'productCode' THEN umbracoProduct.productCode END ASC, CASE WHEN @sortExpression = 'productName DESC' THEN umbracoProduct.productName WHEN @sortExpression = 'productCode DESC' THEN umbracoProduct.productCode END DESC ) AS row_num, umbracoProduct.umbracoProductId, umbracoProduct.productName, umbracoProduct.productCode FROM umbracoProduct INNER JOIN product ON umbracoProduct.umbracoProductId = product.umbracoProductId WHERE (umbracoProduct.productName LIKE @searchText OR umbracoProduct.productCode LIKE @searchText OR product.code LIKE @searchText OR product.description LIKE @searchText OR product.descriptionLong LIKE @searchText OR product.unitCode LIKE @searchText) ) SELECT UmbracoOverview.UmbracoProductId, UmbracoOverview.productName, UmbracoOverview.productCode FROM UmbracoOverview WHERE (row_num >= @startRowIndex AND row_num < (@startRowIndex + @maximumRows)) -- This query will count all the UmbracoProducts. -- This query is used for paging inside ASP.NET. SELECT COUNT (umbracoProduct.umbracoProductId) AS CountNumber FROM umbracoProduct INNER JOIN product ON umbracoProduct.umbracoProductId = product.umbracoProductId WHERE (umbracoProduct.productName LIKE @searchText OR umbracoProduct.productCode LIKE @searchText OR product.code LIKE @searchText OR product.description LIKE @searchText OR product.descriptionLong LIKE @searchText OR product.unitCode LIKE @searchText) END This is my Linq to LLBLGen query: using System.Linq.Dynamic; var q = ( from up in MetaData.UmbracoProduct join p in MetaData.Product on up.UmbracoProductId equals p.UmbracoProductId where up.ProductCode.Contains(searchText) || up.ProductName.Contains(searchText) || p.Code.Contains(searchText) || p.Description.Contains(searchText) || p.DescriptionLong.Contains(searchText) || p.UnitCode.Contains(searchText) select new UmbracoProductOverview { UmbracoProductId = up.UmbracoProductId, ProductName = up.ProductName, ProductCode = up.ProductCode } ).OrderBy(sortExpression); //Save the count in HttpContext.Current.Items. This value will only be saved during 1 single HTTP request. HttpContext.Current.Items["AllProductsCount"] = q.Count(); //Returns the results paged. return q.Skip(startRowIndex).Take(maximumRows).ToList<UmbracoProductOverview>(); This is my Initial expression to process: value(SD.LLBLGen.Pro.LinqSupportClasses.DataSource`1[Eurofysica.DB.EntityClasses.UmbracoProductEntity]).Join(value(SD.LLBLGen.Pro.LinqSupportClasses.DataSource`1[Eurofysica.DB.EntityClasses.ProductEntity]), up => up.UmbracoProductId, p => p.UmbracoProductId, (up, p) => new <>f__AnonymousType0`2(up = up, p = p)).Where(<>h__TransparentIdentifier0 => (((((<>h__TransparentIdentifier0.up.ProductCode.Contains(value(Eurofysica.BusinessLogic.BLL.Controllers.UmbracoProductController+<>c__DisplayClass1).searchText) || <>h__TransparentIdentifier0.up.ProductName.Contains(value(Eurofysica.BusinessLogic.BLL.Controllers.UmbracoProductController+<>c__DisplayClass1).searchText)) || <>h__TransparentIdentifier0.p.Code.Contains(value(Eurofysica.BusinessLogic.BLL.Controllers.UmbracoProductController+<>c__DisplayClass1).searchText)) || <>h__TransparentIdentifier0.p.Description.Contains(value(Eurofysica.BusinessLogic.BLL.Controllers.UmbracoProductController+<>c__DisplayClass1).searchText)) || <>h__TransparentIdentifier0.p.DescriptionLong.Contains(value(Eurofysica.BusinessLogic.BLL.Controllers.UmbracoProductController+<>c__DisplayClass1).searchText)) || <>h__TransparentIdentifier0.p.UnitCode.Contains(value(Eurofysica.BusinessLogic.BLL.Controllers.UmbracoProductController+<>c__DisplayClass1).searchText))).Select(<>h__TransparentIdentifier0 => new UmbracoProductOverview() {UmbracoProductId = <>h__TransparentIdentifier0.up.UmbracoProductId, ProductName = <>h__TransparentIdentifier0.up.ProductName, ProductCode = <>h__TransparentIdentifier0.up.ProductCode}).OrderBy( => .ProductName).Count() Now this is how the queries look like that are send to sql server: Select query: Query: SELECT [LPA_L2].[umbracoProductId] AS [UmbracoProductId], [LPA_L2].[productName] AS [ProductName], [LPA_L2].[productCode] AS [ProductCode] FROM ( [eurofysica].[dbo].[umbracoProduct] [LPA_L2] INNER JOIN [eurofysica].[dbo].[product] [LPA_L3] ON [LPA_L2].[umbracoProductId] = [LPA_L3].[umbracoProductId]) WHERE ( ( ( ( ( ( ( ( [LPA_L2].[productCode] LIKE @ProductCode1) OR ( [LPA_L2].[productName] LIKE @ProductName2)) OR ( [LPA_L3].[code] LIKE @Code3)) OR ( [LPA_L3].[description] LIKE @Description4)) OR ( [LPA_L3].[descriptionLong] LIKE @DescriptionLong5)) OR ( [LPA_L3].[unitCode] LIKE @UnitCode6)))) Parameter: @ProductCode1 : String. Length: 2. Precision: 0. Scale: 0. Direction: Input. Value: "%%". Parameter: @ProductName2 : String. Length: 2. Precision: 0. Scale: 0. Direction: Input. Value: "%%". Parameter: @Code3 : String. Length: 2. Precision: 0. Scale: 0. Direction: Input. Value: "%%". Parameter: @Description4 : String. Length: 2. Precision: 0. Scale: 0. Direction: Input. Value: "%%". Parameter: @DescriptionLong5 : String. Length: 2. Precision: 0. Scale: 0. Direction: Input. Value: "%%". Parameter: @UnitCode6 : String. Length: 2. Precision: 0. Scale: 0. Direction: Input. Value: "%%". Count query: Query: SELECT TOP 1 COUNT(*) AS [LPAV_] FROM (SELECT [LPA_L2].[umbracoProductId] AS [UmbracoProductId], [LPA_L2].[productName] AS [ProductName], [LPA_L2].[productCode] AS [ProductCode] FROM ( [eurofysica].[dbo].[umbracoProduct] [LPA_L2] INNER JOIN [eurofysica].[dbo].[product] [LPA_L3] ON [LPA_L2].[umbracoProductId] = [LPA_L3].[umbracoProductId]) WHERE ( ( ( ( ( ( ( ( [LPA_L2].[productCode] LIKE @ProductCode1) OR ( [LPA_L2].[productName] LIKE @ProductName2)) OR ( [LPA_L3].[code] LIKE @Code3)) OR ( [LPA_L3].[description] LIKE @Description4)) OR ( [LPA_L3].[descriptionLong] LIKE @DescriptionLong5)) OR ( [LPA_L3].[unitCode] LIKE @UnitCode6))))) [LPA_L1] Parameter: @ProductCode1 : String. Length: 2. Precision: 0. Scale: 0. Direction: Input. Value: "%%". Parameter: @ProductName2 : String. Length: 2. Precision: 0. Scale: 0. Direction: Input. Value: "%%". Parameter: @Code3 : String. Length: 2. Precision: 0. Scale: 0. Direction: Input. Value: "%%". Parameter: @Description4 : String. Length: 2. Precision: 0. Scale: 0. Direction: Input. Value: "%%". Parameter: @DescriptionLong5 : String. Length: 2. Precision: 0. Scale: 0. Direction: Input. Value: "%%". Parameter: @UnitCode6 : String. Length: 2. Precision: 0. Scale: 0. Direction: Input. Value: "%%". As you can see no sorting or paging is done (like in my Stored Procedure). This is probably done inside the code after all the results are fetched. This costs a lot of performance! Does anybody know how I can convert my Stored Procedure to Linq to LLBLGen the proper way?

    Read the article

  • How do I set IP access / password restrictions in Apache?

    - by Mouthbreather
    I'd like to restrict access to my Rails app (running on Apache/Passenger) to just two IPs, but if the visitor doesn't fall into those two IPs, I would like for him/her to be prompted to enter a password that would allow any user with the proper credentials to access the site from anywhere. I am new to configuring Apache and would appreciate any hints. Thanks!

    Read the article

  • Is it possible to resize a SpriteAsset without adding it to the display list?

    - by Sophistifunk
    Hi guys, I have an embedded image asset (with a scale9 grid), and I'm trying to get the bitmapdata when it's resized, but I can't seem to do this without adding it to the display list. I try this: spriteAsset.setActualSize(w,h); spriteAsset.width = w; bmd.draw(spriteAsset); But when I then draw out the bitmapdata with graphics.beginBitmapFill(), I just get the original un-stretched image. Any pointers? Or do I need to take 9 separate BitmapData images and make 9 separate bitmap fills? Cheers, -Josh

    Read the article

  • Timeout expired in sql server problem

    - by Avinash
    set con2=server.CreateObject("ADODB.Connection") con2.ConnectionTimeout =1200 con2.open "Driver={SQL Server};server=111.111.111.11;user id=xx;pwd=xxx;Database=xxx" con2.execute("DELETE FROM tablename WHERE fieldid NOT IN(SELECT fieldid FROM tablename2)") con2.close set con2=nothing when i running this query using asp the following error occured. How to solve this issue? Microsoft OLE DB Provider for ODBC Drivers error '80040e31' [Microsoft][ODBC SQL Server Driver]Timeout expired

    Read the article

  • http proxy for debugging purposes

    - by flybywire
    I am looking for a preferably free http proxy to be used for debugging purposes. I already have firebug and firebug lite in my tool set, but firebug lite won't let me see ajax requests in internet explorer. I thought an intercepting proxy might do the feat

    Read the article

  • When to use an IOC container?

    - by nivlam
    I'm trying to understand when I should use a container versus manually injecting dependencies. If I have an application that uses a 1-2 interfaces and only has 1-2 concrete implementations for each interface, I would lean towards just handling that myself. If I have a small application that uses 2-3 interfaces and each interface has 2-3 concrete implementations, should I use a full-blown container? Would something something simple like this suffice? Basically I'm trying to understand when it's appropriate to manually handle these dependencies, when (or if) I should use something simple like the above, and when to use an IOC container like Ninject, Windsor, etc....

    Read the article

  • Settings for RTMP and AS 3.0

    - by coderex
    Hi, Is there any extra code need for using rtmp with AS3. I have the code like this. Is that enough for rtmp or any other code needed? var strSource:String = "rtmp://myserver.com/file.flv"; var ncConnection = new NetConnection(); var nsStream = new NetStream(ncConnection); nsStream.play(strSource);

    Read the article

  • Bing map silverlight control content rendering issue when page gets refresh

    - by M.Afnan
    When Bing map control loads for first time on any browser all pushpin on map are visible. Bing map control renders perfectly. Then I refresh browser it create rendering issue some custom pushpin on map gets disappeared. This behavior continues with pushpin. Pushpin are (.png) images and I am not using default bing map thumbtacks. May be it is issue of browser caching content or Bing map control rendering issues on various browsers. Waiting for your response.

    Read the article

  • Access Database Connection

    - by Gerory
    I am using C#.net application with oledbConnection to open database in exclusive mode what exactly process in backend when we open database in exclusive mode , it not increse size of database compare to shared mode connectivity. Is it doing Compat or Repair when it close connection of Exclusive Mode?? As we are facing unExpected Errors at time of open connection using Exclusive mode & its come abnormally even we have dispossed all connection properly. Please share ur view ...if it doing compact/reapai at time of closing connection is there a way to wait before opening new Connection?

    Read the article

  • PHP SQL Server Connection

    - by ajithperuva
    I am using SQL Server as my backend for program.when i am try to connect with database which not shows any type of errors,but it is not working.Which is not getting connection. My code is like mssql_connect('servername', 'db_user', 'db_password') or die('Error'); The funny thing is which is not connecting and also which is not show message Error. How can we enable SQL Server configuration using php program (what is the script for that.not manually). How could we know the actual status of SQL Server in server? My application is working properly in local;the problem is about public hosting.

    Read the article

  • MS-Access 2007 Time Online Report

    - by Daniel
    I have the following data in my database: MemberID | DateTime ------------------------------------- 1 | 31/03/2010 3:45:49 PM 2 | 31/03/2010 3:55:29 PM 1 | 31/03/2010 4:45:49 PM Every time a user is authenticated or un-authenticated this log appears in the database. What I want to be able to do is total the time for a given user and date. Member 1 was online for 1 hour and 37 minutes. I would like to do this with sql as a report in access 2007 if anyone could help, that would be appreciated. Cheers, Daniel

    Read the article

  • [Silverlight 4] New PathListBox Control

    - by FernandoCortes
    One of the new features of Silverlight 4 is the new PathListBox Control. This control is basically a Listbox control witch takes the layout of a shape that you want, so we can represent our data as we want without limits.   So we are ready to open the new Microsoft Blend 4 Beta. First, we going to create a new Silverlight Data Driven Application (MVVM) project.   Open the main view (MainView.xaml), you can find it in Views folder, i look for the new control.   Once you add the PathListbox Control to the main layout of the MainView.xaml, we will add a Line Shape. Now, we are in the main step. Set the LayoutPaths property of the PathListbox control with the line shape that is just created.   The final step is set the ItemsSource property of the PathListbox control. We are going to use a mock object collection from the main view model. I have created the object collection on the main view model created by the Silverlight MVVM project template.   This is the result that we can improve with some animations. This a basic basic use of the PathListbox but using your imagination you can do very cool things.

    Read the article

  • Virtual machine image compatibility between VMware Server and VMware Player

    - by alexandrul
    I'm trying to minimize the number of different product versions used on my PC's both at work and at home. So far I have a mixture of: VMware Server 1.0.7 VMware Server 2.0.2 VMware Player 2.5.3 VMware Player 3.0.0 and I would love to upgrade each product family to the latest version. Since Virtual Machine Mobility Guide is marked as deprecated, can anyone point me to some fresh information about virtual machine compatibility between VMware Player and VMware Server, in order to still be able to move virtual machines back and forth between the mentioned products? Update What I'm looking for is an updated document with virtual machines hardware versions, and the VMware products that are able to use that specific hardware version, so I can know - given the products that are using a specific virtual machine - what is the maximum hardware version that I can update the virtual machine to.

    Read the article

  • monitoring TCP/IP performance on Solaris

    - by Andy Faibishenko
    I am trying to tune a high message traffic system running on Solaris. The architecture is a large number (600) of clients which connect via TCP to a big Solaris server and then send/receive relatively small messages (.5 to 1K payload) at high rates. The goal is to minimize the latency of each message processed. I suspect that the TCP stack of the server is getting overwhelmed by all the traffic. What are some commands/metrics that I can use to confirm this, and in case this is true, what is the best way to alleviate this bottleneck?

    Read the article

  • Audio input problem in Ubuntu 9.10

    - by Andrea Ambu
    My audio input is a mix of my mic output and my sound card output. I'd like it to be just my mic output. I was able to do so in Ubuntu 9.04 but the interface is 9.10 is totally changed and I tried every my creativity was able to think. It's really annoying when talking to other people over the internet because they keep hearing their voice back. I'm not sure I explained it in clear way so I'll give you an example: What I do: I put an mp3 on play or a video on youtube then open a recorder and start to talk on my mic. What happens: both my voice and audio from mp3/youtube get reordered, even if I put headphones volume to 0 (via hardware). What I'd like to happen: Only my voice should be recorded. I'm sure I'm missing some technical term, but that's the problem and I'd like to solve it in Ubuntu 9.10, any idea?

    Read the article

  • Remote Desktop and Num Lock

    - by PressAnyKey
    Whenever I log into my Windows 7 desktop from my Windows 7 laptop using RDC, the Num Lock is enabled on the host computer and it is not disabled after disconnecting. What can I do to stop the Num Lock from being enabled or automatically disable it at the end of the session? (I do not know if this happens only on Windows 7 and have no way of checking, so I went with the generic windows tag)

    Read the article

  • Regular expression to validate whether the data contains numeric ( or empty is also valid)

    - by VinnaKanna
    Hi all, i have to validate the data contains numeric or not and if it is not numeric return 0 and if it is numeric or empty return 1. Below is my query i tried in SQL SELECTdbo.Regex('^[0-9]','123') --- This is returning 1 SELECTdbo.Regex('^[0-9]','') -- this is not returning 1 but i want to return as 1 and i try to put space in "pattern" also it is not working... please can any one help.... Thanks in advance

    Read the article

  • Custom Tag implementation issue

    - by Appps
    I have a custom tag as follows. repeat and heading tag have doAfterBody method implemented. <csajsp:repeat reps="5"> <LI> <csajsp:heading bgColor="BLACK"> White on Black Heading </csajsp:heading> </LI> </csajsp:repeat> /* Repeat tag Class*/ public void setReps(String repeats) { System.out.println("TESTING"+repeats); //sets the reps variable. } public int doAfterBody() { System.out.println("Inside repeate tag"+reps); if (reps-- >= 1) { BodyContent body = getBodyContent(); try { JspWriter out = body.getEnclosingWriter(); System.out.println("BODY"+body.getString()); out.println(body.getString()); body.clearBody(); // Clear for next evaluation } catch(IOException ioe) { System.out.println("Error in RepeatTag: " + ioe); } return(EVAL_BODY_TAG); } else { return(SKIP_BODY); } } /* Class of Heading tag */ public int doAfterBody() { System.out.println("inside heading tag"); BodyContent body = getBodyContent(); System.out.println(body.getString()); try { JspWriter out = body.getEnclosingWriter(); out.print("NEW TEXT"); } catch(IOException ioe) { System.out.println("Error in FilterTag: " + ioe); } // SKIP_BODY means I'm done. If I wanted to evaluate // and handle the body again, I'd return EVAL_BODY_TAG. return(SKIP_BODY); } public int doEndTag() { try { JspWriter out = pageContext.getOut(); out.print("NEW TEXT 2"); } catch(IOException ioe) { System.out.println("Error in HeadingTag: " + ioe); } return(EVAL_PAGE); // Continue with rest of JSP page } The order in which SOP are printed is 1) Setter method of csajsp:repeat is called. 2) White on Black Heading is printed. ie doAfterBody of csajsp:heading tag is called. I don't know why it is not calling doAfterBody of csajsp:repeat tag. Please help me to understand this. Thanks in advance.

    Read the article

< Previous Page | 27 28 29 30 31 32 33 34 35 36 37 38  | Next Page >