Search Results

Search found 84 results on 4 pages for 'ari roth'.

Page 2/4 | < Previous Page | 1 2 3 4  | Next Page >

  • Change ObjectChoiceField Color not working on Blackberry OS 5.0

    - by Ari R. Fikri
    I want to create a custom ObjectChoiceField, the expected behavior is if the data change then upon leavinge the focus the font color will change. I have succeded in BB OS upto 4.7 but when tested on simulator and on real device with BB OS 5.0 the color won't change. This is my class : public class MyObjectChoiceField extends ObjectChoiceField { int color; Object oldValue, newValue; boolean isChanged; public MyObjectChoiceField(){ super(); oldValue = new Object(); newValue = new Object(); } public MyObjectChoiceField(int color, String label, String[] choices, int intP, long styleP){ super(label, choices, intP, styleP); this.color = color; } public void onUnfocus(){ if (getSelectedIndex() != -1){ newValue = getChoice(getSelectedIndex()); if (oldValue != newValue){ isChanged = true; invalidate(); } } super.onUnfocus(); } public void onFocus(int directionInt){ if (getSelectedIndex() != -1) oldValue = getChoice(getSelectedIndex()); super.onFocus(directionInt); } public void paint(Graphics g){ if (isChanged){ g.setColor(this.color); } super.paint(g); } What should I do to make this also work on BB OS 5.0. FYI : The ObjectChoiceField in BB 5.0 is look like a button with a triangle point down in the right side, which is different with BB OS 4.7.

    Read the article

  • UIImage created from CGImageRef fails with UIImagePNGRepresentation

    - by Ari J.R.
    I'm using the following code to crop and create a new UIImage out of a bigger one. I've isolated the issue to be with the function CGImageCreateWithImageInRect() which seem to not set some CGImage property the way I want. :-) The problem is that a call to function UIImagePNGRepresentation() fails returning a nil. CGImageRef origRef = [stillView.image CGImage]; CGImageRef cgCrop = CGImageCreateWithImageInRect( origRef, theRect); UIImage *imgCrop = [UIImage imageWithCGImage:cgCrop]; ... NSData *data = UIImagePNGRepresentation ( imgCrop); -- libpng error: No IDATs written into file Any idea what might wrong or alternative for cropping a rect out of UIImage? Many thanks!

    Read the article

  • Hadooop map reduce

    - by Aina Ari
    Im very much new to map reduce and i completed hadoop wordcount example. In that example it produces unsorted file (with key value) of word counts. So is it possible to make it sorted according to the most number of word occurrences by combining another map reduce task to the earlier one. Thanks in Advance

    Read the article

  • A function's static and dynamic parent

    - by legends2k
    I'm reading Thinking in C++ (vol. 2): Whenever a function is called, information about that function is pushed onto the runtime stack in an activation record instance (ARI), also called a stack frame. A typical stack frame contains (1) the address of the calling function (so execution can return to it), (2) a pointer to the ARI of the function’s static parent (the scope that lexically contains the called function, so variables global to the function can be accessed), and (3) a pointer to the function that called it (its dynamic parent). The path that logically results from repetitively following the dynamic parent links is the dynamic chain, or call chain I'm unable to comprehend what the author means as function's static and dynamic parent. Also am not able to differentiate between item 1, 2 or 3. They all seem to be the same. Can someone please explain this passage to me?

    Read the article

  • LinqToSql - ChangeConflictException. when submiting child and parent

    - by ari
    This problem drives me crazy. Here's the code using (BizNetDB db = new BizNetDB()) { var dbServiceCall = db.ServiceCalls.SingleOrDefault(x => x.ServiceCallID == serviceCallDetail.ServiceCallID); var dbServiceCallDetail = dbServiceCall.ServiceCallDetaills.SingleOrDefault(x=> x.ServiceCallDetailID == serviceCallDetail.ServiceCallDetailID); if (dbServiceCallDetail == null) { dbServiceCallDetail = new Data.ServiceCallDetaill(); dbServiceCall.ServiceCallDetaills.Add(dbServiceCallDetail); } dbServiceCallDetail.EndSession = serviceCallDetail.EndSession; dbServiceCallDetail.ExitTime = serviceCallDetail.ExitTime; dbServiceCallDetail.Solution = serviceCallDetail.Solution; dbServiceCallDetail.StartSession = serviceCallDetail.StartSession; serviceCallDetail.SessionMinutes = (serviceCallDetail.EndSession - serviceCallDetail.StartSession).Minutes; serviceCallDetail.DriveMinutes = serviceCallDetail.ExitTime.HasValue ? (serviceCallDetail.StartSession - serviceCallDetail.ExitTime.Value).Minutes : 0; var totalMinutes = (from d in db.ServiceCallDetaills .Where(x => x.ServiceCallID == serviceCallDetail.ServiceCallID && x.ServiceCallDetailID != dbServiceCallDetail.ServiceCallDetailID) group d by d.ServiceCallID into g select new { SessionMinutes = g.Sum(x => x.SessionMinutes), DriveMinutes = g.Sum(x => x.DriveMinutes) }).First(); dbServiceCall.SessionMinutes = totalMinutes.SessionMinutes + serviceCallDetail.SessionMinutes; dbServiceCall.DriveMinutes = totalMinutes.DriveMinutes + serviceCallDetail.DriveMinutes; try { db.SubmitChanges(); } catch (ChangeConflictException ex) { db.ChangeConflicts.ResolveAll(RefreshMode.OverwriteCurrentValues); db.SubmitChanges(); } The second Submit did solve the problem.. but I want to solve it from the root! when I disabled this lines (The parent changes): dbServiceCall.SessionMinutes = totalMinutes.SessionMinutes + serviceCallDetail.SessionMinutes; dbServiceCall.DriveMinutes = totalMinutes.DriveMinutes + serviceCallDetail.DriveMinutes; everithing is Ok. please help...

    Read the article

  • How to figure out which jars are needed?

    - by Ari
    How can I systematically determine which jars I'll need, and thus should include in my pom.xml file (I'm using maven as my project management tool)? When learning spring, to keep things simple, added all the jars (even the ones I never used) to the classpath. Right now for the most part, I'm guessing which jars to include. For example, I know in my spring configuration file, I have: <tx:annotation-driven /> <context:annotation-config /> <aop:aspectj-autoproxy /> So, I guess I'll need: spring-context-x.x.x.jar, spring-tx-x.x.x.jar, spring-aop-x.x.x.jar Thanks.

    Read the article

  • How to store user preferences? Cookie becomes bigger..

    - by ari
    My application (Asp.Net MVC) has great interaction with the user interface (jQuery/js). For example, setting various searches charts, moving the gadgets on the screen and more .. I of course want to keep all data for each user. So that data will be available from any page in the Dumaine and the user will accepts his preferences. Now I keep all data in a cookie because it did not seem logical asynchronous access to the server each time the user changes something and thet happens a lot.When the user logout from the application I save the cookie to the database. The problem is the cookie becomes very large. The thought that this huge cookie is attached to each server request makes me feel that my attitude is wrong. Another problem cookies have size limit. It varies from your browser but I definitely have been close to the border - my cookie easily become 4kb Is there another solution?

    Read the article

  • How to use DAOs with hibernate/jpa?

    - by Ari
    Assuming the DAO structure and component interaction described below, how should DAOs be used with persistence layers like hibernate and toplink? What methods should/shouldn't they contain? Would it be bad practice to move the code from the DAO directly to the service? For example, let's say that for every model we have a DAO (that may or may not implement a base interface) that looks something like the following: public class BasicDao<T> { public List<T> list() { ... } public <T> retrieve() { ... } public void save() { ... } public void delete() { ... } } Component interaction pattern is -- service DAO model

    Read the article

  • DependencyProperty binding not happening on initial load

    - by Ari Roth
    I'm trying to do something simple -- make a DependencyProperty and then bind to it. However, the getter doesn't appear to fire when I start up the app. (I'm guessing the solution will make me smack my head and go "Doh!", but still. :) ) Any ideas? Code-behind code: public static readonly DependencyProperty PriorityProperty = DependencyProperty.Register("Priority", typeof (Priority), typeof (PriorityControl), null); public Priority Priority { get { return (Priority)GetValue(PriorityProperty); } set { SetValue(PriorityProperty, value); } } Control XAML: <ListBox Background="Transparent" BorderThickness="0" ItemsSource="{Binding Path=Priorities}" Name="PriorityList" SelectedItem="{Binding Path=Priority, Mode=TwoWay}"> <ListBox.ItemTemplate> <DataTemplate> <Grid Height="16" Width="16"> <Border BorderBrush="Black" BorderThickness="2" CornerRadius="3" Visibility="{Binding RelativeSource= {RelativeSource Mode=FindAncestor, AncestorType=ListBoxItem}, Path=IsSelected, Converter={StaticResource boolToVisibilityConverter}}" /> <Border CornerRadius="3" Height="12" Width="12"> <Border.Background> <SolidColorBrush Color="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=ListBoxItem}, Path=Content, Converter={StaticResource priorityToColorConverter}}" /> </Border.Background> </Border> </Grid> </DataTemplate> </ListBox.ItemTemplate> <ListBox.ItemsPanel> <ItemsPanelTemplate> <StackPanel Orientation="Horizontal"/> </ItemsPanelTemplate> </ListBox.ItemsPanel> </ListBox> Binding statement: <UI:PriorityControl Grid.Column="8" Priority="{Binding Path=Priority}" VerticalAlignment="Center"/> Some other notes: Binding is in a UserControl UserControl contains the PriorityControl PriorityControl contains the DependencyProperty I've checked that the data the UserControl is getting the appropriate data -- every other binding works. If I change the selection on the PriorityControl via the mouse, everything fires as appropriate. It's just that initial setting of the value that isn't working. Priority is an enum.

    Read the article

  • Is it possible to make web app proactive rather than reactive?

    - by Ari B.
    Web applications traditionally follow the request/response cycle, where a request is made by a user or another web app. However, I'm curious if it is possible to make a web app automatically initiate certain tasks upon it's deployment to a app server. For example, let's say we have a web app that retrieves and processes data. Is it possible to configure this app to automatically retrieve and process data when certain criteria are met, rather than needing a request from a user/another web app?

    Read the article

  • Ghost activity in android

    - by Ari
    My application works as follow: On start I have some AppStartActivity which does something, finishes itself and starts MainActivity if user is logged in or LoginActivity otherwise. LoginActivity finishes itself and starts MainActivity when user log in successfully. On MainActivity I have SomeActivity from which user can logout. Activity stack for this situation is MainActivity > SomeActivity. It is correct, back button works well. When user click LogOut button there is a problem. I need to show LoginActivity but I don't want to have MainActivity and SomeActivity on activity stack anymore. I could resolve this problem if I wouldn't finish AppStartActivity. I could go back then with flag FLAG_ACTIVITY_CLEAR_TOP and it would work well. But here is a problem with back button. I don't want user to come back to this activity with back button. I want it to exit app instead. UPDATED: Flags FLAG_ACTIVITY_NEW_TASK and FLAG_ACTIVITY_CLEAR_TASK would be best, but I need it working in API level 9.

    Read the article

  • Why is this codes output an Error?

    - by Ari Susanto
    I am a newbie on php writing. In the my first trying, I get a problem on input a html tag to php. This code output an error: <?php $a="Begin"; $b=12; echo $b . " " . $a . " " . "This is php file <br/>"; echo strlen($a); echo strpos($a,"in") . "<br/>"; echo addcslashes($a,"i")"; ?> this is the error message I get: Parse error: syntax error, unexpected '"', expecting ',' or ';' in /home/specials/public_html/bextool.com/1.php on line 7 Is there any body who can explain about it?

    Read the article

  • Oracle Data Mining a Star Schema: Telco Churn Case Study

    - by charlie.berger
    There is a complete and detailed Telco Churn case study "How to" Blog Series just posted by Ari Mozes, ODM Dev. Manager.  In it, Ari provides detailed guidance in how to leverage various strengths of Oracle Data Mining including the ability to: mine Star Schemas and join tables and views together to obtain a complete 360 degree view of a customer combine transactional data e.g. call record detail (CDR) data, etc. define complex data transformation, model build and model deploy analytical methodologies inside the Database  His blog is posted in a multi-part series.  Below are some opening excerpts for the first 3 blog entries.  This is an excellent resource for any novice to skilled data miner who wants to gain competitive advantage by mining their data inside the Oracle Database.  Many thanks Ari! Mining a Star Schema: Telco Churn Case Study (1 of 3) One of the strengths of Oracle Data Mining is the ability to mine star schemas with minimal effort.  Star schemas are commonly used in relational databases, and they often contain rich data with interesting patterns.  While dimension tables may contain interesting demographics, fact tables will often contain user behavior, such as phone usage or purchase patterns.  Both of these aspects - demographics and usage patterns - can provide insight into behavior.Churn is a critical problem in the telecommunications industry, and companies go to great lengths to reduce the churn of their customer base.  One case study1 describes a telecommunications scenario involving understanding, and identification of, churn, where the underlying data is present in a star schema.  That case study is a good example for demonstrating just how natural it is for Oracle Data Mining to analyze a star schema, so it will be used as the basis for this series of posts...... Mining a Star Schema: Telco Churn Case Study (2 of 3) This post will follow the transformation steps as described in the case study, but will use Oracle SQL as the means for preparing data.  Please see the previous post for background material, including links to the case study and to scripts that can be used to replicate the stages in these posts.1) Handling missing values for call data recordsThe CDR_T table records the number of phone minutes used by a customer per month and per call type (tariff).  For example, the table may contain one record corresponding to the number of peak (call type) minutes in January for a specific customer, and another record associated with international calls in March for the same customer.  This table is likely to be fairly dense (most type-month combinations for a given customer will be present) due to the coarse level of aggregation, but there may be some missing values.  Missing entries may occur for a number of reasons: the customer made no calls of a particular type in a particular month, the customer switched providers during the timeframe, or perhaps there is a data entry problem.  In the first situation, the correct interpretation of a missing entry would be to assume that the number of minutes for the type-month combination is zero.  In the other situations, it is not appropriate to assume zero, but rather derive some representative value to replace the missing entries.  The referenced case study takes the latter approach.  The data is segmented by customer and call type, and within a given customer-call type combination, an average number of minutes is computed and used as a replacement value.In SQL, we need to generate additional rows for the missing entries and populate those rows with appropriate values.  To generate the missing rows, Oracle's partition outer join feature is a perfect fit.  select cust_id, cdre.tariff, cdre.month, minsfrom cdr_t cdr partition by (cust_id) right outer join     (select distinct tariff, month from cdr_t) cdre     on (cdr.month = cdre.month and cdr.tariff = cdre.tariff);   ....... Mining a Star Schema: Telco Churn Case Study (3 of 3) Now that the "difficult" work is complete - preparing the data - we can move to building a predictive model to help identify and understand churn.The case study suggests that separate models be built for different customer segments (high, medium, low, and very low value customer groups).  To reduce the data to a single segment, a filter can be applied: create or replace view churn_data_high asselect * from churn_prep where value_band = 'HIGH'; It is simple to take a quick look at the predictive aspects of the data on a univariate basis.  While this does not capture the more complex multi-variate effects as would occur with the full-blown data mining algorithms, it can give a quick feel as to the predictive aspects of the data as well as validate the data preparation steps.  Oracle Data Mining includes a predictive analytics package which enables quick analysis. begin  dbms_predictive_analytics.explain(   'churn_data_high','churn_m6','expl_churn_tab'); end; /select * from expl_churn_tab where rank <= 5 order by rank; ATTRIBUTE_NAME       ATTRIBUTE_SUBNAME EXPLANATORY_VALUE RANK-------------------- ----------------- ----------------- ----------LOS_BAND                                      .069167052          1MINS_PER_TARIFF_MON  PEAK-5                   .034881648          2REV_PER_MON          REV-5                    .034527798          3DROPPED_CALLS                                 .028110322          4MINS_PER_TARIFF_MON  PEAK-4                   .024698149          5From the above results, it is clear that some predictors do contain information to help identify churn (explanatory value > 0).  The strongest uni-variate predictor of churn appears to be the customer's (binned) length of service.  The second strongest churn indicator appears to be the number of peak minutes used in the most recent month.  The subname column contains the interior piece of the DM_NESTED_NUMERICALS column described in the previous post.  By using the object relational approach, many related predictors are included within a single top-level column. .....   NOTE:  These are just EXCERPTS.  Click here to start reading the Oracle Data Mining a Star Schema: Telco Churn Case Study from the beginning.    

    Read the article

  • WinForms ReportViewer: slow initial rendering

    - by Bryan Roth
    UPDATE 2.4.2010 Yeah, this is an old question but I thought I would give an update. So, I'm working with the ReportViewer again and it's still rendering slowly on the initial load. The only difference is that the SQL database is on the reporting server. UPDATE 3.16.2009 I have done profiling and it's not the SQL that is making the ReportViewer render slowly on the first call. On the first call, the ReportViewer control locks up the UI thread and makes the program unresponsive. After about 5 seconds the ReportViewer will unlock the UI thread and display "Report is being generated" and then finally show the report. I know 5 seconds is not much but this shouldn't be happening. My coworker does the same thing in a program of his and the ReportViewer immediately displays the "Report is being generated" upon any request. The only difference is that the reporting server is on one server and the data is on another server. However, when I am developing the reports within SSRS, there is no delay. UPDATE I have noticed that only the first load of the ReportViewer takes a long time; each subsequent load of the same or different reports loads fast. I have a WinForms ReportViewer that I'm using in Remote processing mode that can take up to 30 seconds to render when the ReportViewer.RefreshReport() method is called. However, the report itself runs fast. This is the code to setup my ReportViewer: rvReport.ProcessingMode = ProcessingMode.Remote rvReport.ShowParameterPrompts = False rvReport.ServerReport.ReportServerUrl = New Uri(_reportServerURL) rvReport.ServerReport.ReportPath = _reportPath This is where the ReportViewer can take up to 30 seconds to render: rvReport.RefreshReport()

    Read the article

  • ASP.NET MVC - Refresh PartialView when DropDownList changed

    - by Bryan Roth
    I have a search form that is an Ajax form. Within the form is a DropDownList that, when changed, should refresh a PartialView within the Ajax form (via a GET request). However, I'm not sure what to do in order to refresh the PartialView after I get back my results via the GET request. Search.aspx <%@ Page Title="" Language="VB" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage" %> <asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server"> Search </asp:Content> <asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server"> <script type="text/javascript"> $(document).ready(function () { $("#Sections").change(function () { var section = $("#Sections").val(); var township = $("#Townships").val(); var range = $("#Ranges").val(); $.ajax({ type: "GET", url: "Search/Search?section=" + section + "&township=" + township + "&range=" + range, contentType: "application/json; charset=utf-8", dataType: "html", success: function (result) { // What should I do here to refresh PartialView? } }); }); }); </script> <h2>Search</h2> <%--The line below is a workaround for a VB / ASPX designer bug--%> <%=""%> <% Using Ajax.BeginForm("Search", New AjaxOptions With {.UpdateTargetId = "searchResults", .LoadingElementId = "loader"})%> Township <%= Html.DropDownList("Townships")%> Range <%= Html.DropDownList("Ranges")%> Section <%= Html.DropDownList("Sections")%> <% Html.RenderPartial("Corners")%> <input type="submit" value="Search" /> <span id="loader">Searching...</span> <% End Using%> <div id="searchResults"></div> </asp:Content>

    Read the article

  • Passenger: RailsBaseURI case sensitive?

    - by Bryan Roth
    I used Passenger to deploy a RoR app to a sub URI on my domain. The problem I'm facing is that the sub URI seems to be case sensitive. Navigating to http://mydomain.com/RailsApp resolves fine. However, if I go to http://mydomain.com/railsapp, http://mydomain.com/railsApp, or any other variation, I get a 404 error. How can these requests using different casings get resolved correctly? Here is my Apache configuration file: <VirtualHost *:80> ServerName mydomain.com ServerAlias www.mydomain.com DocumentRoot /www/mydomain/public <Directory "/www/mydomain/public"> RailsEnv "production" Order allow,deny Allow from all </Directory> RailsBaseURI /RailsApp <Directory "/www/RailsApp/public"> RailsEnv "development" Options -MultiViews </Directory> </VirtualHost> Any help is much appreciated. Thanks!

    Read the article

  • Rails: unable to set any attribute of child model

    - by Bryan Roth
    I'm having a problem instantiating a ListItem object with specified attributes. For some reason all attributes are set to nil even if I specify values. However, if I specify attributes for a List, they retain their values. Attributes for a List retain their values: >> list = List.new(:id => 20, :name => "Test List") => #<List id: 20, name: "Test List"> Attributes for a ListItem don't retain their values: >> list_item = ListItem.new(:id => 17, :list_id => 20, :name => "Test Item") => #<ListItem id: nil, list_id: nil, name: nil> UPDATE #1: I thought the id was the only attribute not retaining its value but realized that setting any attribute for a ListItem gets set to nil. list.rb: class List < ActiveRecord::Base has_many :list_items, :dependent => :destroy accepts_nested_attributes_for :list_items, :reject_if => lambda { |a| a[:name].blank? }, :allow_destroy => true end list_item.rb: class ListItem < ActiveRecord::Base belongs_to :list validates_presence_of :name end schema.rb ActiveRecord::Schema.define(:version => 20100506144717) do create_table "list_items", :force => true do |t| t.integer "list_id" t.string "name" t.datetime "created_at" t.datetime "updated_at" end create_table "lists", :force => true do |t| t.string "name" t.datetime "created_at" t.datetime "updated_at" end end

    Read the article

  • ASP.NET MVC - PartialView html not changing via jQuery html() call

    - by Bryan Roth
    When I change the selection in a DropDownList, a PartialView gets updated via a GET request. When updating the PartialView via the jQuery html() function, the html returned is correct but when it displayed in the browser it is not correct. For example, certain checkboxes within the PartialView should become enabled but they remain disabled even though the html returned says they should be. When I do a view source in the browser the html never gets updated. I'm a little perplexed. Thoughts? Search.aspx <%@ Page Title="" Language="VB" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage" %> <asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server"> Search </asp:Content> <asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server"> <script type="text/javascript"> $(document).ready(function () { $("#Sections").change(function () { var section = $("#Sections").val(); var township = $("#Townships").val(); var range = $("#Ranges").val(); $.get("Search/Search?section=" + section + "&township=" + township + "&range=" + range, function (response) { $("#cornerDiv").html(response) }); }); }); </script> <h2>Search</h2> <%--The line below is a workaround for a VB / ASPX designer bug--%> <%=""%> <% Using Ajax.BeginForm("Search", New AjaxOptions With {.UpdateTargetId = "searchResults", .LoadingElementId = "loader"})%> Township <%= Html.DropDownList("Townships")%> Range <%= Html.DropDownList("Ranges")%> Section <%= Html.DropDownList("Sections")%> <div id="cornerDiv"> <% Html.RenderPartial("Corners")%> </div> <input type="submit" value="Search" /> <span id="loader">Searching...</span> <% End Using%> <div id="searchResults"></div> </asp:Content>

    Read the article

  • Adjust SQL query to DB2

    - by Guy Roth
    Part of a complex query that our app is running contains the lines: ...(inner query) SELECT ... NULL as column_A, NULL as column_B, ... FROM ... This syntax of creating columns with null values is not allowed in DB2 altough it is totally OK in MSSQL and Oracle DBs. Technically I can change it to: '' as column_A, '' as column_B, But this doesn't have exactly the same meaning and can damage our calculation results. How can I create columns with null values in DB2 using other syntax??

    Read the article

  • Perl SDL Windows Installation

    - by Blaise Roth
    I'm using Windows and I need the SDL Library to start using SDL with Perl. I've been pointed to http://www.libsdl.org/ to download it. My first queston is, which library do I want from that page? There's 3 to choose from... Then I've been pointed to 4 other SDL extensions by this page: http://arstechnica.com/gaming/news/2006/02/games-perl.ars. From those I've found there's a normal Win32 version and also a devel one. Which do I want? Thanks.

    Read the article

  • Inserting a ContentControl after another ContentControl

    - by Markus Roth
    In our VSTO Word 2010 Addin, we are trying to insert a RichTextControl after a given other ContentControl. We have tried this: public ContentControl AddContentControl(WdContentControlType type, int position) { Paragraph paragraphBefore = null; if (position == 0) { if (WordDocument.Paragraphs.Count == 0) { WordDocument.Paragraphs.Add(); } paragraphBefore = WordDocument.Paragraphs.First; } else { paragraphBefore = Controls.ElementAt(position - 1).Range.Paragraphs.Last; } object start = paragraphBefore.Range.End; object end = paragraphBefore.Range.End + 1; paragraphBefore.Range.InsertParagraphAfter(); Range rangeToUse = WordDocument.Range(ref start, ref end); ContentControl newControl = _ContentControl = _WordDocument.ContentControls.Add(type, rangeToInsert); Controls.Insert(position, newControl); OnNewContentControl(newControl, position); return newControl.ContentControl; } which works fine, unless the control that is before the one we want to insert has an empty paragraph at the end. If that is the case, the new ContentControl is inserted within the last control. How can we avoid this?

    Read the article

  • jQuery + Jeditable - detect when select is changed

    - by Bryan Roth
    I'm using Jeditable for in-place editing. One the controls I am working with has the select type. When a user clicks on the field, the following select control is generated: <div id="status" class="editable_select"> <form> <select name="value"> <option value="Active">Active</option> <option value="Inactive">Inactive</option> </select> <button type="submit">Save</button> <button type="cancel">Cancel</button> </form> </div> What I am trying to figure out is how to use jQuery to detect when that select control is changed, especially since it doesn't have an ID attribute. This is what I have so far, but the event is not getting triggered: $(document).ready(function () { $('#status select').change(function () { alert("Change Event Triggered On:" + $(this).attr("value")); }); });

    Read the article

< Previous Page | 1 2 3 4  | Next Page >