Search Results

Search found 17958 results on 719 pages for 'local delivery'.

Page 130/719 | < Previous Page | 126 127 128 129 130 131 132 133 134 135 136 137  | Next Page >

  • Can I have two different Styles in a CustomControl

    - by Subhen
    Hi, Can we have two different styles in generic.xaml setter template Property Something like: <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="local:customLocalFolderButton"> **<----Style 1---->** </ControlTemplate TargetType="local:customLocalFolderButton"> </Setter.Value> <Setter.Value> <ControlTemplate TargetType="local:customLocalFolderButton"> **<----Style 2---->** </ControlTemplate TargetType="local:customLocalFolderButton"> </Setter.Value> </Setter> Now I want to load the styles , as per the requirement. The 1st Style Can have a Red Folder and the Second Style Can have Blue Folder . The user can choose any of the theme and the choosen style(Either RedFolder or Blue) should be applied in the customControl it self. Thanks, Subhen

    Read the article

  • Why is lua crashing after extracting zip files?

    - by Brian T Hannan
    I have the following code but it crashes every time it reaches the end of the function, but it successfully extracts all the files and puts them in the right location. require "zip" function ExtractZipAndCopyFiles(zipPath, zipFilename, destinationPath) local zfile, err = zip.open(zipPath .. zipFilename) -- iterate through each file insize the zip file for file in zfile:files() do local currFile, err = zfile:open(file.filename) local currFileContents = currFile:read("*a") -- read entire contents of current file local hBinaryOutput = io.open(destinationPath .. file.filename, "wb") -- write current file inside zip to a file outside zip if(hBinaryOutput)then hBinaryOutput:write(currFileContents) hBinaryOutput:close() end end zfile:close() end -- call the function ExtractZipAndCopyFiles("C:\\Users\\bhannan\\Desktop\\LUA\\", "example.zip", "C:\\Users\\bhannan\\Desktop\\ZipExtractionOutput\\") Why does it crash every time it reaches the end?

    Read the article

  • CFExecute not performing command

    - by Drew
    <cfset LOCAL.cmd = expandPath('..\library\gm.exe') /> <cfset LOCAL.args = "convert image1.jpg image2.jpg" /> <cfexecute variable="gm" errorVariable="error" name="#LOCAL.cmd#" timeout="10" arguments="#local.args#" /> <cfdump var="#gm#" /> This code always results in an empty string in gm. No matter how I execute gm with or without parameters. Other examples work fine like running cmd.exe or netstat.exe as is in the CFDocs example. I get no errors thrown or warnings in errorVariable, it simply does nothing.

    Read the article

  • Custom script in .screenrc

    - by benoror
    Hi. I made a script that spawns a remote shell or runs a local shell whether it's on the current machine or not: #!/bin/bash # By: benoror <[email protected]> # # spawns a remote shell or runs a local shell whether it's on the current machine or not # $1 = hostname if [ "$(hostname)" == "$1" ]; then bash else ssh "$1.local" fi For example, if I'm on server1: ./spawnshell.sh server1 -> runs bash ./spawnshell.sh server2 -> ssh to server2.local I want that script to run automatically in separate tabs in GNU Screen, but I can't make it run, my .screenrc: ... screen -t "@server1" 1 exec /home/benoror/scripts/spawnshell.sh server1 screen -t "@server2" 2 exec /home/benoror/scripts/spawnshell.sh server2 ... But it doesn't works, I've tried without 'exec', with -X option and a lot more. Any ideas ?

    Read the article

  • MyContainer derived from FrameworkElement with binding support.

    - by alex2k8
    To understand how the binding works, I implemented MyContainer derived from FrameworkElement. This container allowes to set Children and adds them into the logical tree. But the binding by ElementName does not work. What can I do with MyContainer to make it work, leaving the parent as FrameworkElement? C#: public class MyContainer : FrameworkElement { public MyContainer() { Children = new List<FrameworkElement>(); } public List<FrameworkElement> Children { get; set; } protected override IEnumerator LogicalChildren { get { return Children.GetEnumerator(); } } } XAML: <Window x:Class="WpfLogicalTree.Window1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="clr-namespace:WpfLogicalTree" Title="Window1" Height="300" Width="300"> <StackPanel> <local:MyContainer> <local:MyContainer.Children> <TextBlock Text="Foo" x:Name="_source" /> <TextBlock Text="{Binding Path=Text, ElementName=_source}" x:Name="_target"/> </local:MyContainer.Children> </local:MyContainer> <Button Click="Button_Click">Test</Button> </StackPanel> </Window> Window1.cs private void Button_Click(object sender, RoutedEventArgs e) { MessageBox.Show(_target.Text); }

    Read the article

  • gem install cannot find a header file

    - by Milktrader
    Following along the github README for talib_ruby: sudo port install ta-lib Complete. Next is where the trouble begins. sudo env ARCHFLAGS="-arch PLATFORM" gem install talib_ruby -- --with-talib-include=ABSOLUTE_PATH_TO_TALIB_HEADERS --with-talib-lib=ABSOLUTE_PATH_TO_TALIB_LIBS This install fails I believe because apparently it cannot find the ta_abstract.h file talib.c:2:25: error: ta_abstract.h: No such file or directory . . . many more errors I have included in my .bash_profile file the following: export ABSOLUTE_PATH_TO_TALIB_HEADERS=/opt/local/var/macports/software/ta-lib/0.4.0_0/opt/local/include/ta-lib export ABSOLUTE_PATH_TO_TALIB_LIBS=/opt/local/var/macports/software/ta-lib/0.4.0_0/opt/local/lib And indeed the ta_abstract.h file is located where I'm saying in the ABSOLUTE_PATH variable assignment. What gives?

    Read the article

  • Option Value Changed - ODBC Error 2169

    - by fredrick-ughimi
    Hello Edgar, Thank you for your response. I am using Powerbasic (www.powerbasic.com) as my compiler and SQLTools as a third party tool to access ADS through ODBC. I must stat that this error also appers when I take other actions like Update, Delete, Find, etc. But I don't get this error when I am using MS Access. Here is my save routine: [Code] Local sUsername As String Local sPassword As String Local sStatus As String Local sSQLStatement1 As String sUsername = VD_GetText (nCbHndl, %ID_FRMUPDATEUSERS_TXTUSERNAME) If Trim$(sUsername) = "" Then MsgBox "Please, enter Username", %MB_ICONINFORMATION Or %MB_TASKMODAL, VD_App.Title Control Set Focus nCbHndl, %ID_FRMUPDATEUSERS_TXTUSERNAME Exit Function End If sPassword = VD_GetText (nCbHndl, %ID_FRMUPDATEUSERS_TXTPASSWORD) If Trim$(sPassword) = "" Then MsgBox "Please, enter Password", %MB_ICONINFORMATION Or %MB_TASKMODAL, VD_App.Title Control Set Focus nCbHndl, %ID_FRMUPDATEUSERS_TXTPASSWORD Exit Function End If sStatus = VD_GetText (nCbHndl, %ID_FRMUPDATEUSERS_CBOSTATUS) sSQLStatement1 = "INSERT INTO [tblUsers] (Username, Password, Status) " + _ "VALUES ('" + sUsername + "','" + sPassword + "','" + sStatus +"')" 'Submit the SQL Statement to the database SQL_Stmt %SQL_STMT_IMMEDIATE, sSQLStatement1 'Check for errors If SQL_ErrorPending Then SQL_MsgBox SQL_ErrorQuickAll, %MSGBOX_OK End If [/code] Best regards,

    Read the article

  • C++ MTL Library dimension.h bug?

    - by avanwieringen
    I've installed MTL on my Fedora Core 12 x64 system, but when building an application I get the following error: In file included from /usr/local/include/mtl/matrix.h:41, from /usr/local/include/mtl/mtl.h:40, from ltiSystem.hxx:4, from strTools.hxx:4, from ff.cxx:3: /usr/local/include/mtl/envelope2D.h:72: error: declaration of ‘typedef struct mtl::twod_tag mtl::envelope2D<T>::dimension’ /usr/local/include/mtl/dimension.h:19: error: changes meaning of ‘dimension’ from ‘class mtl::dimension<typename mtl::dense1D<T, 0>::size_type, 0, 0>’ make[1]: *** [ff.o] Error 1 Which would imply an error in MTL. I have changed to different MTL versions and the problem persists, but on Google there is no proper answer. I use the g++ compiler. Does anyone have a clye?

    Read the article

  • Unable to Redirecting to a subdomain after logIn from another subdomain in MVC4

    - by Nash
    Expect behaviour :: User has to login from aut.mycompany.local and after login he must be redirected to my.mycompany.local. Redirecting Code after validating the user credentials return RedirectToAction("Index", @"plportal/account", new { subdomain = "my" }); Actual Subdomain URL http://my.mycompany.local/plportal/account But I'm getting belwo error: System.DirectoryServices.DirectoryServicesCOMException: There is no such object on the server. PLease help me and thanks in advance

    Read the article

  • problem installing mysqldb for python2.6

    - by apoorva
    Hi.. My mysql database is located on a remote machine... So i dont have any local copy of mysql on my local machine.. i get the registry key error... (file not found)... serverKey = _winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE, options['registry_key']) WindowsError: [Error 2] The system cannot find the file specified I think it requires to have a local copy of mysql... How do i install the mysqldb for database residing on another machine???

    Read the article

  • GitLab on a fresh Ubuntu 13 EC2 instance

    - by Polly
    I've spun up a fresh Amazon EC2 instance for a micro Ubuntu 13 server to be used as a GitLab server. I know the specs are a little low, but it should serve well for my purposes. It has an elastic (static) IP address that I have created an A record for git.mydomain.com. The first thing I did to the instance was add 1GB of swap to keep it happy from a memory perspective. I then set the hostname of the box to be git.mydomain.com and followed https://github.com/gitlabhq/gitlabhq/blob/6-2-stable/doc/install/installation.md to the letter. Everything seems to have worked, except for the web server side of things. Doing a gitlab:check shows the following: Checking Environment ... Git configured for git user? ... yes Has python2? ... yes python2 is supported version? ... yes Checking Environment ... Finished Checking GitLab Shell ... GitLab Shell version >= 1.7.4 ? ... OK (1.7.4) Repo base directory exists? ... yes Repo base directory is a symlink? ... no Repo base owned by git:git? ... yes Repo base access is drwxrws---? ... yes update hook up-to-date? ... yes update hooks in repos are links: ... can't check, you have no projects Running /home/git/gitlab-shell/bin/check Check GitLab API access: /usr/local/lib/ruby/2.0.0/net/http.rb:878:in `initialize': Connection refused - connect(2) (Errno::ECONNREFUSED) from /usr/local/lib/ruby/2.0.0/net/http.rb:878:in `open' from /usr/local/lib/ruby/2.0.0/net/http.rb:878:in `block in connect' from /usr/local/lib/ruby/2.0.0/timeout.rb:52:in `timeout' from /usr/local/lib/ruby/2.0.0/net/http.rb:877:in `connect' from /usr/local/lib/ruby/2.0.0/net/http.rb:862:in `do_start' from /usr/local/lib/ruby/2.0.0/net/http.rb:851:in `start' from /home/git/gitlab-shell/lib/gitlab_net.rb:62:in `get' from /home/git/gitlab-shell/lib/gitlab_net.rb:29:in `check' from /home/git/gitlab-shell/bin/check:11:in `<main>' gitlab-shell self-check failed Try fixing it: Make sure GitLab is running; Check the gitlab-shell configuration file: sudo -u git -H editor /home/git/gitlab-shell/config.yml Please fix the error above and rerun the checks. Checking GitLab Shell ... Finished Checking Sidekiq ... Running? ... yes Number of Sidekiq processes ... 1 Checking Sidekiq ... Finished Checking GitLab ... Database config exists? ... yes Database is SQLite ... no All migrations up? ... yes GitLab config exists? ... yes GitLab config outdated? ... no Log directory writable? ... yes Tmp directory writable? ... yes Init script exists? ... yes Init script up-to-date? ... yes projects have namespace: ... can't check, you have no projects Projects have satellites? ... can't check, you have no projects Redis version >= 2.0.0? ... yes Your git bin path is "/usr/bin/git" Git version >= 1.7.10 ? ... yes (1.8.3) Checking GitLab ... Finished It seems like I'm very nearly there. Searching on this error I have only found advice that unfortunately hasn't helped. I'm not using any kind of SSL setup, which a lot of the posts I found were about. I have tried appending 127.0.0.1 git.mydomain.com to /etc/hosts and giving the instance a reboot but there was no change. My config/gitlab.yml file has host: git.mydomain.com in it, and my gitlab-shell/config.yml has gitlab_url: "http://git.mydomain.com/" in it. I'm sure I'm missing something simple, but I've been through every relevant link I can find and have had no positive results; thank you in advance for any help!

    Read the article

  • Is there a reasonable way to attach new path to PATH in bashrc?

    - by Ripley
    Guys I constantly need to attach new paths to the PATH environment variable in .bashrc, like below: export PATH=/usr/local/bin:$PATH Then to make it take effect, I always do 'source ~/.bashrc' or '. ~/.bashrc', while I found one shortcoming of doing so which make me uncomfortable. If I keep doing so, the PATH will getting longer and longer with many duplicated entries, for example in the previous command, if I source it twice, the value of PATH will be PATH=/usr/local/bin:/usr/local/bin:/usr/local/bin:$PATH(<-the original path). Is there a more decent way to attach new path to PATH in bashrc without making it ugly?

    Read the article

  • (JBoss) Problem with .war project on production, while test works

    - by ikky
    Hello. I have a java project (using Spring mvc) which i have built and deployed on my local computer. It runs on a JBoss application server, and works fine on the local machine. The next step i do, is to copy the deployed project.war from the local machine to the server which has the same development environment as the local machine. I stop the JBoss server, delete the cache, and run the JBoss server again. When i now try to run one of the pages(xx.xxx.xxx:8080/webservice/test.htm), i get this exception: exception org.springframework.web.util.NestedServletException: Request processing failed; nested exception is java.lang.NullPointerException org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:583) root cause java.lang.NullPointerException com.project.db.DBCustomer.isCredentialsCorrect(DBCustomer.java:44) com.project.CreateHController.handleRequest(CreateHController.java:60) org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48) org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:875) org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:807) org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:571) org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:501) javax.servlet.http.HttpServlet.service(HttpServlet.java:697) javax.servlet.http.HttpServlet.service(HttpServlet.java:810) org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:75) It seems like none of my classes are reachable. Does anyone have any idea of what is wrong? btw: as i said, the project works fine on the local machine.

    Read the article

  • In CMake, how does CHECK_INCLUDE_FILE_CXX work?

    - by Neil G
    The following code prints nothing CHECK_INCLUDE_FILE_CXX(glog/logging.h GLOG_INCLUDE) IF(GLOG_INCLUDE) MESSAGE("YY") ENDIF(GLOG_INCLUDE) But I have the following environment variable set: export CPLUS_INCLUDE_PATH=/usr/local/include And, "ls /usr/local/include/glog/logging.h" returns the file. I tried using include_directories( "/usr/local/include" ) but it doesn't work either.

    Read the article

  • How do I permanently remove (obliterate) files from history?

    - by phmr
    I commited a lot of files locally (including binary files removing & adding...) and now when I try to push it takes a lot of time. Actually I messed up my local repo history. How could I avoid this mistake in the future ? Can I transform a set of local revision 1-2-3-4 to 1-2 with 2 being the final revision of the local clone ?

    Read the article

  • HTA value update freezes when file copy starts

    - by Matt Hamende
    Creating an HTA that will automate the installation of several applications it starts by checking for the existence of certain files then copies a large folder to local from a flash drive if it doesn't exist, I have a textbox I'm using to update the current status of the script, but it just seems to freeze and never updates, I haven't had any luck with any of the artificial sleep functions either. here's the segment If Not objFSO.FileExists(Office10Dir) Then MsgBox("Excel is missing") BasicTextBox.Value = "Office14 Not Detected, Copying Source Files to Local" Dim objFS, objFolder Dim OfficeTemp OfficeTemp = "C:\OfficeTemp" Set objFS = CreateObject("Scripting.FileSystemObject") Set objFolder = objFS.CreateFolder(OfficeTemp) objFS.CopyFolder "OfficeTemp", "C:\OfficeTemp" BasicTextBox.Value = "Local Temp Directory Created" ELSE MsgBox("Excel is Installed") END IF All i see is the "Local Temp Directory Created" message once file copy is complete

    Read the article

  • Browser download file prompt using javascript

    - by aix
    hi, I was wondering if there was any method to implement browser's download file prompt using javascript. My reason - well users will be uploading files to a local fileserver which cannot be accessed from the webserver. In other words, both will be on different domains! e.g. let’s say websites hosted on www.xyz.com, but files would reside on local file server with address like \10.10.10.01\Files\file.txt. How am I uploading/transferring file to local fileserver... using ACTIVEX(yikes) & VBscript!!!! (don’t ask :-) so i am storing local file path in my database and binding that data to a grid. So when the user clicks on that link, the file opens in a window (using javascript). Problem is certain file types like text, jpg, pdf, etc open inside browser window. How would i be able to implement content-type or content-disposition using client side scripting? Is that even possible? hoping my description was clear. Any ideas? EDIT: the local file server has a window's shared folder on which the files are saved.

    Read the article

  • remsh rsh error redirect problem

    - by soField
    using following command on hp-ux remsh opera -l myuser crontab -l /opt1/exp_opera_crontab 2/opt/a.log and when i echo $? i get 0 because its executing crontab -l on remote machine but i dont have opt1 directory so export wont be copied to my local machine in /opt1/exp_opera_crontab i dont get any error about this when i run this remsh or rsh command is there any way to identify both of remote and local machine related errors and redirecting them into my local machine ?

    Read the article

  • cflock do not throw timeout for same url called in same browser

    - by Pritesh Patel
    I am trying lock block on page test.cfm and below is code written on page. <cfscript> writeOutput("Before lock at #now()#"); lock name="threadlock" timeout="3" type="exclusive" { writeOutput("<br/>started at #now()#"); thread action="sleep" duration="10000"; writeOutput("<br/>ended at #now()#"); } writeOutput("<br/>After lock at #now()#"); </cfscript> assuming my url for page is http://localhost.local/test.cfm and running it on browser in two different tabs. I was expecting one of the url will throw timeout error after 3 second since another url lock it atleast for 10 seconds due to thread sleep. Surprisingly I do not get any timeout error rather second page call run after 10 seconds as first call finish execution. But I am appending some url parameter (e.g. http://localhost.local/test.cfm?q=1) will throw error. Also I am calling same url in different browser then one of the call will throw timeout issue. Is lock based on session and url? Update Here is output for two different cases: Case 1: TAB1 Url: http://localhost.local/test/test.cfm Before lock at {ts '2013-10-18 09:21:35'} started at {ts '2013-10-18 09:21:35'} ended at {ts '2013-10-18 09:21:45'} After lock at {ts '2013-10-18 09:21:45'} TAB2 Url: http://localhost.local/test/test.cfm Before lock at {ts '2013-10-18 09:21:45'} started at {ts '2013-10-18 09:21:45'} ended at {ts '2013-10-18 09:21:55'} After lock at {ts '2013-10-18 09:21:55'} Case 2: TAB1 Url: http://localhost.local/test/test.cfm Before lock at {ts '2013-10-18 09:27:18'} started at {ts '2013-10-18 09:27:18'} ended at {ts '2013-10-18 09:27:28'} After lock at {ts '2013-10-18 09:27:28'} TAB2 Url: http://localhost.local/test/test.cfm? (Added ? at the end) Before lock at {ts '2013-10-18 09:27:20'} A timeout occurred while attempting to lock threadlock. The error occurred in C:/inetpub/wwwroot/test/test.cfm: line 13 11 : 12 : <cfoutput>Before lock at #now()#</cfoutput> 13 : <cflock name="threadlock" timeout="3" type="exclusive"> 14 : <cfoutput><br/>started at #now()#</cfoutput> 15 : <cfthread action="sleep" duration="10000"/> ... Result for case 2 as expected. For case 1, strange thing I just noticed is tab 2 output "Before lock at {ts '2013-10-18 09:21:45'} indicates that whole request start after 10 seconds (means after the complete execution of first tab) when I have fired it in second URL just after 2 seconds of first tabs.

    Read the article

  • What's special about mouse capture and middle mouse button in WPF?

    - by Scott Bilas
    When I call CaptureMouse() in response to a MouseDown from the middle mouse button, it will capture and then release the mouse. Huh? I've tried using Preview events, setting Handled=true, doesn't make a difference. Am I not understanding mouse capture in WPF? Here's some minimal sample code that reproduces the problem. // TestListBox.cs using System.Diagnostics; using System.Windows.Controls; namespace Local { public class TestListBox : ListBox { public TestListBox() { MouseDown += (_, e) => { Debug.WriteLine("+MouseDown"); Debug.WriteLine(" Capture: " + CaptureMouse()); Debug.WriteLine("-MouseDown"); }; MouseUp += (_, e) => { Debug.WriteLine("+MouseUp"); ReleaseMouseCapture(); Debug.WriteLine("-MouseUp"); }; GotMouseCapture += (_, e) => Debug.WriteLine("GotMouseCapture"); LostMouseCapture += (_, e) => Debug.WriteLine("LostMouseCapture"); } } } Generating a default WPF app that has this for its main window will use the test class: <Window x:Class="Local.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="clr-namespace:Local" Title="MainWindow" Height="350" Width="525"> <local:TestListBox> <ListBoxItem>1</ListBoxItem> <ListBoxItem>2</ListBoxItem> <ListBoxItem>3</ListBoxItem> <ListBoxItem>4</ListBoxItem> </local:TestListBox> </Window> Upon clicking the middle button down, I get this output: +MouseDown GotMouseCapture LostMouseCapture Capture: True -MouseDown So I'm calling CaptureMouse, which in turn grabs and then releases capture, yet returns true that capture was successfully acquired. What's going on here? Is it possible that this is something with my Logitech mouse driver doing something goofy, trying to initiate 'ultrascroll' or something?

    Read the article

  • The type{0} does not support direct content - WPF / XAML

    - by Levo
    Hi there: I defined in my code two classes: a "Person" class with public "Age" and "Name" property, and a "People" class that inherits from Generic.List(of T). The code for People class is as followed: Public Class People Inherits Collections.Generic.List(Of Person) ... End Class What I want to achieve is to directly initialize the People class, and add individual Person to it in XAML, i.e.: <local:People x:Key="Familty"> <local:Person Age="11" Name="John" /> <local:Person Age="12" Name="John2" /> ... </local:People> But I keep getting an error in XAML saying: The type 'People' does not support direct content. Any idea as for how to solve this problem? Thank you very much!

    Read the article

  • help with generating models from database for many to many in doctrine

    - by ajsie
    im using doctrine and i have set up some test tables to be generated into models: I want a many-to-many relationship models (3 tables converted into 3 models) (things are simplified to make the point clear) mysql tables: user: id INT // primary key name VARCHAR group: id INT // primary key name VARCHAR user_group: user_id INT // primary and foreign key to user.id group_id INT // primary and foreign key to group.id i thought that it would generate these models (from the documentation): // User.php class User extends Doctrine_Record { public function setTableDefinition() { $this->hasColumn('id'); $this->hasColumn('name); } public function setUp() { $this->hasMany('Group as Groups', array( 'refClass' => 'UserGroup', 'local' => 'user_id', 'foreign' => 'group_id' ) ); } } // Group.php class Group extends Doctrine_Record { public function setTableDefinition() { $this->hasColumn('id'); $this->hasColumn('name); } public function setUp() { $this->hasMany('User as Users', array( 'refClass' => 'UserGroup', 'local' => 'group_id', 'foreign' => 'user_id' ) ); } } // UserGroup.php class UserGroup extends Doctrine_Record { public function setTableDefinition() { $this->hasColumn('user_id') ); $this->hasColumn('group_id') ); } } but it generated this: // User.php abstract class BaseUser extends Doctrine_Record { public function setTableDefinition() { $this->hasColumn('id'); $this->hasColumn('name'); } public function setUp() { $this->hasMany('UserGroup', array( 'local' => 'id', 'foreign' => 'user_id')); } } // Group.php abstract class BaseGroup extends Doctrine_Record { public function setTableDefinition() { $this->hasColumn('id'); $this->hasColumn('name'); } public function setUp() { $this->hasMany('UserGroup', array( 'local' => 'id', 'foreign' => 'group_id')); } } // UserGroup.php abstract class BaseUserGroup extends Doctrine_Record { public function setTableDefinition() { $this->hasColumn('user_id'); $this->hasColumn('group_id'); } public function setUp() { $this->hasOne('User', array( 'local' => 'user_id', 'foreign' => 'id')); $this->hasOne('Group', array( 'local' => 'group_id', 'foreign' => 'id')); } } as you can see, there is no 'refClass' in the 'User' and 'Group' models pointing to the 'UserGroup'. the 'UserGroup' table in this case is just another table from Doctrine's perspective not a reference table. I've checked my table definitions in mysql. They are correct. user_group has 2 columns (primary keys and foreign keys), each one pointing to the primary key in either User or Group. But i want the standard many-to-many relationship models in Doctrine models. I'd appreciate some help. I have struggled to figure it out for a half day now. What is wrong? Thanks!

    Read the article

  • Replacing text after node

    - by Andrew
    I am trying to remove the "Hide this data" from this XML which is proceeded with the qualifier type="noView" <element version="Local"> <qualifier name="Public" type="View" /> Good to go </element> <element version="Local"> <qualifier name="Public" type="noView" /> Hide this data </element> I am using this XSL <?xml version="1.0"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:template match="node()|@*"> <xsl:copy> <xsl:apply-templates select="@*"/> <xsl:apply-templates/> </xsl:copy> </xsl:template> <xsl:template match="qualifier"> <xsl:call-template name="replace-noview" /> </xsl:template> <xsl:template name="replace-noview"> <xsl:param name="text" select="@type"/> <xsl:choose> <xsl:when test="contains($text, 'noView')"> <xsl:copy-of select="."/> <xsl:text>DELETED</xsl:text> </xsl:when> <xsl:otherwise> <xsl:copy-of select="."/> </xsl:otherwise> </xsl:choose> </xsl:template> The output I'm getting is <element identifier="ContactName" version="Local"> <qualifier name="Public" type="View" /> Good to go </element> <element identifier="ContactName" version="Local"> <qualifier name="Public" type="noView" />DELETED Hide this data </element> I am matching the "noView" attribute and can add the "DELETED" text. However I need to remove the follow "Hide this data" text. The output I would like is <element identifier="ContactName" version="Local"> <qualifier name="Public" type="View" /> Good to go </element> <element identifier="ContactName" version="Local"> <qualifier name="Public" type="noView" /> DELETED </element>

    Read the article

< Previous Page | 126 127 128 129 130 131 132 133 134 135 136 137  | Next Page >