Search Results

Search found 47 results on 2 pages for 'gav'.

Page 2/2 | < Previous Page | 1 2 

  • SVN/Tortoise Always Makes Files Readonly

    - by Gav
    Whenever I do a checkout/update on my SVN project using Tortoise the files all get set to read-only. Is there an option to stop this? I have 1 particular project where I need any checkouts/updates to never make files read-only. Thanks

    Read the article

  • LINQPad - Dump extension method - I want one!

    - by gav
    Hi, LINQPad is amazing, particularly useful is the Dump() extension methods which renders objects and structs of almost any type, anonymous or not, to the console. Initially, when I moved to Visual Studio 2010, I tried to make my own Dump method using a delegate to get the values to render for anonymous types etc. It's getting pretty complicated though and whilst it was fun and educational at first what I need is a solid implementation. Having checked out the LinqPad code in reflector I am even more assured that I'm not going to get the implementation right. Is there a free library I can include to provide the Dump functionality? Thanks, Gavin

    Read the article

  • External XMPP component - Anyone know a Tutorial or Open Source Example please?

    - by gav
    Hi All, I want to run an XMPP server (Openfire) and register an external component to handle the messages it will recieve (using the Whack library). The external component will run my game logic and I will be using XMPP to send player moves to the server and status updates in the other direction. The bonus with XMPP is that we get built in chat for free. The trouble is, although Ignite look fairly established, I can't find a tutorial on how to write, register and debug an External XMPP component written with Whack, there are very few in general for that matter. I am not invested in either the server implementation or the External Component library, java is just my language of choice. If I was to move to Erlang or Scala or something it would have to be a very simple in that language. A single tutorial or example would go a long way here, I just need an basic External XMPP component pretty please! Kind regards, Gavin

    Read the article

  • Cannot connect to MySQL with JDBC - Connection Timeout - Ubuntu 9.04

    - by gav
    I am running Ubuntu and am ultimately trying to connect Tomcat to my MySQL database using JDBC. It has worked previously but after a reboot the instance now fails to connect. Both Tomcat 6 and MySQL 5.0.75 are on the same machine Connection string: jdbc:mysql:///localhost:3306 I can connect to MySQL on the command line using the mysql command The my.cnf file is pretty standard (Available on request) has bind address: 127.0.0.1 I cannot Telnet to the MySQL port despite netstat saying MySQL is listening I have one IpTables rule to forward 80 - 8080 and no firewall I'm aware of. I'm pretty new to this and I'm not sure what else to test. I don't know whether I should be looking in etc/interfaces and if I did what to look for. It's weird because it used to work but after a reboot it's down so I must have changed something.... :). I realise a timeout indicates the server is not responding and I assume it's because the request isn't actually getting through. I installed MySQL via apt-get and Tomcat manually. MySqld processes root@88:/var/log/mysql# ps -ef | grep mysqld root 21753 1 0 May27 ? 00:00:00 /bin/sh /usr/bin/mysqld_safe mysql 21792 21753 0 May27 ? 00:00:00 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pid-file=/var/run/mysqld/mysqld.pid --skip-external-locking --port=3306 --socket=/var/run/mysqld/mysqld.sock root 21793 21753 0 May27 ? 00:00:00 logger -p daemon.err -t mysqld_safe -i -t mysqld root 21888 13676 0 11:23 pts/1 00:00:00 grep mysqld Netstat root@88:/var/log/mysql# netstat -lnp | grep mysql tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN 21792/mysqld unix 2 [ ACC ] STREAM LISTENING 1926205077 21792/mysqld /var/run/mysqld/mysqld.sock Toy Connection Class root@88:~# cat TestConnect/TestConnection.java import java.sql.Connection; import java.sql.DriverManager; import java.sql.SQLException; public class TestConnection { public static void main(String args[]) throws Exception { Connection con = null; try { Class.forName("com.mysql.jdbc.Driver").newInstance(); System.out.println("Got driver"); con = DriverManager.getConnection( "jdbc:mysql:///localhost:3306", "uname", "pass"); System.out.println("Got connection"); if(!con.isClosed()) System.out.println("Successfully connected to " + "MySQL server using TCP/IP..."); } finally { if(con != null) con.close(); } } } Toy Connection Class Output Note: This is the same error I get from Tomcat. root@88:~/TestConnect# java -cp mysql-connector-java-5.1.12-bin.jar:. TestConnection Got driver Exception in thread "main" com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure The last packet sent successfully to the server was 1 milliseconds ago. The driver has not received any packets from the server. at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at com.mysql.jdbc.Util.handleNewInstance(Util.java:409) at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1122) at TestConnection.main(TestConnection.java:14) Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server. at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at com.mysql.jdbc.Util.handleNewInstance(Util.java:409) at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1122) at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:344) at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2181) ... 12 more Caused by: java.net.ConnectException: Connection timed out at java.net.PlainSocketImpl.socketConnect(Native Method) ... 13 more Telnet Output root@88:~/TestConnect# telnet localhost 3306 Trying 127.0.0.1... telnet: Unable to connect to remote host: Connection timed out

    Read the article

  • Fast Lightweight Image Comparisson Metric Algorithm

    - by gav
    Hi All, I am developing an application for the Android platform which contains 1000+ image filters that have been 'evolved'. When a user selects a photo I want to present the most relevant filters first. This 'relevance' should be dependent on previous use cases. I have already developed tools that register when a filtered image is saved; this combination of filter and image can be seen as the training data for my system. The issue is that the comparison must occur between selecting an image and the next screen coming up. From a UI point of view I need the whole process to take less that 4 seconds; select an image- obtain a metric to use for similarity - check against use cases - return 6 closest matches. I figure with 4 seconds I can use animations and progress dialogs to keep the user happy. Due to platform contraints I am fairly limited in the computational expense of the algorithm. I have implemented a technique adapted from various online tutorials for running C code on the G1 and hence this language is available Specific Constraints; Qualcomm® MSM7201A™, 528 MHz Processor 320 x 480 Pixel bitmap in 32 bit ARGB ~ 2 seconds computational time for the native method to get the metric ~ 2 seconds to compare the metric of the current image with training data This is an academic project so all ideas are welcome, anything you can think of or have heard about would be of interest to me. My ideas; I want to keep the complexity down (O(n*m)?) by using pixel data only rather than a neighbourhood function I was looking at using the Colour historgram/Greyscale histogram/Texture/Entropy of the image, combining them to make the measure. There will be an obvious loss of information but I need the resultant metric to be substantially smaller than the memory footprint of the image (~0.512 MB) As I said, any ideas to direct my research would be fantastic. Kind regards, Gavin

    Read the article

  • Spring Security 3.0- Customise basic http Authentication Dialog

    - by gav
    Rather than reading; A user name and password are being requested by http://localhost:8080. The site says: "Spring Security Application" I want to change the prompt, or at least change what the "site says". Does anyone know how to do this via resources.xml? In my Grails App Spring configuration, my current version is as follows; <?xml version="1.0" encoding="UTF-8"?> <beans:beans xmlns="http://www.springframework.org/schema/security" xmlns:beans="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-3.0.xsd"> <http auto-config="true" use-expressions="true"> <http-basic/> <intercept-url pattern="/**" access="isAuthenticated()" /> </http> <authentication-manager alias="authenticationManager"> <authentication-provider> <user-service> <user name="admin" password="admin" authorities="ROLE_ADMIN"/> </user-service> </authentication-provider> </authentication-manager> </beans:beans>

    Read the article

  • Comparing two Objects which implement the same interface for equality / equivalence - Design help

    - by gav
    Hi All, I have an interface and two objects implementing that interface, massively simplied; public interface MyInterface { public int getId(); public int getName(); ... } public class A implements MyInterface { ... } public class B implements MyInterface { ... } We are migrating from using one implementation to the other but I need to check that the objects of type B that are generated are equivalent to those of type A. Specifically I mean that for all of the interface methods an object of Type A and Type B will return the same value (I'm just checking my code for generating this objects is correct). How would you go about this? Map<String, MyInterface> oldGeneratedObjects = getOldGeneratedObjects(); Map<String, MyInterface> newGeneratedObjects = getNewGeneratedObjects(); // TODO: Establish that for each Key the Values in the two maps return equivalent values. I'm looking for good coding practices and style here. I appreciate that I could just iterate through one key set pulling out both objects which should be equivalent and then just call all the methods and compare, I'm just thinking there may be a cleaner, more extensible way and I'm interested to learn what options there might be. Would it be appropriate / possible / advised to override equals or implement Comparable? Thanks in advance, Gavin

    Read the article

  • Poll database using jQuery/Ajax

    - by Gav
    Hi guys, I am trying to use jQuery (latest version) & ajax to poll a mysql db every x seconds, post.php does a simple search query on the table and limits to 1 row. (eg SELECT id FROM TABLE LIMIT 1) I've got some other jQuery UI (using v1.8) code that displays some modal/dialog boxes on the screen, simply put if post.php returns something from the db I need to initialise the dialog to pop up onto the screen. I've done all the popup stuff I am just having issues joining all these bits together - i've added some pseudo code of how i expect this to work. Thanks in advance var refreshId = setInterval(function(){ $.ajax({ type: "POST", url: "post.php", data: "", success: function(html){ $("#responsecontainer").html(html); } }); }, 2000 );s /* proposed pseudocode */ if (ajax is successful & returns a db row to #responsecontainer) { show jQueryUI modal (done this bit already fortunately) }

    Read the article

  • C# Unit Testing - Generating Mock DataContexts / LINQ -> SQL classes

    - by gav
    Hi All, I am loving the new world that is C#, I've come to a point with my toy programs where I want to start writing some unit tests. My code currently uses a database via a DatabaseDataContext object (*.dbml file), what's the best way to create a mock for this object? Given how easy it is to generate the database LINQ - SQL code and how common a request this must be I'm hoping that VS2010 has built in functionality to help with testing. If I'm way off and this must be done manually could you please enlighten me as to your preferred approach? Many Thanks, Gavin

    Read the article

  • Using the XElement.Elements method, can I find elements with wildcard namespace but the same name?

    - by gav
    Hi All, Trying to do a simple parse of an XML document. What's the easiest way to pull out the two PropertyGroups below? <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> 1 </PropertyGroup> <PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> 2 </PropertyGroup> </Project> I have been trying to use XElement.Elements(XName) but to do so I need to prefix PropertyGroup with the xmlns. The issue is that I don't care about the name space and if it changes in future I would still like all PropertyGroups to be retrieved. var xml = XElement.Load(fileNameWithPath); var nameSpace = xml.GetDefaultNamespace(); var propertyGroups= xml.Elements(nameSpace + "PropertyGroup"); Can you improve on this code such that I don't need to prepend with nameSpace? I know I can essentially just reimplement the Elements method but I was hoping there was some way to pass a wildcard namespace? Thanks, Gavin

    Read the article

  • Embedded linux call using system

    - by Gav
    I'm having a problem using system("command") call in C on an embedded system in linux. The call to the app works fine on the command line but when called in a compiled cgi script using the system command it is painfully slow. Any help appreciated?

    Read the article

  • Eclipse Galileo won't start after OS X update to 10.6.3

    - by GC
    Hi All, I have just updated os x to 10.6.3 and no Eclipse won't start the logs show the following error, but I can't figure it out. Can anyone shed any light? !SESSION 2010-03-30 10:06:38.244 ----------------------------------------------- eclipse.buildId=M20090917-0800 java.version=1.6.0_17 java.vendor=Apple Inc. BootLoader constants: OS=macosx, ARCH=x86, WS=cocoa, NL=en_US Framework arguments: -product org.eclipse.epp.package.php.product -keyring /Users/gav/.eclipse_keyring -showlocation Command-line arguments: -os macosx -ws cocoa -arch x86 -product org.eclipse.epp.package.php.product -keyring /Users/gav/.eclipse_keyring -showlocation !ENTRY org.eclipse.ui.workbench 2 0 2010-03-30 10:06:40.139 !MESSAGE A handler conflict occurred. This may disable some commands. !SUBENTRY 1 org.eclipse.ui.workbench 2 0 2010-03-30 10:06:40.139 !MESSAGE Conflict for 'com.aptana.ide.editors.views.actions.actionKeyCommand': HandlerActivation(commandId=com.aptana.ide.editors.views.actions.actionKeyCommand, handler=com.aptana.ide.editors.views.actions.ActionKeyCommandHandler, expression=,sourcePriority=0) HandlerActivation(commandId=com.aptana.ide.editors.views.actions.actionKeyCommand, handler=com.aptana.ide.editors.views.actions.ActionKeyCommandHandler, expression=,sourcePriority=0) !ENTRY org.eclipse.ui 4 0 2010-03-30 10:06:40.964 !MESSAGE Unhandled event loop exception !STACK 0 java.lang.NullPointerException at org.eclipse.swt.graphics.Device.getFontList(Device.java:369) at org.eclipse.jface.resource.FontRegistry.filterData(FontRegistry.java:465) at org.eclipse.jface.resource.FontRegistry.createFont(FontRegistry.java:499) at org.eclipse.jface.resource.FontRegistry.defaultFontRecord(FontRegistry.java:563) at org.eclipse.jface.resource.FontRegistry.defaultFontData(FontRegistry.java:575) at org.eclipse.jface.resource.FontRegistry.getFontData(FontRegistry.java:591) at org.eclipse.ui.internal.themes.ThemeElementHelper.installFont(ThemeElementHelper.java:116) at org.eclipse.ui.internal.themes.ThemeElementHelper.populateRegistry(ThemeElementHelper.java:59) at org.eclipse.ui.internal.Workbench$33.runWithException(Workbench.java:1482) at org.eclipse.ui.internal.StartupThreading$StartupRunnable.run(StartupThreading.java:31) at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:134) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3405) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3102) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2316) at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2221) at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:500) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:493) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:113) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:194) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:368) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:559) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:514) at org.eclipse.equinox.launcher.Main.run(Main.java:1311) It looks like the update may have upgraded the Java version, possibly :S but I don't know if this can be rolled back even if it did update it. java version "1.6.0_17" Java(TM) SE Runtime Environment (build 1.6.0_17-b04-248-10M3025) Java HotSpot(TM) 64-Bit Server VM (build 14.3-b01-101, mixed mode) Thanks in advance!

    Read the article

  • Google earth will not reinstall

    - by chad
    I was trying to perform the the fix found at this link http://www.omgubuntu.co.uk/2012/01/how-to-make-google-earth-look-native-in-ubuntu It requires you to delete certain files from the /opt/google/earth/free folder and then add some new ones that you download. I deleted the files but the links to download the new ones were unusable. I was using gksudo nautilus so trash was disabled meaning I could not restore the files I had deleted. I the tried to go to the Google Earth website and reinstall it. I downloaded the .deb but when I tried to install it it gav me an error message saying "cannot install ia32-libs" I tried installing this via terminal and it gave me an error message saying chad@chad-Lenovo-G570:~$ sudo apt-get install ia32-libs [sudo] password for chad: Reading package lists... Done Building dependency tree Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation: The following packages have unmet dependencies: ia32-libs : Depends: ia32-libs-multiarch E: Unable to correct problems, you have held broken packages. How do I fix this? Now I am stuck without a functioning Google Earth. How can I fix this?

    Read the article

  • App store name and info.plist

    - by user346194
    Hi guys, I've just completed my first app and having tested I'm ready for submission. However, despite numerous web searches and reading, I'm struggling to finalise the method required to enable me to have a different name on the app store to the name that appears under the app on the device home screen. In the plist.info file there is reference to bundle display name, executable name, bundle name, bundle identifier, product name etc. So, for example, say I would like the app store name to display as: HELLO WORLD and I would like the name below the icon on the device home screen to display as: HELLO How should I enter the data in the plist.info file to achieve the above? Many thanks in advance for your help. Gav.

    Read the article

  • Opening a file from a pack URI in WPF

    - by cptmorgan
    Hi All, I am looking to open a .csv file from the application pack to do some unit testing. So what I would really love is some analog to File.ReadAllText(string path) which is instead X.ReadAllText(Uri uri). I haven't as yet been able to find this. Does anyone know if it is possible to read text / bytes (don't mind which) from a file in the pack without compiling this file to disk first? Oh and btw, File.ReadAllText(@"pack://application:,,,/SpreadSheetEngine/Tests/Example.csv") didn't work for me.. Thanks in advance.. Gav

    Read the article

  • Changes in the Maven Embedded GlassFish plugin

    - by Romain Grecourt
    The plugin changed its Maven coordinates (a.k.a GAV) over time:  version <= 3.1.1 available under org.glassfish:maven-glassfish-embedded-plugin version >= 3.1.2 available under org.glassfish.embedded:maven-glassfish-embedded-plugin The goal “glassfish-embedded:run” has changed its way of reading the deployment configuration in the latest version: 4.0.Projects using previous versions of the plugin will stop working with this goal. Here is an example of the “old behavior”: 1 2 3 4 5 6 7 8 9 10 11 12 <plugin> <groupId>org.glassfish.embedded</groupId> <artifactId>maven-embedded-glassfish-plugin</artifactId> <version>3.1.2.2</version> <configuration> <app>target/${project.build.finalName}.war</app> <contextRoot>/</contextRoot> <goalPrefix>embedded-glassfish</goalPrefix> <autoDelete>true</autoDelete> <port>8080</port> </configuration> </plugin> The new behavior is as follow: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 <plugin> <groupId>org.glassfish.embedded</groupId> <artifactId>maven-embedded-glassfish-plugin</artifactId> <version>4.0</version> <configuration> <goalPrefix>embedded-glassfish</goalPrefix> <autoDelete>true</autoDelete> <port>8080</port> </configuration> <executions> <execution> <goals> <goal>deploy</goal> </goals> <configuration> <app>target/${project.build.finalName}.war</app> <contextRoot>/</contextRoot> </configuration> </execution> </executions> </plugin> The new version looks for execution of the deploy goal and the associated configuration, when running the goal ‘run’. Both would allow you to run the latest version of the glassfish-embedded jar, you’d only need to add it as a plugin dependency: 1 2 3 4 5 6 7 8 9 10 <plugin> [...] <dependencies> <dependency> <groupId>org.glassfish.main.extras</groupId> <artifactId>glassfish-embedded-all</artifactId> <version>4.0</version> </dependency> </dependencies> </plugin>

    Read the article

  • How to move to next textfield using keyboardtype numberandpunctuation using textfield notification

    - by Rani
    Hi guys, I am having code ItemsController.h UITextField* quantity; UITextField* rate; UITextField* tax2; ItemController.m quantity=[[UITextField alloc]initWithFrame:CGRectMake(158,10.5,140,30)]; quantity.textColor = [UIColor blackColor]; quantity.font = [UIFont systemFontOfSize:15.0]; quantity.backgroundColor = [UIColor clearColor]; quantity.returnKeyType=UIReturnKeyNext; quantity.keyboardType = UIKeyboardTypeNumbersAndPunctuation; quantity.leftViewMode = UITextFieldViewModeAlways; quantity.delegate = self; rate=[[UITextField alloc]initWithFrame:CGRectMake(158,10.5,140,30)]; rate.textColor = [UIColor blackColor]; rate.font = [UIFont systemFontOfSize:15.0]; rate.backgroundColor = [UIColor clearColor]; rate.returnKeyType=UIReturnKeyNext; rate.keyboardType = UIKeyboardTypeNumbersAndPunctuation; rate.leftViewMode = UITextFieldViewModeAlways; rate.delegate = self; tax2=[[UITextField alloc]initWithFrame:CGRectMake(158,10.5,140,30)]; tax2.textColor = [UIColor blackColor]; tax2.font = [UIFont systemFontOfSize:15.0]; tax2.backgroundColor = [UIColor clearColor]; tax2.returnKeyType=UIReturnKeyDone; tax2.keyboardType = UIKeyboardTypeAlphabet; tax2.leftViewMode = UITextFieldViewModeAlways; tax2.delegate = self; - (BOOL)textFieldShouldReturn:(UITextField*)textField { if(textField==quantity) { [rate becomeFirstResponder]; } if(textField == rate) { [tax2 becomeFirstResponder]; } else if(textField==tax2) { [textField resignFirstResponder]; } return YES; } Using UITextfield notifications while I am moving from quantity textfield to rate textfield the keyboard type is alphabetical its getting actually I gav eit has Number and punctuation why I am not getting. can any one help me to solve this as soon as possible. Thanks in advance.

    Read the article

  • SQL Server Querying An XML Field

    - by Gavin Draper
    I have a table that contains some meta data in an XML field. For example <Meta> <From>[email protected]</From> <To> <Address>[email protected]</Address> <Address>[email protected]</Address> </To> <Subject>ESubject Goes Here</Subject> </Meta> I want to then be able to query this field to return the following results From To Subject [email protected] [email protected] Subject Goes Here [email protected] [email protected] Subject Goes Here I've written the following query SELECT MetaData.query('data(/Meta/From)') AS [From], MetaData.query('data(/Meta/To/Address)') AS [To], MetaData.query('data(/Meta/Subject)') AS [Subject] FROM Documents However this only returns one record for that XML field. It combines both the 2 addresses into one result. Is it possible for split these on to separate records? The result I'm getting is From To Subject [email protected] [email protected] [email protected] Subject Goes Here Thanks Gav

    Read the article

  • Control layout using graphviz twopi

    - by vy32
    I am trying to draw a graph showing search prefixes using twopi. I have a simple input file and am getting this output: (full image) Here is the input file: digraph search { // ordering=out; // color=blue; // rank=same; // overlap=scale; rankdir=LR; root=root; ranksep=1.25; overlap=true; "root"; a [color=none,fontsize=12]; b [color=none,fontsize=12]; c [color=none,fontsize=12]; d [color=none,fontsize=12]; e [color=none,fontsize=12]; f [color=none,fontsize=12]; #g [color=none,fontsize=12]; h [color=none,fontsize=12]; i [color=none,fontsize=12]; j [color=none,fontsize=12]; k [color=none,fontsize=12]; l [color=none,fontsize=12]; m [color=none,fontsize=12]; n [color=none,fontsize=12]; o [color=none,fontsize=12]; p [color=none,fontsize=12]; q [color=none,fontsize=12]; r [color=none,fontsize=12]; s [color=none,fontsize=12]; t [color=none,fontsize=12]; u [color=none,fontsize=12]; v [color=none,fontsize=12]; w [color=none,fontsize=12]; x [color=none,fontsize=12]; y [color=none,fontsize=12]; #ga [color=none,fontsize=12]; gb [color=none,fontsize=12]; gc [color=none,fontsize=12]; gd [color=none,fontsize=12]; ge [color=none,fontsize=12]; gf [color=none,fontsize=12]; gg [color=none,fontsize=12]; gh [color=none,fontsize=12]; gi [color=none,fontsize=12]; gj [color=none,fontsize=12]; gk [color=none,fontsize=12]; gl [color=none,fontsize=12]; gm [color=none,fontsize=12]; gn [color=none,fontsize=12]; go [color=none,fontsize=12]; gp [color=none,fontsize=12]; gq [color=none,fontsize=12]; gr [color=none,fontsize=12]; gs [color=none,fontsize=12]; gt [color=none,fontsize=12]; gu [color=none,fontsize=12]; gv [color=none,fontsize=12]; gw [color=none,fontsize=12]; gx [color=none,fontsize=12]; gy [color=none,fontsize=12]; gaa [color=none,fontsize=12]; gab [color=none,fontsize=12]; gac [color=none,fontsize=12]; gad [color=none,fontsize=12]; gae [color=none,fontsize=12]; gaf [color=none,fontsize=12]; gag [color=none,fontsize=12]; gah [color=none,fontsize=12]; gai [color=none,fontsize=12]; gaj [color=none,fontsize=12]; gak [color=none,fontsize=12]; gal [color=none,fontsize=12]; gam [color=none,fontsize=12]; gan [color=none,fontsize=12]; gao [color=none,fontsize=12]; gap [color=none,fontsize=12]; gaq [color=none,fontsize=12]; #gaz [color=none,fontsize=12]; gas [color=none,fontsize=12]; gat [color=none,fontsize=12]; gau [color=none,fontsize=12]; gav [color=none,fontsize=12]; gaw [color=none,fontsize=12]; gax [color=none,fontsize=12]; gay [color=none,fontsize=12]; gaza [color=none,fontsize=12]; gazb [color=none,fontsize=12]; gazc [color=none,fontsize=12]; gazd [color=none,fontsize=12]; gaze [color=none,fontsize=12]; #gazf [color=none,fontsize=12]; gazg [color=none,fontsize=12]; gazh [color=none,fontsize=12]; gazi [color=none,fontsize=12]; gazj [color=none,fontsize=12]; gazk [color=none,fontsize=12]; gazl [color=none,fontsize=12]; gazm [color=none,fontsize=12]; gazn [color=none,fontsize=12]; gazo [color=none,fontsize=12]; gazp [color=none,fontsize=12]; gazq [color=none,fontsize=12]; gazr [color=none,fontsize=12]; gazs [color=none,fontsize=12]; gazt [color=none,fontsize=12]; gazu [color=none,fontsize=12]; gazv [color=none,fontsize=12]; gazw [color=none,fontsize=12]; gazx [color=none,fontsize=12]; gazy [color=none,fontsize=12]; root -> a [minlen=2]; root -> b [minlen=2]; root -> c [minlen=2]; root -> d [minlen=2]; root -> e [minlen=2]; root -> f [minlen=2]; root -> g [minlen=2]; root -> h [minlen=2]; root -> i [minlen=2]; root -> j [minlen=2]; root -> k [minlen=2]; root -> l [minlen=2]; root -> m [minlen=2]; root -> n [minlen=2]; root -> o [minlen=2]; root -> p [minlen=2]; root -> q [minlen=2]; root -> r [minlen=2]; root -> s [minlen=20]; root -> t [minlen=2]; root -> u [minlen=2]; root -> v [minlen=2]; root -> w [minlen=2]; root -> x [minlen=2]; root -> y [minlen=2]; root -> 0 [minlen=2]; root -> 1 [minlen=2]; root -> 2 [minlen=2]; root -> 3 [minlen=2]; root -> 4 [minlen=2]; root -> 5 [minlen=2]; root -> 6 [minlen=2]; root -> 7 [minlen=2]; root -> 8 [minlen=2]; root -> 9 [minlen=2]; root -> "." [minlen=2]; g -> ga ; g -> gb ; g -> gc ; g -> gd ; g -> ge ; g -> gf ; g -> gg ; g -> gh ; g -> gi ; g -> gj ; g -> gk ; g -> gl ; g -> gm ; g -> gn ; g -> go ; g -> gp ; g -> gq ; g -> gr ; g -> gs ; g -> gt ; g -> gu ; g -> gv ; g -> gw ; g -> gx ; g -> gy ; ga -> gaa ; ga -> gab ; ga -> gac ; ga -> gad ; ga -> gae ; ga -> gaf ; ga -> gag ; ga -> gah ; ga -> gai ; ga -> gaj ; ga -> gak ; ga -> gal ; ga -> gam ; ga -> gan ; ga -> gao ; ga -> gap ; ga -> gaq ; ga -> gaz ; ga -> gas ; ga -> gat ; ga -> gau ; ga -> gav ; ga -> gaw ; ga -> gax ; ga -> gay ; gaz -> gaza ; gaz -> gazb ; gaz -> gazc ; gaz -> gazd ; gaz -> gaze ; gaz -> gazf ; gaz -> gazg ; gaz -> gazh ; gaz -> gazi ; gaz -> gazj ; gaz -> gazk ; gaz -> gazl ; gaz -> gazm ; gaz -> gazn ; gaz -> gazo ; gaz -> gazp ; gaz -> gazq ; gaz -> gazr ; gaz -> gazs ; gaz -> gazt ; gaz -> gazu ; gaz -> gazv ; gaz -> gazw ; gaz -> gazx ; gaz -> gazy ; gazo -> "Blue Tuesday" ; "Blue Tuesday" [ fontsize=10]; // Layout engines: circo dot fdp neato nop nop1 nop2 osage patchwork sfdp twopi } This output is generated with: twopi -os1.png -Tpng s1.dot I'm posting here because the printout is pretty dreadful. All of the nodes hung of "gaz" are overlapping; I've tried specifying nodesep and it is simply ignored. I would like to see the lines from root to the single letters further apart, but again, I can't control that. This seems to be a bug in twopi. The documentation says it should clearly follow these directives, but it doesn't seem to. My questions: Is there any way to make twopi behave? Failing that, is there a better layout engine to use? Thanks.

    Read the article

  • sed - trying to replace first occurrence after a match

    - by wakkaluba
    I am facing a situation that drives me nuts. I am setting up an update server which uses a json file. Don't ask why or how, it sucks and is my only possibility to achieve it. I have been trying and researching for HOURS (many) because I went ballistic and wanted to crack this on my own. But I have to realize I got stuck and need help. So sorry for this chunk but I think it is somewhat important to see... The file is a one liner and repeating the following sequence with changing values (of course). "plugin_name_foo_bar": {"buildDate": "bla", "dependencies": [{"name": "bla", "optional": true, "version": "1.00"}], "developers": [{"developerId": "bla", "email": "[email protected]", "name": "Bla bla2nd"}], "excerpt": "some text {excerpt} !bla.png|thumbnail,border=1! ", "gav": "bla", "labels": ["report", "scm-related"], "name": "plugin_name_foo_bar", "previousTimestamp": "bla", "previousVersion": "1.0", "releaseTimestamp": "bla", "requiredCore": "1", "scm": "github.com", "sha1": "ynnBM2jWo25ZLDdP3ybBOnV/Pio=", "title": "bla", "url": "http://bla.org", "version": "1.0", "wiki": "https://bla.org"}, "Exclusion": {"buildDate": "bla", "dependencies": [], and the next plugin block is glued straight afterwards. What I now want to do is to search for "plugin_foo_bar": {" as this is the unique identifier for a new plugin description block. I want to replace the first sha1 value occuring afterwards. That's where I keep failing. I always grab the first,last or any occurrence in the entire file and not the block :( "title" is the unique identifier after the sha1 value. So I tried to make the .* less greedy but it ain't working out. last attempt was heading towards: sed -i 's/("name": "plugin_name_foo_bar.*sha1": ")([a-zA-Z0-9!@#\$%^&*()\[\]]*)(", "title"\)/\1blablabla\2/1' default.json to find the sha1 value of that plugin but still no joy. I hope someone knows - preferably a simpler approach - before I now continue with trial and error until I have to puke and freakout. I am working with SED on Windows, so Unix approach might help me to figure out how to achieve this in batch but please make it as one-liner if possible. Scripts are a real pain to convert. And I just need SED and no other solution with other tools like AWK. That is absolutely out of discussion. Any help is appreciated :) Cheers Jan

    Read the article

< Previous Page | 1 2