Search Results

Search found 3312 results on 133 pages for 'david michel'.

Page 64/133 | < Previous Page | 60 61 62 63 64 65 66 67 68 69 70 71  | Next Page >

  • NSFileManager - Copying Files at Startup

    - by David Schiefer
    Hi, I need to copy a few sample files from my app's resource folder and place them in my app's document folder. I came up with the attached code, it compiles fine but it doesn't work. All the directories I refer to do exist. I'm not quite sure what I am doing wrong, could someone point me in the right direction please? NSFileManager*manager = [NSFileManager defaultManager]; NSString*dirToCopyTo = [NSHomeDirectory() stringByAppendingPathComponent:@"Documents"]; NSString*path = [[NSBundle mainBundle] resourcePath]; NSString*dirToCopyFrom = [path stringByAppendingPathComponent:@"Samples"]; NSError*error; NSArray*files = [manager contentsOfDirectoryAtPath:dirToCopyTo error:nil]; for (NSString *file in files) { [manager copyItemAtPath:[dirToCopyFrom stringByAppendingPathComponent:file] toPath:dirToCopyTo error:&error]; if (error) { NSLog(@"%@",[error localizedDescription]); } }

    Read the article

  • Data Driven MSTest: DataRow is always null

    - by David Back
    I am having a problem using Visual Studio data driven testing. I have tried to deconstruct this to the simplest example. I am using Visual Studio 2012. I create a new unit test project. I am referencing system data. My code looks like this: namespace UnitTestProject1 { [TestClass] public class UnitTest1 { [DeploymentItem(@"OrderService.csv")] [DataSource("Microsoft.VisualStudio.TestTools.DataSource.CSV", "OrderService.csv", "OrderService#csv", DataAccessMethod.Sequential)] [TestMethod] public void TestMethod1() { try { Debug.WriteLine(TestContext.DataRow["ID"]); } catch (Exception ex) { Assert.Fail(); } } public TestContext TestContext { get; set; } } } I have a very small csv file that I have set the Build Options to to 'Content' and 'Copy Always'. I have added a .testsettings file to the solution, and set enable deployment, and added the csv file. I have tried this with and without |DataDirectory|, and with/without a full path specified (the same path that I get with Environment.CurrentDirectory). I've tried variations of "../" and "../../" just in case. Right now the csv is at the project root level, same as the .cs test code file. I have tried variations with xml as well as csv. TestContext is not null, but DataRow always is. I have not gotten this to work despite a lot of fiddling with it. I'm not sure what I'm doing wrong. Does mstest create a log anywhere that would tell me if it is failing to find the csv file, or what specific error might be causing DataRow to fail to populate? I have tried the following csv files: ID 1 2 3 4 and ID, Whatever 1,0 2,1 3,2 4,3 So far, no dice.

    Read the article

  • INNER JOIN syntax for mySQL using phpmyadmin

    - by David van Dugteren
    SELECT Question.userid, user.uid FROM `question` WHERE NOT `userid`=2 LIMIT 0, 60 INNER JOIN `user` ON `question`.userid=`user`.uid ORDER BY `question`.userid returns Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INNER JOIN User ON question.userid=user.uid ORDER BY question.userid' at line 5 Can't for the life of me figure out what I'm doing wrong here.

    Read the article

  • Powershell: Select-Object with additional calculated difference value

    - by David.Chu.ca
    Let me explain my question. I have a daily report about one PC's free space as in text file (sp.txt) like: DateTime FreeSpace(MB) ----- ------------- 03/01/2010 100.43 DateTime FreeSpace(MB) ----- ------------- 03/02/2010 98.31 .... Then I need to use this file as input to generate a report with difference of free space between dates: DateTime FreeSpace(MB) Change ----- ------------- ------ 03/01/2010 100.43 03/02/2010 98.31 2.12 .... Here are some codes I have to get above result without the additional "Change" calculation: Get-Content "C:\report\sp.txt" ` | where {$_.trim().length -gt 0 -and -not ($_ -like "Date*") -and -not ($_ -like "---*")} ` | Select-Object @{Name='DateTime'; expression={[DateTime]::Parse($_.SubString(0, 10).Trim())}}, ` @{Name='FreeSpace(MB)'; expression={$_.SubString(12, 12).Trim()}}, ` | Sort-Object DateTime ` | Select-Object DateTime, 'FreeSpace(MB)' |ft -AutoSize # how to add additional column Change to this Select-Object? My understanding is that Select-Object will return a collection of objects. Here I create this collection from an input text file(parse each line into parts: datetime and freespace(MB)). In order to calculate the difference between dates, I guess that I need to add additional calculated value to the result of the last Select-Object, or pipe the result to another Select-Object with the calculation as additional property or column. In order to do it, I need to get the previous row's FreeSpace value. Not sure if it is possible and how?

    Read the article

  • CSS IE6 float right

    - by David
    How come when I have a div style at display: block; float: right, in IE6 the div still goes under the text, and not in the middle of it just floated to the right. It works in all other browsers, including IE7+. I need to have display block because if i do display inline, then the menu inside the div is all messed up. .content { display: block; } .float { width: 150px; display: block; float: right; } .nothing { display: inline; } the float class is not to the right of nothing class, its under it in IE6, know a fix?

    Read the article

  • Microsoft Sync Framework with Mutliple Client and Server Database

    - by David Osborn
    I'm working on changes to an application to have a local data store instead of connecting directly to the database server. The client app will then sync changes both ways between the server database and its local data store. I'm trying to implement the syncing solution using Microsoft Sync Framework. To be clear there is no server application, only the database server, but there are multiple clients. I have started implementing two classes that implement FullEnumerationSimpleSyncProvider, one called LocalSyncProvider and one called ServerSyncProvider. The LocalSyncProvider knows how to enumerate, insert, update, delete items from the local data store, and the ServerSyncProvider knows how to enumerate, insert, update, delete items from the database server. They each use the provided SqlMetadataStore and store the two metadata stores (one for the local and one for the server) on the local drive of the client. This means that each client will have its own metadata store for its local data store and its own metadata store for the server database. Is this actually going to work, does there need to exists only one server metadata store, or do I need to be using the Sync Framework differently?

    Read the article

  • Error in WCF service - Silverlight client communication.

    - by David
    I created a WCF service and I planned to consume this in a Silverlight application. So I created the WCF service in the Website host project. The service is a simple WCF service that only returns a number - something like a Hello World WCF-SL. So after adding a service reference in the silverlight client project to the Service URI, after calling async the service method (by using the generated proxy), I get the following exception in the callback method: An error occurred while trying to make a request to URI 'http://localhost:4566/SLService.svc'. This could be due to attempting to access a service in a cross-domain way without a proper cross-domain policy in place, or a policy that is unsuitable for SOAP services. You may need to contact the owner of the service to publish a cross-domain policy file and to ensure it allows SOAP-related HTTP headers to be sent. This error may also be caused by using internal types in the web service proxy without using the InternalsVisibleToAttribute attribute. Please see the inner exception for more details. I only created a HelloWorld WCF service with nothing else but a simple method that returns a dumb number and it's hosted on my locally. Must I have clientaccesspolicy.xml or crossdomain.xml? I acces my service locally. Every time I create a new simple/dumb WCF-SL solution, I get this error. I use VS2010 and Silverlight 4. I cannot get a simple/dumb WCF-SL solution working locally. Is there something wrong with the configuration? On another machine in the same network, it does work properly, so I assume something is misconfigured. Any thoughts?

    Read the article

  • concatenate rows of Clob with plsql

    - by david K
    Hi, late considere i conider if got a table who got an Id and a clob content like: create table v_EXAMPLE_L ( nip number, xmlcontent clob ); we insert our data: Insert into V_EXAMPLE_L (NIP,XMLCONTENT) values (17852,'delta548484646846484'); Insert into V_EXAMPLE_L (NIP,XMLCONTENT) values (17852,'omega545648468484'); Insert into V_EXAMPLE_L (NIP,XMLCONTENT) values (17852, 'gamma54564846qsdqsdqsdqsd8484'); i'm trying do do a function that concatenate the rows of the clob that gone be the result of a select , i mean without having to give multiple parameter about the name of table or such , i should only give here the column that contain the clobs , and she should handle the rest!. CREATE OR REPLACE function assemble_clob(q varchar2) return clob is v_clob clob; tmp_lob clob; hold VARCHAR2(4000); --cursor c2 is select xmlcontent from V_EXAMPLE_L where id=17852 cur sys_refcursor; begin OPEN cur FOR q; LOOP FETCH cur INTO tmp_lob; EXIT WHEN cur%NOTFOUND; --v_clob := v_clob || XMLTYPE.getClobVal(tmp_lob.xmlcontent); v_clob := v_clob || tmp_lob; END LOOP; return (v_clob); --return (dbms_xmlquery.getXml( dbms_xmlquery.set_context("Select 1 from dual")) ) end assemble_clob; the function is broken ... (if anybody could give me a help, thanks a lot, and i'm noob in sql so ....). and thanks

    Read the article

  • Databinding a ListBox with SelectionMode = Multiple

    - by David Veeneman
    I have a WPF ListBox that I would like to Enable multiple selection in the ListBox, and Databind the ListBox to my view model. These two requirements appear to be incompatible. My view model has an ObservableCollection<T> property to bind to this ListBox; I set up a binding in XAML from the property to the ListBox.SelectedItems property. When I compiled, I got an error saying that the SelectedItems property was read only and could not be set from XAML. Am I binding to the wrong control property? Is there a way to bind a multiple-selection ListBox in XAML to a view model collection property? Thanks for your help.

    Read the article

  • ASP.NET MVC 1.0: OutputCache, RenderPartial and WriteSubstitution

    - by David
    Hi folks, after digging into this topic and having the requirement, that a single page should be totally cached, except for a Html.RenderPartial("LogOnUserControl"); i couldn't find any working solution on this... the only "it getting warmer" thing i foudn was this solution , which unfortunately is not working with a "partial view", which requires the Request.IsAuthenticated attribute ( the fakeContext is losing this info ) Have you heard of any other solution to do this?!

    Read the article

  • SQL Server 2008 ContainsTable, CTE, and Paging

    - by David Murdoch
    I'd like to perform efficient paging using containstable. The following query selects the top 10 ranked results from my database using containstable when searching for a name (first or last) that begins with "Joh". DECLARE @Limit int; SET @Limit = 10; SELECT TOP @Limit c.ChildID, c.PersonID, c.DOB, c.Gender FROM [Person].[vFullName] AS v INNER JOIN CONTAINSTABLE( [Person].[vFullName], (FullName), IS ABOUT ( "Joh*" WEIGHT (.4), "Joh" WEIGHT (.6)) ) AS k3 ON v.PersonID = k3.[KEY] JOIN [Child].[Details] c ON c.PersonID = v.PersonID JOIN [Person].[Details] p ON p.PersonID = c.PersonID ORDER BY k3.RANK DESC, FullName ASC, p.Active DESC, c.ChildID ASC I'd like to combine it with the following CTE which returns the 10th-20th results ordered by ChildID (the primary key): DECLARE @Start int; DECLARE @Limit int; SET @Start = 10; SET @Limit = 10; WITH ChildEntities AS ( SELECT ROW_NUMBER() OVER (ORDER BY ChildID) AS Row, ChildID FROM Child.Details ) SELECT c.ChildID, c.PersonID, c.DOB, c.Gender FROM ChildEntities cte INNER JOIN Child.Details c ON cte.ChildID = c.ChildID WHERE cte.Row BETWEEN @Start+1 AND @Start+@Limit ORDER BY cte.Row ASC

    Read the article

  • Blacklight Expander problem while expanding programmatically

    - by David Brunelle
    Hi, I am doing a silverlight project in Silverlight 4 and I included the BlackLight project in my project so that I could use their new controls, especialy the dockpanel and the autoexpander, which is causing me at the moment some little problems. What I would like to do is to have several auto-expander that will expand or collapsed when I click on button. In my case more specifically, each auto-expander have a set of parameter to fill, which in turn will fill the other expander and the current one would collaps and the just filled one would expand. The idea is simple, yet when I use a button which is on one of my expander, it only works once... It would expand/collapse the first time, then after that, nothing. I trace the code and it seems to go through just fine, but the property value won't change Here is my code Private Sub BtnExpand_Click(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs) Handles BtnExpand.Click ClientExpander.IsExpanded = False ProjetExpander.IsExpanded = True End Sub Could it be a known bug, or must I reset some flags to make it work? Thanks.

    Read the article

  • AS3 Embed Image Instead of drawing graphics

    - by David
    I've got a custom AS3 scrollbar that I need to modify. The scroll thumb (the draggable part of a scrollbar) is currently just done by drawing a rectangle. But I need it to look more like a real scrollbar. Not sure how to modify the below code to import/use a scroll thumb image: scrollThumb = new Sprite(); scrollThumb.graphics.lineStyle(); scrollThumb.graphics.beginFill(0x0066ff); scrollThumb.graphics.drawRect(0, 0, 1, 1); addChild(scrollThumb); I know that I would embed an image by doing something like this: [Embed(source="images/image1.png")] private static var Image1Class:Class; But then how do I set the scrollThumb = to the image? Thanks!

    Read the article

  • MobileMe Connection - Cocoa

    - by David Schiefer
    Hi, I need to send a file to MobileMe via Cocoa. I stumbled across a .Mac framework from Apple but it hasn't been updated in years, so I don't want to use it due to possible compatibility problems it may cause. I think that the MobileMe.framework is private, so I don't think I can use it. What kind of alternatives are there available for me so that I can upload the file to MobileMe? I've also been looking into WebDav frameworks (since MobileMe is WebDav based), but I didn't find anything useful either. Thanks!

    Read the article

  • DNN 5.2.3 Stored Procedures executing numerous times during page loads

    - by David Neale
    After tracing the DB activity from a DNN 5.2.3 site I noticed that there are numerous identical calls to the database whilst loading the home page for the first time (afterwards the caching works successfully). //Procedure : Number of executions exec dbo.aspnet_Membership_GetUserByName @ApplicationName=N'DotNetNuke',@UserName=N'MYDOMAIN\ME',@UpdateLastActivity=0,@CurrentTimeUtc='2010-03-24 10:04:15:223' : 22 exec dbo.GetPortalAliasByPortalID @PortalID=0 : 15 exec dbo.GetUserProfile @UserID=8 : 11 exec dbo.GetUser @PortalID=0,@UserID=8 : 10 exec dbo.GetDatabaseVersion : 2 exec dbo.GetUserCountByPortal @PortalId=0: 2 exec dbo.GetDesktopModules : 2 exec dbo.KB_XMod_Forms_List @PortalId=0 : 2 exec dbo.KB_XMod_Templates_List @PortalId=0,@TemplateType=-1 : 2 Why so many duplicates?

    Read the article

  • Using Entity Framework with an SQL Compact Private Installation

    - by David Veeneman
    I am using Entity Framework 4 in a desktop application with SQL Compact. I want to use a private installation of SQL Compact with my application, so that my installer can install SQL Compact without giving the user a second installation to do. It also avoids versioning hassles down the road. My development machine has SQL Compact 3.5 SP1 installed as a public installation, so my app runs fine there, as one would expect. But it's not running on my test machine, which does not have SQL Compact installed. I get this error: The specified store provider cannot be found in the configuration, or is not valid. I know some people have had difficulty with SQL Compact private installations, but I have used them for a while, and I really like them. Unfortunately, my regular private installation approach isn't working. I have checked the version numbers on my SQL CE files, and they are all 3.8.8078.0, which is the SP2 RC version. Here are the files I have included in my private installation: sqlcecompact35.dll sqlceer35EN.dll sqlceme35.dll sqlceqp35.dll sqlcese35.dll System.Data.SqlServerCe.dll System.Data.SqlServerCe.Entity.dll I have added a reference to System.Data.SqlServerCe to my project, and I have verified that all of the files listed above are being copied to the application folder on the installation machine. Here is the code I use to configure an EntityConnectionStringBuilder when I open a SQL Compact file: var sqlCompactConnectionString = string.Format("Data Source={0}", filePath); // Set Builder properties builder.Metadata = string.Format("res://*/{0}.csdl|res://*/{0}.ssdl|res://*/{0}.msl", edmName); builder.Provider = "System.Data.SqlServerCe.3.5"; builder.ProviderConnectionString = sqlCompactConnectionString; var edmConnectionString = builder.ToString(); Am I missing a file? Am I missing a configuration stepp needed to tell Entity Framework where to find my SQL Compact DLLs? Any other suggestions why EF isn't finding my SQL Compact DLLs on the installation machine? Thanks for your help.

    Read the article

  • AJAX: how to get progress feedback in web apps, and to avoid timeouts on long requests?

    - by David Dombrowsky
    This is a general design question about how to make a web application that will receive a large amount of uploaded data, process it, and return a result, all without the dreaded spinning beach-ball for 5 minutes or a possible HTTP timeout. Here's the requirements: make a web form where you can upload a CSV file containing a list of URLs when the user clicks "submit", the server fetches the file, and checks each URL to see if its alive, and what the title tag of the page is. the result is a downloadable CSV file containing the URL, and the result HTTP code the input CSV can be very large ( 100000 rows), so the fetch process might take 5-30 minutes. My solution so far is to have a spinning javascript loop on the client site, which queries the server every second to determine the overall progress of the job. This seems kludgy to me, and I'm hesitant to accept this as the best solution. I'm using perl, template toolkit, and jquery, but any solution using any web technology would be acceptable.

    Read the article

  • ASP.NET MVC POST Parameter into RouteData

    - by David Thomas Garcia
    I'm using jQuery to POST an Id to my route, for example: http://localhost:1234/Load/Delete with a POST Parameter Id = 1 I'm only using the default route in Global.asax.cs right now: routes.MapRoute( "Default", "{controller}/{action}/{id}", new { controller = "Home", action = "Index", id = "" } ); When I perform the POST, in my ActionFilter filterContext.RouteData.Values["Id"] is set to the default value of "". Ideally, I'd like it to use the POST Parameter value automatically if the URL comes up with "". I know it is posting properly because I can see the value of "1" in filterContext.HttpContext.Request.Params["Id"]. Is there a way to get RouteData to use a POST parameter as a fall back value?

    Read the article

  • SQL statement with datetimepicker

    - by David Archer
    This should hopefully be a simple one. When using a date time picker in a windows form, I want an SQL statement to be carried out, like so: string sql = "SELECT * FROM Jobs WHERE JobDate = '" + dtpJobDate.Text + "'"; Unfortunately, this doesn't actually provide any results because the JobDate field is stored as a DateTime value. I'd like to be able to search for all records that are on this date, no matter what the time stored may be, any help? New query: SqlDataAdapter da2 = new SqlDataAdapter(); SqlCommand cmd = new SqlCommand(); cmd.CommandText = "SELECT * FROM Jobs WHERE JobDate >= @p_StartDate AND JobDate < @p_EndDate"; cmd.Parameters.Add ("@p_StartDate", SqlDbType.DateTime).Value = dtpJobDate.Value.Date; cmd.Parameters.Add ("@p_EndDate", SqlDbType.DateTime).Value = dtpJobDate.Value.Date.AddDays(1); cmd.Connection = conn; da2.SelectCommand = cmd; da2.Fill(dt); dgvJobDiary.DataSource = dt; Huge thanks for all the help!

    Read the article

< Previous Page | 60 61 62 63 64 65 66 67 68 69 70 71  | Next Page >