Search Results

Search found 375 results on 15 pages for 'rohit jose'.

Page 10/15 | < Previous Page | 6 7 8 9 10 11 12 13 14 15  | Next Page >

  • How to position columns in select list based on a variable.

    - by Rohit
    I am creating a dynamic grid which is created by selecting the format defined in the below XML.My select list includes all columns in this XML,I want to position these columns columns on the basic of position attribute in XML. <gridFormat> <column property="CustomerID" dbName="CustName" HeaderText="Customer" IsVisible="0" Position="1" /> <column property="CustomerName" dbName="FacilityName" HeaderText="Facility" IsVisible="1" Position="3" /> <column property="FacilityInternalID" dbName="Pname" HeaderText="Patient" IsVisible="1" Position="2" /> </gridFormat> I cannot select them in the order specified by the position attribute. I can do it in C# by looping around the returned datatable and specifically position columns using datatable.columns.setordinal() method. Is there any better way in SQL or C# to accomplish this.

    Read the article

  • WPF binding to a boolean on a control

    - by Jose
    I'm wondering if someone has a simple succinct solution to binding to a dependency property that needs to be the converse of the property. Here's an example I have a textbox that is disabled based on a property in the datacontext e.g.: <TextBox IsEnabled={Binding CanEdit} Text={Binding MyText}/> The requirement changes and I want to make it ReadOnly instead of disabled, so without changing my ViewModel I could do this: In the UserControl resources: <UserControl.Resources> <m:NotConverter x:Key="NotConverter"/> </UserControl.Resources> And then change the TextBox to: <TextBox IsReadOnly={Binding CanEdit,Converter={StaticResource NotConverter}} Text={Binding MyText}/> Which I personally think is EXTREMELY verbose I would love to be able to just do this(notice the !): <TextBox IsReadOnly={Binding !CanEdit} Text={Binding MyText}/> But alas, that is not an option that I know of. I can think of two options. Create an attached property IsNotReadOnly to FrameworkElement(?) and bind to that property If I change my ViewModel then I could add a property CanEdit and another CannotEdit which I would be kind of embarrassed of because I believe it adds an irrelevant property to a class, which I don't think is a good practice. The main reason for the question is that in my project the above isn't just for one control, so trying to keep my project as DRY as possible and readable I am throwing this out to anyone feeling my pain and has come up with a solution :)

    Read the article

  • Sql Server performance

    - by Jose
    I know that I can't get a specific answer to my question, but I would like to know if I can find the tools to get to my answer. Ok we have a Sql Server 2008 database that for the last 4 days has had moments where for 5-20 minutes becomes unresponsive for specific queries. e.g. The following queries run in different query windows simultaneously have the following results SELECT * FROM Assignment --hangs indefinitely SELECT * FROM Invoice -- works fine Many of the tables have non-clustered indexes to help speed up SELECTs Here's what I know: 1) The same query will either hang indefinitely or run normally. 2) In Activity Monitor in the processes tab there are normally around 80-100 processes running I think that what's happening is 1) A user updates a table 2) This causes one or more indexes to get updated 3) Another user issues a select while the index is updating Is there a way I can figure out why at a specific moment in time SQL Server is being unresponsive for a specific query?

    Read the article

  • How can I get DocId when adding a document in Lucene index?

    - by Rohit
    I am indexing a row of data from database in Lucene.Net. A row is equivalent of Document. I want to update my database with the DocId, so that I can use the DocId in the results to be able to retrieve rows quickly. I currently first retrive the PK from the result docs which I think should be slower than retriving directly from the database using DocId. How can I find the DocId when adding a document to Lucene?

    Read the article

  • How to skip interstitial in a django view if a user hits the back button?

    - by Jose Boveda
    I have an application with an interstitial page to hold the user while an intensive operation runs in the background (takes anywhere from 30 secs to 1 minute). Once the operation is done, the user is redirected to the results page. Once on the result page, typical user behavior is to hit the 'back' button to perform the operation on a different input set. However, the back button takes them to the interstitial, not the original form. The desired behavior is to go back to the original form, skipping the interstitial entirely. I'd like this to be default behavior if the user goes to the interstitial page from anywhere but the original form. I thought I could create this by using the @never_cache function decorator in my view for the interstitial, and logic based on request.META['HTTP_REFERER'], however the page doesn't respect these. The browser's back button still trumps this behavior. Any ideas on how to solve this issue?

    Read the article

  • Find changed properties of a class

    - by Rohit
    I am using asp.net 3.5 I have a license class containing 10 properties and not marked as serializable. I have to log property changes to the database. License is an entity class,and it is not in my scope to modify it. So I cannot mark it as serializabel neither i can use IpropertyChanged Interface. Now i cannot store it in viewstate as it is not serializable. I wanted to store it so that i can compare it with new values and see which value has changed. How to proceed with this.

    Read the article

  • Dynamic order by without using dynamic sql ?

    - by Rohit
    I have the following stored procedure which can be sorted ascending and descending on TemplateName,CreatedOn and UploadedBy. The following SP when runs doesnot sort records.if i replace 2,3,4 by columnname, i got an error message "Conversion failed when converting the nvarchar value 'Test Template' to data type int.".Please suggest how to achieve sorting. CREATE PROCEDURE [dbo].[usp_SEL_GetRenderingTemplate] ( @facilityID INT, @sortOrder VARCHAR(5), @sortExpression VARCHAR(100), @errorCode INT OUTPUT ) AS BEGIN SET NOCOUNT ON ; BEGIN TRY SET @sortOrder = CASE @sortOrder WHEN 'Ascending' THEN 'ASC' WHEN 'Descending' THEN 'DESC' ELSE 'ASC' END SELECT TemplateID, TemplateName, CreatedOn, ( [user].LastName + ' ' + [user].FirstName ) AS UploadedBy FROM Templates INNER JOIN [user] ON [user].UserID = Templates.CreatedBy WHERE facilityid = @facilityID ORDER BY CASE WHEN @sortExpression = 'TemplateName' AND @sortOrder = 'ASC' THEN 2 WHEN @sortExpression = 'CreatedOn' AND @sortOrder = 'ASC' THEN 3 WHEN @sortExpression = 'UploadedBy' AND @sortOrder = 'ASC' THEN 4 END ASC, CASE WHEN @sortExpression = 'TemplateName' AND @sortOrder = 'DESC' THEN 2 WHEN @sortExpression = 'CreatedOn' AND @sortOrder = 'DESC' THEN 3 WHEN @sortExpression = 'UploadedBy' AND @sortOrder = 'DESC' THEN 4 END DESC SET @errorCode = 0 END TRY BEGIN CATCH SET @errorCode = -1 DECLARE @errorMsg AS VARCHAR(MAX) DECLARE @utcDate AS DATETIME SET @errorMsg = CAST(ERROR_MESSAGE() AS VARCHAR(MAX)) SET @utcDate = CAST(GETUTCDATE() AS DATETIME) EXEC usp_INS_LogException 'usp_SEL_GetFacilityWorkTypeList', @errorMsg, @utcDate END CATCH END

    Read the article

  • Finding patterns in Puzzle games.

    - by José Joel.
    I was wondering, which are the most commonly used algorithms applied to finding patterns in puzzle games conformed by grids of cells. I know that depends of many factors, like the kind of patterns You want to detect, or the rules of the game...but I wanted to know which are the most commonly used algorithms in that kind of problems... For example, games like columns, bejeweled, even tetris. I also want to know if detecting patterns by "brute force" ( like , scanning all the grid trying to find three adyacent cells of the same color ) is significantly worst that using particular algorithms in very small grids, like 4 X 4 for example ( and again, I know that depends of the kind of game and rules ...) Which structures are commonly used in this kind of games ?

    Read the article

  • Anchors within the document and their position.

    - by Jose Vega
    On the following website, www.josecvega.com, I have a navigation bar with years that link to sections on that same page. Unfortunately it is not working they way I hoped, when the user selects a year it moves to the section of the page, but puts that section on the top of the page. I have a fixed div on the top of the page that covers the sections and prevents it from properly displaying. What can I do for this to work? It hard to explain my situation, but it can be seen by going to www.josecvega.com and clicking one of the years.

    Read the article

  • Total Average Week using a Parameter

    - by Jose
    I have a crystal report that shows sales volumes called week to date volume. It shows current week, previous week, and average week. The report prompts for a date parameter and I extract the week number to get current week and previous week volumes. Did it this way because Mngmt wants to be able to run report whenever. My problem is for Average Week I cant figure out how to get the number of weeks to divide by for my average. Report originates from June 1st, 2010. Right now I have: DATEPART("ww", {?date}) - DATEPART("ww", DATE(2010, 6, 1)) This returns 2 right now which is perfect, so i divide my total by 2. This code will work until the end of the year then I'm hooped. Any idea how I can make this a little more dynamic. I was thinking a counter somehow, just can't get the logic down because the date parameter will keep changing, meaning I cant increase my counter by 1 after each week??? Cheers.

    Read the article

  • Silverlight Timer problem

    - by jose
    Hello, I am developing a Silverlight application with custom animations. I want to update the variable animationCounter every 1 milissecond, so that in one second the value is 1000. I've tried DispatcherTimer and System.Threading.Timer. this way: DispatcherTimer timer = new DispatcherTimer(); (...) timer.Interval = new TimeSpan(0, 0, 0, 0, 1); timer.Tick += new EventHandler(timer_Tick); (...) (...) void timer_Tick(object sender, EventArgs e) { animationCounter++; Dispatcher.BeginInvoke(() => txtAnimationCounter.Text = animationCounter.ToString()); } with System.Threading.Timer System.Threading timer = null; timer = new System.Threading.Timer(UpdateAnimationCounter, 0, 1); void UpdateAnimationCounter(object state) { animationCounter++; Dispatcher.BeginInvoke(() => txtAnimationCounter.Text = animationCounter.ToString()); } Both of them are setting AnimationCounter around 100 in one second. Should be 1000. I don't know why. Is there anything I'm missing. Thanks

    Read the article

  • set up way of getting mysite.$domain

    - by jose silva
    Hi I have several domains, only one website and one databse table for each domain. example: wbesite.us - data from USA goes to database table main_usa wbesite.co.uk - data form UK goes to database table main_uk Only have one database with name of the website. Having only one website structured, and having variables like $sql="select * from main_".$countrycode." where bla..bla..., and many other variables to catch the domain extension, and so on... Now, instead of having one full website for each domain, how can set a script and wher do I put it in order to detect the domain that the user uses. In my server root do I create something like website.$domain ? Something like website OLX but for different purposes. I hope I made myself clear. Thank you.

    Read the article

  • Simple wrapping of C code with cython

    - by Jose
    Hi, I have a number of C functions, and I would like to call them from python. cython seems to be the way to go, but I can't really find an example of how exactly this is done. My C function looks like this: void calculate_daily ( char *db_name, int grid_id, int year, double *dtmp, double *dtmn, double *dtmx, double *dprec, double *ddtr, double *dayl, double *dpet, double *dpar ) ; All I want to do is to specify the first three parameters (a string and two integers), and recover 8 numpy arrays (or python lists. All the double arrays have N elements). My code assumes that the pointers are pointing to an already allocated chunk of memory. Also, the produced C code ought to link to some external libraries.

    Read the article

  • Get variable name as string in Perl

    - by Jose Cuervo
    Hi, I am trying to get a text representation of a variable's name. For instance, this would be the function I am looking for: $abc = '123'; $var_name = &get_var_name($abc); #returns '$abc' I want this because I am trying to write a debug function that recursively outputs the contents of a passed variable, I want it to output the variable's name before hand so if I call this debug function 100 times in succession there will be no confusion as to which variable I am looking at in the output. I have heard of Data::Dumper and am not a fan. If someone can tell me how to if it's possible get a string of a variable's name, that would be great. Thanks!

    Read the article

  • Freelance site - Escrow Concept

    - by jose
    How does escrow feature work in freelancing sites? Are they using any 3rd party escrow providers? OR Is it possible to develop the same feature using PHP? I know, it is possible. But I dont know how to develop. Please advise

    Read the article

  • Modifying an observable collection bound to a ListBox

    - by Rohit Kandhal
    I've a collection in viewmodel binded to listbox. I want to hide a particular type from the collection. Here is the code: public ObservableCollection [YZModeModelView] YZModeModelView { return this.XModelVIew.YZModelViewCollection; } I want to a particular type of model view's from YZModelViewCollection. eg. ModelView's with property abc set to null. Any suggestions ...

    Read the article

  • Running Subprocess from Python

    - by Rohit
    I want to run a cmd exe using a python script. I have the following code: def run_command(command): p = subprocess.Popen(command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) return p.communicate() then i use: run_command(r"C:\Users\user\Desktop\application\uploader.exe") this returns the option menu where i need to specify additional parameter for the cmd exe to run. So i pass additional parameters for the cmd exe to run. How do i accomplish this. I've looked at subprocess.communicate but i was unable to understand it

    Read the article

  • where to use update panel

    - by Rohit
    I have a custom treeview which i create programmatically as there is a need of specific layout which is not achievable using asp.net treeview.It is on a master page.When i click on treenodes the content area refreshes after a postback.There is a page category.aspx which is a content page of this master page.I have a user control in that content area named products.aspx.Now i want to use ajax to prevent the postback which happens when i click on treenode.I tried putting user control in updatepanel and treeview as well in updatepanel but to no awail. How to use updatepanel in this scenerio.

    Read the article

< Previous Page | 6 7 8 9 10 11 12 13 14 15  | Next Page >