Search Results

Search found 932 results on 38 pages for 'patrick harrington'.

Page 17/38 | < Previous Page | 13 14 15 16 17 18 19 20 21 22 23 24  | Next Page >

  • Bulk Insert takes 4x as long on first operation of the day

    - by patrick
    I do Bulk Inserts into a table with about 14 million rows at fiver minute increments during a 7 hour period during the day. These inserts take somewhere between 9-14 secs. However, the first insert always takes about 40 secs. Anyone know what SQL Server 2005 would be doing differently on the first insert into a table for that day? From what I've read I should probably use the SqlBulkCopy class instead of just using a bulk insert in a stored procedure. Is that that the general consensus?

    Read the article

  • Working with a CSV file with odd encapsulation // PHP

    - by Patrick
    I have a CSV file that I'm working with, and all the fields are comma separated. But some of the fields themselves, contain commas. In the raw CSV file, the fields that contain commas, are encapsulated with quotes, as seen here; "Doctor Such and Such, Medical Center","555 Scruff McGruff, Suite 103, Chicago IL 60652",(555) 555-5555,,,,something else the code I'm using is below <?PHP $file_handle = fopen("file.csv", "r"); $i=0; while (!feof($file_handle) ) { $line = fgetcsv($file_handle, 1024); $c=0; foreach($line AS $key=>$value){ if($i != 0){ if($c == 0){ echo "[ROW $i][COL $c] - $value"; //First field in row, show row # }else{ echo "[COL $c] - $value"; // Remaining fields in row } } $c++; } echo "<br>"; // Line Break to next line $i++; } fclose($file_handle); ?> The problem is I'm getting the fields with the commas split into two fields, which messes up the number of columns I'm supposed to have. Is there any way I could search for commas within quotes and convert them, or another way to deal with this?

    Read the article

  • Including hibernate jar dependencies in ant build

    - by Patrick
    Hi, I'm trying to compile a runnable jar-file for a project that makes use of hibernate. I'm trying to construct an ant build.xml file to streamline my build process, but I'm having troubles with the inclusion of the hibernate3.jar inside the final jar-file. If I run the ant script I manage to include all my library jars, and they are put in the final jar-file's root. When I run the jar-file I get a java.lang.NoClassDefFoundError: org/hibernate/Session error. If I make use of the built-in export to jar in Eclipse, it works only if I choose "extract required libraries into jar". But that bloats the jar, and includes too much of my project (i.e. unit tests). Below is my generated manifest: Manifest-Version: 1.0 Main-Class: main.ServerImpl Class-Path: ./ antlr-2.7.6.jar commons-collections-3.1.jar dom4j-1.6.1.jar hibernate3.jar javassist-3.9.0.GA.jar jta-1.1.jar slf4j-api-1.5.11.jar slf4j-simple-1.5.11.jar mysql-connector-java-5.1.12-bin.jar rmiio-2.0.2.jar commons-logging-1.1.1.jar And the part of the build.xml looks like this: <target name="dist" depends="compile" description="Generates the Distribution Jar(s)"> <mkdir dir="${dist.dir}" /> <jar destfile="${dist.dir}/${dist.file.name}.jar" basedir="${build.prod.dir}" filesetmanifest="mergewithoutmain"> <manifest> <attribute name="Main-Class" value="${main.class}" /> <attribute name="Class-Path" value="./ ${manifest.classpath} " /> <attribute name="Implementation-Title" value="${app.name}" /> <attribute name="Implementation-Version" value="${app.version}" /> <attribute name="Implementation-Vendor" value="${app.vendor}" /> </manifest> <zipfileset refid="hibernatefiles" /> <zipfileset refid="slf4jfiles" /> <zipfileset refid="mysqlfiles" /> <zipfileset refid="commonsloggingfiles" /> <zipfileset refid="rmiiofiles" /> </jar> </target> The refids' for the zipfilesets point to the directories in a library directory lib in the root of the project. The manifest.classpath-variable takes the classpath of all those library jar-files, and flattens them with pathconvert and mapper. I've also tried to set the manifest classpath to ".", "./" and only the library jar, but to no difference at all. I'm hoping there's a simple remedy to my problems...

    Read the article

  • Common Wpf pitfalls

    - by Patrick Klug
    I want to gather a list of WPF pitfalls. Issues with WPF that are not that well known and either have some serious design consequences or some major inconveniences. One topic per answer. List: Mouse.GetPosition() does not always return a correct value. The Wpf layout recursion limit is hard coded to 255.

    Read the article

  • Recursive XML through XSLT to XML

    - by Patrick
    Essentially, I have XML structured like this: <A> <B> <1>data</1> <2>data</2> <C> <1>data</1> <2>data</2> <B> <1>data</1> <2>data</2> <C> <B> <1>data</1> <2>data</2> </B> </C> </B> <B> <1>data</1> <2>data</2> </B> </C> </B> </A> I am trying to get the output to look like this: <A> <B 1="data" 2="data"> <C 1="data" 2="data"> <B 1="data" 2="data"> <C> <B 1="data" 2="data" > </B> </C> </B> <B 1="data" 2="data" > </B> </C> </B> </A> I have figured out how to put everything as attributes and start looping through the elements. The issue I am facing is that when trying to get below the first C, nothing happens. Here is my code: <?xml version="1.0" encoding="utf-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt" exclude-result-prefixes="msxsl"> <xsl:output method="xml" indent="yes"/> <xsl:template match="/"> <MenuDataResult> <B> <xsl:apply-templates /> </B> </MenuDataResult> </xsl:template> <xsl:template match="B"> <xsl:for-each select="B"> <B ItemID="{B/ItemID/text()}" ItemType="{ItemType/text()}" ItemSubType="{ItemSubType/text()}" ItemTitle="{ItemTitle/text()}" ItemImage="{ItemImage/text()}" ItemImageOverride="{ItemImageOverride/text()}" ItemLink="{ItemLink/text()}" ItemTarget="{ItemTarget/text()}>"> <xsl:for-each select="C"> <xsl:apply-templates select="C"/> </xsl:for-each> </B> </xsl:for-each> </xsl:template> <xsl:template match="C"> <C ID="{ID/text()}" Title="{Title/text()}" Template="{Template/text()}" Type="{Type/text()}" Link="{Link/text()}" ParentID="{ParentID/text()}" AncestorID="{AncestorID/text()}" FolderID="{FolderID/text()}" Description="{Description/text()}" Image="{Image/text()}" ImageOverride="{ImageOverride/text()}"> <xsl:for-each select="B"> <xsl:apply-templates select=".//B"/> </xsl:for-each> </C> </xsl:template> </xsl:stylesheet>

    Read the article

  • Drupal: Views: exposed Taxonomy filter: additional functionalities

    - by Patrick
    hi! I'm using Drupal Views with an exposed filter (improved with better exposed filters module) based on taxonomy. I have a list of nodes and for each node I assigned several tags. I would like to add the following functionalities to the filter: 1 - when few tags are selected, I would like to disable all tags that are not possible to combine with the selected ones. In other terms, disable a tag if it is not visible in the filtered nodes. In this way I highlight only a subset of tags, to help the user to continue filtering the content. 2 - when I move the mouse over an article I would like to highlight the tags that are associated with such node with a different color. That is, if I selected TAGA, and the node also contains TAGB, and TAGC, I would like to highlight the last 2 tags if I move the mouse over the node. thanks

    Read the article

  • WinForm Plugin system

    - by Patrick
    I have created a c# 2.0 WinForm application which loads dlls, searches for an interface, and then loads the interface as a plugin. I am loading the plugins in the same appdomain as the main application because they have a GUI which I am directly loading into the application as a tab item. I would like to load them in their own app domain, but do not think it is possible because of the GUI. I would also like to monitor them to tell if they are not responsive and unload them. Is this possible? If I upgrade to WPF are things any simpler.

    Read the article

  • redis timeout with predis

    - by Patrick
    Hello, I'm using redis with php (predis at http://github.com/nrk/predis/) and am experiencing frequent timeout. The stack trace shows: [04-Apr-2010 03:39:50] PHP Fatal error: Uncaught exception 'Predis_ClientException' with message 'Connection timed out' in redis.php:697 Stack trace: #0 redis.php(757): Predis_Connection->connect() #1 redis.php(729): Predis_Connection->getSocket() #2 redis.php(825): Predis_Connection->writeCommand(Object(Predis_Commands_ListRange)) #3 redis.php(165): Predis_ConnectionCluster->writeCommand(Object(Predis_Commands_ListRange)) #4 redis.php(173): Predis_Client->executeCommandInternal(Object(Predis_ConnectionCluster), Object(Predis_Commands_ListRange)) #5 redis.php(157): Predis_Client->executeCommand(Object(Predis_Commands_ListRange)) #6 [internal function]: Predis_Client->__call('lrange', Array) This happens consistently and I have no idea why. Anyone has any idea?

    Read the article

  • Using .net Datetime in sql query

    - by Patrick
    I have a DateTime object I want to compare against an sql datetime field in a where clause. I'm currently using: "where (convert( dateTime, '" & datetimeVariable.ToString & "',103) <= DatetimeField)" But I believe datetimeVariable.ToString will return a different value depending on the culture where the system is running. How would you handle this so it is culture independent?

    Read the article

  • problem with if statement used to determine function return

    - by Patrick
    Im using an if statement to determine what to return in a function, but it seems to be not working the way i want it to. function DoThis($dogs, $cats){ // do something with dogs, pet them perhaps. $reg = $dogs[0]; $nate = $dogs[1]; if($cats = "dave"){return $reg;} if($cats = "tom"){return $nate;} } $cats is a string (if that helps), and when entered it doesn't yield any return. If i manually set a return, that works, but the above doesnt for some reason.

    Read the article

  • Drupal: color doesn't change in Chrome or Safari

    - by Patrick
    hi, could you explain me why the following code doesn't work in Chrome and Safari, but only in Firefox ? if ($(this).css("color") == "Fuchsia"){ $(this).css("color","#000000"); } Website: http://www.sanstitre.ch/drupal/portfolio?tid[]=38&view_name=Portfolio&view_display_id=page_1&view_args=&view_path=portfolio&view_base_path=portfolio&view_dom_id=1&pager_element=0 Please scroll vertically to see Fuchsia colors to change thanks

    Read the article

  • I need unusual ordering mysql results

    - by Patrick
    Im trying to order results ASCENDING from the current date this is what im using now; SELECT * FROM friends JOIN bdays ON bdays.user = friends.friendname WHERE username = $userid ORDER BY DATE_FORMAT(date, '%m %d') any ideas? example ordering by date now, sorts the birthdays starting at january what i need, is instead of starting the list at january, is starting it from the current date. So, instead of; January February March April May June July August September November December It will order them like this; April (current month/day) May June July August September November December January February March April (all the way up to yesterday)

    Read the article

  • Get a list of mutex?

    - by Patrick
    A program creates a mutex as part of its start-up. I don't know the format of this mutex so I wondered if there is a way to get a list of all non-abandoned mutex, open the program, get a new list and see if I can find the mutex by removing all duplicate entries. Is there a way to get this list?

    Read the article

  • Lightbox: how to parse the lightbox dynamically loaded html content (AJAX)

    - by Patrick
    hi, I'm using a (modal) lightbox on a page of my website to display my nodes. I'm using some plugins such as an external jquery-plugin for tooltips and the drupal plugin jQuery Media (to load flash video player for some video file-fields). These plugins are loaded when the main page load and they parse the html content of the page. When I dynamically load the lightbox (and I use AJAX to update its content) the html inside the lightbox is not parse... so no tooltips, no videos. how can I solve this ? Should I trigger the plugins again from Lightbox callback function ? Or should I use something else instead of the lightbox ? Thanks

    Read the article

  • Must web apps support back button?

    - by Patrick Peters
    I did a system test on a new ASP.NET app. I encountered several exceptions when using the BACK button in my browser (IE 7). I stated in a review-record that the web-app must support the use of a BACK button (or at least handle it gracefully with for example session-time out warnings). The teamlead did not agree with me as he stated that a web-app should not support working with the back-button by default. Do you agree?

    Read the article

  • MVC best practice

    - by Patrick
    I'm new to MVC (i'm using codeigniter) and was wondering where I should put a "cut_description" function. My model retrieves a list of events including their description. If the description is too long, I would need to cut it after the first n words, and add a "read more" link, so the view doesn't get too cluttered. What would be the best practice? a) add the logic to cut after n words to the model; b) add the logic to the controller; c) add it to the view? I think C would be the easier (I have to loop through results anyway), but I'm not sure this would comply with MVC. What do you think?

    Read the article

  • FLEX: the custom component is still a Null Object when I invoke its method

    - by Patrick
    Hi, I've created a custom component in Flex, and I've created it from the main application with actionscript. Successively I invoke its "setName" method to pass a String. I get the following run-time error (occurring only if I use the setName method): TypeError: Error #1009: Cannot access a property or method of a null object reference. I guess I get it because I'm calling to newUser.setName method from main application before the component is completely created. How can I ask actionscript to "wait" until when the component is created to call the method ? Should I create an event listener in the main application waiting for it ? I would prefer to avoid it if possible. Here is the code: Main app ... newUser = new userComp(); //newUser.setName("name"); Component: <?xml version="1.0" encoding="utf-8"?> <mx:VBox xmlns:mx="http://www.adobe.com/2006/mxml" width="100" height="200" > <mx:Script> <![CDATA[ public function setName(name:String):void { username.text = name; } public function setTags(Tags:String):void { } ]]> </mx:Script> <mx:HBox id="tagsPopup" visible="false"> <mx:LinkButton label="Tag1" /> <mx:LinkButton label="Tag2" /> <mx:LinkButton label="Tag3" /> </mx:HBox> <mx:Image source="@Embed(source='../icons/userIcon.png')"/> <mx:Label id="username" text="Nickname" visible="false"/> </mx:VBox> thanks

    Read the article

  • Drupal, Faceted Search: mysql privilegies

    - by Patrick
    hi, I was considering to use Faceted Search for my Drupal website but I noticed I have to set additional database privilegies. (And I usually don't have access to mysql terminal on the hosting servers. http://drupalcode.org/viewvc/drupal/contributions/modules/faceted_search/README.txt?view=co Consequently, I cannot use Faceted Search on these servers.... thanks

    Read the article

  • How can I model the data in a multi-language data editor in WPF with MVVM?

    - by Patrick Szalapski
    Are there any good practices to follow when designing a model/ViewModel to represent data in an app that will view/edit that data in multiple languages? Our top-level class--let's call it Course--contains several collection properties, say Books and TopicsCovered, which each might have a collection property among its data. For example, the data needs to represent course1.Books.First().Title in different languages, and course1.TopicsCovered.First().Name in different languages. We want a app that can edit any of the data for one given course in any of the available languages--as well as edit non-language-specific data, perhaps the Author of a Book (i.e. course1.Books.First().Author). We are having trouble figuring out how best to set up the model to enable binding in the XAML view. For example, do we replace (in the single-language model) each String with a collection of LanguageSpecificString instances? So to get the author in the current language: course1.Books.First().Author.Where(Function(a) a.Language = CurrentLanguage).SingleOrDefault If we do that, we cannot easily bind to any value in one given language, only to the collection of language values such as in an ItemsControl. <TextBox Text={Binding Author.???} /> <!-- no way to bind to the current language author --> Do we replace the top-level Course class with a collection of language-specific Courses? So to get the author in the current language: course1.GetLanguage(CurrentLanguage).Books.First.Author If we do that, we can only easily work with one language at a time; we might want a view to show one language and let the user edit the other. <TextBox Text={Binding Author} /> <!-- good --> <TextBlock Text={Binding ??? } /> <!-- no way to bind to the other language author --> Also, that has the disadvantage of not representing language-neutral data as such; every property (such as Author) would seem to be in multiple languages. Even non-string properties would be in multiple languages. Is there an option in between those two? Is there another way that we aren't thinking of? I realize this is somewhat vague, but it would seem to be a somewhat common problem to design for. Note: This is not a question about providing a multilingual UI, but rather about actually editing multi-language data in a flexible way.

    Read the article

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