Search Results

Search found 6376 results on 256 pages for 'launch condition'.

Page 35/256 | < Previous Page | 31 32 33 34 35 36 37 38 39 40 41 42  | Next Page >

  • Best way to check for nullable bool in a condition expression (if ...)

    - by FireSnake
    I was wondering what was the most clean and understandable syntax for doing condition checks on nullable bools. Is the following good or bad coding style? Is there a way to express the condition better/more cleanly? bool? nullableBool = true; if (nullableBool ?? false) { ... } else { ... } especially the if (nullableBool ?? false) part. I don't like the if (x.HasValue && x.Value) style ... (not sure whether the question has been asked before ... couldn't find something similar with the search)

    Read the article

  • How to use condition in a TestGen4Web script for a child popup window?

    - by GotoError
    I have TestGen4Web script for automating testing on a web-based user interface that has a popup window (hey i didn't write that ui..). In order to write a complete test script that branches the flow based on the some presence of some content in the popup window, I need to write a simple if condition that does something like if document.getElementById("xyz").value - that will run on the popup window and not the parent window. Any ideas on how to accomplish this? currently, the condition fails because it runs on the parent window. Also, how to extract some text from the dom and spit it out to a file at the end of the test?

    Read the article

  • Grafting LINQ onto C# 2 library

    - by P Daddy
    I'm writing a data access layer. It will have C# 2 and C# 3 clients, so I'm compiling against the 2.0 framework. Although encouraging the use of stored procedures, I'm still trying to provide a fairly complete ability to perform ad-hoc queries. I have this working fairly well, already. For the convenience of C# 3 clients, I'm trying to provide as much compatibility with LINQ query syntax as I can. Jon Skeet noticed that LINQ query expressions are duck typed, so I don't have to have an IQueryable and IQueryProvider (or IEnumerable<T>) to use them. I just have to provide methods with the correct signatures. So I got Select, Where, OrderBy, OrderByDescending, ThenBy, and ThenByDescending working. Where I need help are with Join and GroupJoin. I've got them working, but only for one join. A brief compilable example of what I have is this: // .NET 2.0 doesn't define the Func<...> delegates, so let's define some workalikes delegate TResult FakeFunc<T, TResult>(T arg); delegate TResult FakeFunc<T1, T2, TResult>(T1 arg1, T2 arg2); abstract class Projection{ public static Condition operator==(Projection a, Projection b){ return new EqualsCondition(a, b); } public static Condition operator!=(Projection a, Projection b){ throw new NotImplementedException(); } } class ColumnProjection : Projection{ readonly Table table; readonly string columnName; public ColumnProjection(Table table, string columnName){ this.table = table; this.columnName = columnName; } } abstract class Condition{} class EqualsCondition : Condition{ readonly Projection a; readonly Projection b; public EqualsCondition(Projection a, Projection b){ this.a = a; this.b = b; } } class TableView{ readonly Table table; readonly Projection[] projections; public TableView(Table table, Projection[] projections){ this.table = table; this.projections = projections; } } class Table{ public Projection this[string columnName]{ get{return new ColumnProjection(this, columnName);} } public TableView Select(params Projection[] projections){ return new TableView(this, projections); } public TableView Select(FakeFunc<Table, Projection[]> projections){ return new TableView(this, projections(this)); } public Table Join(Table other, Condition condition){ return new JoinedTable(this, other, condition); } public TableView Join(Table inner, FakeFunc<Table, Projection> outerKeySelector, FakeFunc<Table, Projection> innerKeySelector, FakeFunc<Table, Table, Projection[]> resultSelector){ Table join = new JoinedTable(this, inner, new EqualsCondition(outerKeySelector(this), innerKeySelector(inner))); return join.Select(resultSelector(this, inner)); } } class JoinedTable : Table{ readonly Table left; readonly Table right; readonly Condition condition; public JoinedTable(Table left, Table right, Condition condition){ this.left = left; this.right = right; this.condition = condition; } } This allows me to use a fairly decent syntax in C# 2: Table table1 = new Table(); Table table2 = new Table(); TableView result = table1 .Join(table2, table1["ID"] == table2["ID"]) .Select(table1["ID"], table2["Description"]); But an even nicer syntax in C# 3: TableView result = from t1 in table1 join t2 in table2 on t1["ID"] equals t2["ID"] select new[]{t1["ID"], t2["Description"]}; This works well and gives me identical results to the first case. The problem is if I want to join in a third table. TableView result = from t1 in table1 join t2 in table2 on t1["ID"] equals t2["ID"] join t3 in table3 on t1["ID"] equals t3["ID"] select new[]{t1["ID"], t2["Description"], t3["Foo"]}; Now I get an error (Cannot implicitly convert type 'AnonymousType#1' to 'Projection[]'), presumably because the second join is trying to join the third table to an anonymous type containing the first two tables. This anonymous type, of course, doesn't have a Join method. Any hints on how I can do this?

    Read the article

  • How to launch git bash window with particular working directory using a script?

    - by holocronweaver
    How can I launch a new Git Bash window with a specified working directory using a script (either bash or Windows batch)? My goal is to launch multiple Git Bash windows from a single script, each Bash terminal set to a different working directory. This way I can quickly get to work after booting computer instead of having to open Git Bash windows and navigating each one to the correct working directory.

    Read the article

  • Why might my Xcode be crashing (or at least displaying an error on launch)?

    - by dsobol
    I am getting an error thrown when I launch my Xcode 3.2 all of a sudden: Uncaught Exception: * -[NSCFArray initWithObjects:count:]: attempt to insert nil object at objects[0] I can click through the error and Xcode seems to launch properly. I removed and reinstalled Xcode to no avail, and yet cannot find a config or perference that might be the culprit. I am running on 10.6.3 fwiw.... Has anyone else run into this problkem? TIA! Regards, Steve O'Sullivan

    Read the article

  • Datastage 8.7 installs fine on Window7 without any errors but it can not launch localhost:9080 web console

    - by user265273
    When I launch the web console, I get page can not be displayed error. What I have tried so far: I have re-installed DS about 7 times, and each time, I get same errors. I added entries in etc/hosts file for local host and my host name. I have turned off firewall. My hardware/software setup. My host system is window8.1. My vmware workstation is 7. The guest os is windows 7 enterprise x64. I have installed 10g, and given dba role to public. I have installed VS 5, and ms visual c++ 2010 express. I have installed msxml. IE version is 10. Firewall is off. My internet works fine It passed all the DS requirement tests and install completed successfully. When I launch my vmware guest instance, I do get SQL5000c error upon boot which I have tried to ignore in some installs and in some, I used db2systray -clean command to get rid of it. But that has not helped solve the webconsole connect failure to my host. I have spent over 2 weeks exclusively on this issue and badly need some help.

    Read the article

  • Partnering with a web designer to build and launch websites for fun. Where should I look for someone? [closed]

    - by FastCoder
    I have been working with web sites and web development for a long time and as a result I am able to build and launch complex websites (social network, dating site, stackoverflow, etc.) in little time (1-3 weeks). Problem is: I know very little about CSS, page layout, photoshop and graphic design. Of course I know HTML but when it comes to putting together something that looks good I am horrible. I just don't have the artistic skills. I wanted to launch some websites without any silly or naive intent to take over the world. Just for fun and to improve the portfolio. How do you guys recommend that I approach this problem of "finding this right partner" with the same mindset? Where should I look for this person? I have no idea... :(

    Read the article

  • Best way to dynamically get column names from oracle tables

    - by MNC
    Hi, We are using an extractor application that will export data from the database to csv files. Based on some condition variable it extracts data from different tables, and for some conditions we have to use UNION ALL as the data has to be extracted from more than one table. So to satisfy the UNION ALL condition we are using nulls to match the number of columns. Right now all the queries in the system are pre-built based on the condition variable. The problem is whenever there is change in the table projection (i.e new column added, existing column modified, column dropped) we have to manually change the code in the application. Can you please give some suggestions how to extract the column names dynamically so that any changes in the table structure do not require change in the code? My concern is the condition that decides which table to query. The variable condition is like if the condition is A, then load from TableX if the condition is B then load from TableA and TableY. We must know from which table we need to get data. Once we know the table it is straightforward to query the column names from the data dictionary. But there is one more condition, which is that some columns need to be excluded, and these columns are different for each table. I am trying to solve the problem only for dynamically generating the list columns. But my manager told me to make solution on the conceptual level rather than just fixing. This is a very big system with providers and consumers constantly loading and consuming data. So he wanted solution that can be general. So what is the best way for storing condition, tablename, excluded columns? One way is storing in database. Are there any other ways? If yes what is the best? As I have to give at least a couple of ideas before finalizing. Thanks,

    Read the article

  • When I try to click and launch some of the links set to open in new window, it is being treated as a pop-up window [migrated]

    - by Test Developer
    For the past few days, we are facing issue with the chrome browser behavior. This is related to opening links set to open in new tab/window. The details are as follow: I have a collection of links and each link points to different resource to be opened in a new tab/window. The code is as follow: <a class="cssClass" rid="1114931" href="http://www.domain.com/resources/abc.html" title="Link1" tabindex="4">Link 1</a> And there are few checks/filters over accessing the resources which have been implemented as onClick handler over the links. In case any of the validations fails, the onClick handler returns false and the default behavior of the link does not happens i.e. links does not get open. One of such (last) checks includes AJAX call in sync mode. The code is as follow: var link_clickHandler = function(evt/* Event */) { var objTarget = jQuery(evt.target); if(check1) { return false; } else if(check2) { return false; } else if(check3) { var blnRetVal = false; jQuery.ajax( { "async" : false, "type" : "GET", "contentType" : "application/json; charset=utf-8", "url" : "index.php", "data" : 'resourceid=' + intResourceId, "dataType" : "json", "forceData" : true, "success" : function(data) { if(check1) { blnRetVal = true; } } "error" : function(error) { } } ); return blnRetVal; } }; jQuery("a.cssClass").live("click", link_clickHandler); ISSUE: The issue is that Chrome is behaving very weirdly manner. In case all of the checks are passed and onClick handler returns true, sometimes the resource get opened in a new tab/window and sometimes it get opened as a pop-up (which should never). Tried to capture any pattern but could not succeed. Any solution or even helping in understanding behavior would be really appreciated.

    Read the article

  • Total Cloud Control keeps getting better ! Oracle Launch Webcast : Total Cloud Control for Systems

    - by Anand Akela
    Total Cloud Control Keeps Getting Better Join Oracle Vice President of Systems Management Steve Wilson and a panel of Oracle executives to find out how your enterprise cloud can achieve 10x improved performance and 12x operational agility. Only Oracle Enterprise Manager Ops Center 12c allows you to: Accelerate mission-critical cloud deployment Unleash the power of Solaris 11, the first cloud OS Simplify Oracle engineered systems management You’ll also get a chance to have your questions answered by Oracle product experts and dive deeper into the technology by viewing our demos that trace the steps companies like yours take as they transition to a private cloud environment. Featured Speaker With a special announcement by: Steve Wilson Vice President, Systems Management, Oracle John Fowler Executive Vice President, Systems, Oracle Agenda 9:00 a.m. PT Keynote: Total Cloud Control for Systems 9:45 a.m. PT Panel Discussion with Oracle Hardware, Software, and Support Executives 10:15 a.m. PT Demo Series: A Step-by-Step Journey to Enterprise Clouds Stay connected with  Oracle Enterprise Manager   :  Twitter | Facebook | YouTube | Linkedin | Newsletter

    Read the article

  • How to Secure a Data Role by Multiple Business Units

    - by Elie Wazen
    In this post we will see how a Role can be data secured by multiple Business Units (BUs).  Separate Data Roles are generally created for each BU if a corresponding data template generates roles on the basis of the BU dimension. The advantage of creating a policy with a rule that includes multiple BUs is that while mapping these roles in HCM Role Provisioning Rules, fewer number of entires need to be made. This could facilitate maintenance for enterprises with a large number of Business Units. Note: The example below applies as well if the securing entity is Inventory Organization. Let us take for example the case of a user provisioned with the "Accounts Payable Manager - Vision Operations" Data Role in Fusion Applications. This user will be able to access Invoices in Vision Operations but will not be able to see Invoices in Vision Germany. Figure 1. A User with a Data Role restricting them to Data from BU: Vision Operations With the role granted above, this is what the user will see when they attempt to select Business Units while searching for AP Invoices. Figure 2.The List Of Values of Business Units is limited to single one. This is the effect of the Data Role granted to that user as can be seen in Figure 1 In order to create a data role that secures by multiple BUs,  we need to start by creating a condition that groups those Business Units we want to include in that data role. This is accomplished by creating a new condition against the BU View .  That Condition will later be used to create a data policy for our newly created Role.  The BU View is a Database resource and  is accessed from APM as seen in the search below Figure 3.Viewing a Database Resource in APM The next step is create a new condition,  in which we define a sql predicate that includes 2 BUs ( The ids below refer to Vision Operations and Vision Germany).  At this point we have simply created a standalone condition.  We have not used this condition yet, and security is therefore not affected. Figure 4. Custom Role that inherits the Purchase Order Overview Duty We are now ready to create our Data Policy.  in APM, we search for our newly Created Role and Navigate to “Find Global Policies”.  we query the Role we want to secure and navigate to view its global policies. Figure 5. The Job Role we plan on securing We can see that the role was not defined with a Data Policy . So will create one that uses the condition we created earlier.   Figure 6. Creating a New Data Policy In the General Information tab, we have to specify the DB Resource that the Security Policy applies to:  In our case this is the BU View Figure 7. Data Policy Definition - Selection of the DB Resource we will secure by In the Rules Tab, we  make the rule applicable to multiple values of the DB Resource we selected in the previous tab.  This is where we associate the condition we created against the BU view to this data policy by entering the Condition name in the Condition field Figure 8. Data Policy Rule The last step of Defining the Data Policy, consists of  explicitly selecting  the Actions that are goverened by this Data Policy.  In this case for example we select the Actions displayed below in the right pane. Once the record is saved , we are ready to use our newly secured Data Role. Figure 9. Data Policy Actions We can now see a new Data Policy associated with our Role.  Figure 10. Role is now secured by a Data Policy We now Assign that new Role to the User.  Of course this does not have to be done in OIM and can be done using a Provisioning Rule in HCM. Figure 11. Role assigned to the User who previously was granted the Vision Ops secured role. Once that user accesses the Invoices Workarea this is what they see: In the image below the LOV of Business Unit returns the two values defined in our data policy namely: Vision Operations and Vision Germany Figure 12. The List Of Values of Business Units now includes the two we included in our data policy. This is the effect of the data role granted to that user as can be seen in Figure 11

    Read the article

  • Oracle Fusion Middleware 11g next launch phase - what a week of product releases! Feedback from our

    - by Jürgen Kress
      Product releases: SOA Suite 11gR1 Patch Set 2 (PS2) BPM Suite 11gR1 Released Oracle JDeveloper 11g (11.1.1.3.0) (Build 5660) Oracle WebLogic Server 11gR1 (10.3.3) Oracle JRockit (4.0) Oracle Tuxedo 11gR1 (11.1.1.1.0) Enterprise Manager 11g Grid Control Release 1 (11.1.0.1.0) for Linux x86/x86-64 All Oracle Fusion Middleware 11gR1 Software Download   BPM Suite 11gR1 Released by Manoj Das Oracle BPM Suite 11gR1 became available for download from OTN and eDelivery. If you have been following our plans in this area, you know that this is the release unifying BEA ALBPM product, which became Oracle BPM10gR3, with the Oracle stack. Some of the highlights of this release are: BPMN 2.0 modeling and simulation Web based Process Composer for BPMN and Rules authoring Zero-code environment with full access to Oracle SOA Suite’s rich set of application and other adapters Process Spaces – Out-of-box integration with Web Center Suite Process Analytics – Native process cubes as well as integration with Oracle BAM You can learn more about this release from the documentation. Notes about downloading and installing Please note that Oracle BPM Suite 11gR1 is delivered and installed as part of SOA 11.1.1.3.0, which is a sparse release (only incremental patch). To install: Download and install SOA 11.1.1.2.0, which is a full release (you can find the bits at the above location) Download and install SOA 11.1.1.3.0 During configure step (using the Fusion Middleware configuration wizard), use the Oracle Business Process Management template supplied with the SOA Suite11g (11.1.1.3.0) If you plan to use Process Spaces, also install Web Center 11.1.1.3.0, which also is delivered as a sparse release and needs to be installed on top of Web Center 11.1.1.2.0   SOA Suite 11gR1 Patch Set 2 (PS2) released by Demed L'Her We just released SOA Suite 11gR1 Patch Set 2 (PS2)! You can download it as usual from: OTN (main platforms only) eDelivery (all platforms) 11gR1 PS2 is delivered as a sparse installer, that is to say that it is meant to be applied on the latest full install (11gR1 PS1). That’s great for existing PS1 users who simply need to apply the patch and run the patch assistant – but an extra step for new users who will first need to download SOA Suite 11gR1 PS1 (in addition to the PS2 patch). What’s in that release? Bug fixes of course but also several significant new features. Here is a short selection of the most significant ones: Spring component (for native Java extensibility and integration) SOA Partitions (to organize and manage your composites) Direct Binding (for transactional invocations to and from Oracle Service Bus) HTTP binding (for those of you trying to do away with SOAP and looking for simple GET and POST) Resequencer (for ordering out-of-order messages) WS Atomic Transactions (WS-AT) support (for propagation of transactions across heterogeneous environments) Check out the complete list of new features in PS2 for more (including links to the documentation for the above)! But maybe even more importantly we are also releasing Oracle Service Bus 11gR1 and BPM Suite 11gR1 at the same time – all on the same base platform (WebLogic Server 10.3.3)! (NB: it might take a while for all pages and caches to be updated with the new content so if you don’t find what you need today, try again soon!)   Are you Systems Integrations and Independent Software Vendors ready to adopt and to deliver? Make sure that you become trained: Local training calendars Register for the SOA Partner Community & Webcast www.oracle.com/goto/emea/soa What is your feedback?  Who installed the software? please feel free to share your experience at http://twitter.com/soacommunity #soacommunity Technorati Tags: SOA partner community ACE Directoris SOA Suite PS2 BPM11g First feedback from our ACE Directors and key Partners:   Now, these are great times to start the journey into BPM! Hajo Normann Reuse of components across the Oracle 11G Fusion Middleware stack, BPM just is one of the components plugging into the stack and reuses all other components. Mr. Leon Smiers With BPM11g, Oracle offers a very competitive product which will have a big effect on the IT market. Guido Schmutz We have real BPMN 2.0, which get's executed. No more transformation from business models to executable models - just press the run button... Torsten Winterberg Oracle BPM Suite 11g brings Out-of-box integration with WebCenter Suite and Oracle ADF development framework. Andrejus Baranovskis With the release of BPM Suite 11g, Oracle has defined new standards for Business Process platforms. Geoffroy de Lamalle With User Messaging Service you can let Soa Suite 11g do all your Messaging Edwin Biemond

    Read the article

  • how to launch grub menu for ubuntu guests in virtualbox?

    - by Ubuntuser
    I have ubuntu 12.04 alpha installed in virtualbox. When the virtual machine is started, it boots directly to the login screen without showing the grub menu. How can I get the grub menu to show up on start? Please note: the graphics is broken after recent updates, so i cannot login and make the changes. it is stuck at the screen "Ubuntu is running on low graphics mode" and the mouse and other keys do not work. [URL=http://img862.imageshack.us/i/screenshotat20120127171.png/][IMG]http://img862.imageshack.us/img862/9783/screenshotat20120127171.th.png[/IMG][/URL]

    Read the article

  • How can I launch Matlab 2012 on Ubuntu 12.04?

    - by Mattia
    I have a problem with the MATLAB 2012 installation. After having installed it using alt+f2 and having used gksudo nautilus I have installed MATLAB in the correct folder which is: /usr/local/MATLAB/R2012a Then I inserted the license and the window told "activation complete" or something like that. This made me happy, but only for a while because as soon as I try to search for Matlab within the applications I cannot find it and neither if I try to run matlab into terminal it says: command not found Can someone help me!? Tanks in advance!

    Read the article

  • Expression Studio 4 Launch of Blend, SketchFlow, Encoder and More!

    Today Expression Studio 4 (which includes Expression Blend, SketchFlow, Expression Web, Expression Design, Expression Encoder) launched at the Internet Week conference in New York City! There are a ton of new features in these products, some of which we have shown off already in some episodes of Silverlight TV a http://silverlight.tv. You can visit www.microsoft.com/expression to find out more about Expression and you can download a trial. Owners of v3 Expression Studio or Expression Web can upgrade...Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here.

    Read the article

  • How do I create the "Gnome-Desktop-Item-Edit" program's launch icon with root privileges and more?

    - by GanZ
    I personally dont prefer running commands in terminal to achieve a task and prefer apps to execute the job. Creating launcher for apps is one such command where I prefer the gnome-desktop-item-edit application for creating launchers. If the gnome package is installed, just searching "create launcher" opens the app. But, it doesnt serve any purpose, because for starters the application cannot create launchers for various apps without root permission and the location where the apps have to be created. Usually the launcher apps with root permission can be created at /usr/share/applications and without root permission at /.local/share/applications. I dont prefer the latter location as it is vulnerable to deletion. Hence, in order to create the launchers through gnome with root, everytime I am forced to open this through terminal using the below command! $ sudo gnome-desktop-item-edit ~/.local/share/applications --create-new I dont want to open terminal everytime I want to create an application launcher on unity! I am able to lock the "Create Launcher" App in the Launcher, but not with root privileges So I want to be able to create the "Create Launcher" app shortcut on unity with default root privileges and for the app to create the launchers at usr/share/applications by default! Please help! P.S. I dont have enough rep points to add screenshots to help with the question!

    Read the article

  • 'ACT On' Middleware Consolidation and Innovation Program Launch Webcast Thursday June 5, 2014 - 10am BST / 11am CET / 12am EET

    - by Cinzia Mascanzoni
    We are launching a Demand Generation Program under the Oracle 'ACT On' brand to enable you to help your partners and customers benefit from one integrated Middleware stack to better address today's new IT Challenges. We will work with you to drive demand for your partners to deploy consolidated Middleware environments with one integrated red Stack from Database to Middleware solutions running on engineered systems like Oracle Database Appliance or Exalogic. The opportunity for VADs is to: Build on the strength of FMW which has a significant share of the total Oracle revenue in EMEA Sell more FMW licenses to existing customers Add Systems to deals to grow the value Join us on June 5th, 10am BST / 11am CET / 12am EETFor details on how to join, click here

    Read the article

  • Are you a SQLBits attendee? get a discount for PASS Europe SQL 2008 R2 Launch

    - by simonsabin
    PASS have given use a number of prizes for SQLBits. We have registrations for PASS Europe and PASS North America as well as DVD sets of the sessions from the North America summit last year to give away. Not only that, if you want to go to PASS Europe and you are a SQLBits user then you can get a promotion code that not only gives you the best price it also raises money for SQLBits. To get the promotion code login and then visit the community page http://www.sqlbits.com/about/Community.aspx  

    Read the article

  • Are you a SQLBits attendee? get a discount for PASS Europe SQL 2008 R2 Launch

    - by simonsabin
    PASS have given use a number of prizes for SQLBits. We have registrations for PASS Europe and PASS North America as well as DVD sets of the sessions from the North America summit last year to give away. Not only that, if you want to go to PASS Europe and you are a SQLBits user then you can get a promotion code that not only gives you the best price it also raises money for SQLBits. To get the promotion code login and then visit the community page http://www.sqlbits.com/about/Community.aspx  

    Read the article

  • Why I am not able to update the column based on a condition which is not the primary key

    - by Gaurav Sharma
    Why I am not able to update the column based on a condition which is not the primary key. I am trying to update the constituencies table where name matches a specific criterial as shown below but the below queries shows an error Error code 1064, SQL state 42000: 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 'table constituencies set city_id = '1' where constituencies.name = "East Delhi"' at line 1 update table constituencies set city_id = '1' where constituencies.name = "East Delhi"; update table constituencies set city_id = '1' where constituencies.name = "South Delhi"; update table constituencies set city_id = '1' where constituencies.name = "Delhi Sadar"; update table constituencies set city_id = '1' where constituencies.name = "Karol Bagh"; update table constituencies set city_id = '1' where constituencies.name = "New Delhi"; update table constituencies set city_id = '1' where constituencies.name = "Outer Delhi"; update table constituencies set city_id = '1' where constituencies.name = "North East Delhi"; update table constituencies set city_id = '1' where constituencies.name = "North West Delhi"; update table constituencies set city_id = '1' where constituencies.name = "West Delhi"; Is it necessary that the condition should be checked with a primary key only ? Please throw some light on the above.

    Read the article

  • How to add additional condition to the JOIN generated by include?

    - by KandadaBoggu
    I want to add additional criteria to the LEFT OUTER JOIN generated by the :include option in ActiveRecord finder. class Post has_many :comments end class Comment belongs_to :post has_many :comment_votes end class CommentVote belongs_to :comment end Now lets say I want to find last 10 posts with their associated comments and the up comment votes. Post.find.all(:limit => 10, :order => "created_at DESC", :include => [{:comments => :comment_votes]) I cant add the condition to check for up votes as it will ignore the posts without the up votes. So the condition has to go the ON clause of the JOIN generated for the comment_votes. I am wishing for a syntax such as: Post.find.all(:limit => 10, :order => "created_at DESC", :include => [{:comments => [:comment_votes, :on => "comment_votes.vote > 0"]) Have you faced such problems before? Did you managed to solve the problem using the current finder? I hope to hear some interesting ideas from the community. PS: I can write a join SQL to get the expected result and stitch the results together. I want to make sure there is no other alternative before going down that path.

    Read the article

  • Can thunderbird with -no-remote launch firefox without it?

    - by Simon
    We have two thunderbird profiles, and we launch thunderbird using -no-remote as follows: thunderbird -no-remote -P Profile1 and thunderbird -no-remote -P Profile2 unfortunately, this means that if either of us click on a link in an email, and firefox is already running, we get a warning message telling us that firefox is already running, rather than having it open the link. Is it possible for thunderbird to use firefox's remote, even though it has been launched with -no-remote? (if it makes a difference, this is on Xubuntu Karmic)

    Read the article

< Previous Page | 31 32 33 34 35 36 37 38 39 40 41 42  | Next Page >