Search Results

Search found 60 results on 3 pages for 'rasmi ranjan nayak'.

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

  • Using If Else in HTML page inside <%# %>tags

    - by Amit Ranjan
    I have to set image on the basis of fields value coming from db. I want it to achieve via. tags <%# %. For example i have collection binded with grid. It has a Field called Online which is boolean. So if the value of Online is true then the green.png will be set as path of asp:image control else grey.png will be the path of the asp: image control.

    Read the article

  • Gravatar : Is there a default image?

    - by Ritesh M Nayak
    I have implemented gravatar for a portal I am building and wanted to know if there is a default image URL for gravatar? Not all people who visit the site are logged in or have email addresses, in such a case, is there a default image that can be shown (accessible via gravatar url)

    Read the article

  • Can anyone tell me about a jQuery modal dialog box library that doesn't suck

    - by Ritesh M Nayak
    jQuery based modal dialog boxes are great as long as you do as much as the example tells you to. I need a jQuery based modal dialog box library that has to have the following characteristics: It should be fast, something like the add and link dialog on StackOverflow. Most libraries take an eternity to load the dialog with its fancy effects and stuff. I want to call it using a script. Show a hidden div or a span element inline. MOst of the libraries talk filling an anchor with rel, class and href=#hiddenDiv sort of things. I need to be able to what I want without adding unnecessary attributes to my anchor. Something like this function showDialog(values) { processToChangeDom(values); changeDivTobeDisplayed(); modalDialog.show(); } It should reflect changes I make to the DOM in the hidden Div. I used facebox and found out that it makes a copy of the hidden div and changes to the DOM doesn't reflect on the modal window. I need to be able call the close modal div using javascript and also attach beforeOpen and afterClose handlers to the action. Does anyone have any suggestions? I have already tried facebox, simplemodal and a whole range of libraries, most of them don't support one or the other of these functions I described above.

    Read the article

  • How do I get the java.concurrency.CyclicBarrier to work as expected

    - by Ritesh M Nayak
    I am writing code that will spawn two thread and then wait for them to sync up using the CyclicBarrier class. Problem is that the cyclic barrier isn't working as expected and the main thread doesnt wait for the individual threads to finish. Here's how my code looks: class mythread extends Thread{ CyclicBarrier barrier; public mythread(CyclicBarrier barrier) { this.barrier = barrier; } public void run(){ barrier.await(); } } class MainClass{ public void spawnAndWait(){ CyclicBarrier barrier = new CyclicBarrier(2); mythread thread1 = new mythread(barrier).start(); mythread thread2 = new mythread(barrier).start(); System.out.println("Should wait till both threads finish executing before printing this"); } } Any idea what I am doing wrong? Or is there a better way to write these barrier synchronization methods? Please help.

    Read the article

  • What is a good git server frontend for self hosted git repositories

    - by Ritesh M Nayak
    I am planning on deploying git for a project I am currently working on and was wondering if there are any free softwares that provide an easy to use web view of the git repository. I am primarily interested in using the front end to track changes, see diff information etc. There is a list of such front ends available here. Does anyone have any experience with any of these ? Which one would you suggest An open source clone of github would do just fine actually :D but I know thats too much to ask .

    Read the article

  • Hudson build on URL token

    - by Ritesh M Nayak
    I configured a hudson instance and have created jobs. While creating builds, I was able to see this option "Trigger the build by accessing this URL + SecretTOKEN" option. Now, I am unable to see that for any new jobs I create. Am I missing some setting or a configuration? The only change I made was running the servlet container from Root to a regular user.

    Read the article

  • What is the best practice for writing bookmarklets

    - by Ritesh M Nayak
    I am writing some bookmarklets for a project that I am currently working on and I was wondering what the best practice for writing a bookmarklet was. I did some looking around and this is what I came up with javascript:void((function() { var%20e=document.createElement('script'); e.setAttribute('type','text/javascript'); e.setAttribute('src','http://someserver.com/bookmarkletcode.js'); document.body.appendChild(e) })()) I felt this is nice because the code can always be changed (since its requested every time) and still it acts like a bookmarklet. Are there are any problems to this approach ? Browser incompatibility etc? What is the best practice for this?

    Read the article

  • Holding value in collection

    - by Amit Ranjan
    I have a application which is on timesheet. I have total of 54 columns out of which 10 columns are visible rest invisible. First 3 columns are Project, MileStone and Classes. Rest are Sun- Sat work hrs. Now I have a column named 'taskid' as SunTaskID,MonTaskID and so on till SatTaskID for holding each days taskid. Now on the selection of SunHrs (Sunday's Work Hrs), i retrieve that days taskid and on the basis of task id i retrieve attachments which is displayed under a listbox. Now the problem is that since a day can have multiple attachments and a user can attach multiple attachments at time. He can enter values from grid to. Grid cells are editable. I am using BindingList(of TaskClass) in VB.Net for binding grid. I have total 54 properties n my task class. So i want to what property do i need to hod each days attachment and in what way. Earlier I tried Dictionary. But i was not aware of its usage as a property so i gave. Then prepared a separate class for attachment but, it was difficult to synchronize the existing attachments with taskid...

    Read the article

  • Parsing CSV string and binding it to listbox

    - by Amit Ranjan
    I have splitted comma separated values in an string array, something like this str[0] ="210" str[1] ="abc.pdf" str[2] = "211" str[3] = "xyz.docx" and so on. Please note 0,2,4,6,8 [even positions] are having number and odd positions are having string. I am having a class Attachmodel Public Class AttachmentModel Private _attachmentID As Integer = 0 Private _attachmentPath As String = "" ''' <summary> ''' Get Set Attachment ID ''' </summary> ''' <value></value> ''' <returns></returns> ''' <remarks></remarks> Public Property AttachmentID() As Integer Get Return _attachmentID End Get Set(ByVal value As Integer) _attachmentID = value End Set End Property ''' <summary> ''' Get Set Attachment Path ''' </summary> ''' <value></value> ''' <returns></returns> ''' <remarks></remarks> Public Property AttachmentPath() As String Get Return _attachmentPath End Get Set(ByVal value As String) _attachmentPath = value End Set End Property End Class In the above i want to set the values and bind it to the grid, using List

    Read the article

  • Hudson trigget builds remotely gives a forbidden 403 error

    - by Ritesh M Nayak
    I have a shell script on the same machine that hudson is deployed on and upon executing it, it calls wget on a hudson build trigger URL. Since its the same machine, I access it as http://localhost:8080/hudson/job/jobname/build?token=sometoken Typically, this is supposed to trigger a build on the project. But I get a 403 forbidden when I do this. Anybody has any idea why? I have tried this using a browser and it triggers the build, but via the command line it doesn't seem to work. Any ideas?

    Read the article

  • Abstract class over Interfaces in ADO.Net Environment

    - by Amit Ranjan
    I am developing a web app but is not satisfied with is architecture that I am following. The architecture is plain old conventional 3 tier architecture. What i want is follow some design pattern or architecture that will be help me in decoupling my code. I have idea about MVC and MVP architectures for Web App but i need different from that. I want to use OOPS concepts using abstract classes and interfaces, polymorphism etc in my app but not MVC and MVP. I dont know why? I havent tried any ado.net application earlier via abstract class or interfaces, so i need your help. Thanks

    Read the article

  • Existing Maven Project on Amazon Beanstalk

    - by Abhishek Ranjan
    I am trying to migrate my existing Maven project to Amazon Beanstalk. Looking at amazon's documentation,i don't see any maven project deployment instructions. I tried to upload the war file generated but the application is not coming up on beanstalk. I would like to know if there is any existing documentation to deploy on beanstalk from maven. I have Spring Data JPA,Spring MVC application,do i need to do specific configuration or move configuration files from within the WAR file.

    Read the article

  • Hudson trigger builds remotely gives a forbidden 403 error

    - by Ritesh M Nayak
    I have a shell script on the same machine that hudson is deployed on and upon executing it, it calls wget on a hudson build trigger URL. Since its the same machine, I access it as http://localhost:8080/hudson/job/jobname/build?token=sometoken Typically, this is supposed to trigger a build on the project. But I get a 403 forbidden when I do this. Anybody has any idea why? I have tried this using a browser and it triggers the build, but via the command line it doesn't seem to work. Any ideas?

    Read the article

  • Redirecting the response from a filter throws an IllegalStateException

    - by Ritesh M Nayak
    I am writing a filter that will handle all authentication related tasks. My filter is a standard servlet filter as shown below @Override public void doFilter(ServletRequest req, ServletResponse res, FilterChain chain) throws IOException, ServletException { UserSession attribute = (UserSession)request.getSession().getAttribute("user_session_key"); if(attribute!=null && attribute.isValid()) { //proceed as usual, chain.doFilter(req, res); return; } else { //means the user is not authenticated, so we must redirect him/her to the login page ((HttpServletResponse)res).sendRedirect("loginpage"); return; } } But when I do this, I get an IllegalStateException thrown by Tomcat's ResponseFacade. How do I acheive this in a filter. I read in other SO threads that in TOmcat this is a problem as the response object is already commited. How do I get past this ?

    Read the article

  • I want to set the AutoCompleteMode property in ApplyCellStyleToEditingControl subroutine

    - by Ranjan Gupta
    Hi, I am creating a DataGridView Column. and it is working well. now I want to customise this column with AutoCompleteMode, and AutoCompleteSource properties to show the customised data. I made the properties for this columns, and these are also working well. but these properties are not working in the "ApplyCellStyleToEditingControl" subroutine. Please help me to use these column properties in the "ApplyCellStyleToEditingControl" subroutine. Public Class DataGridViewDataValueColumn Inherits DataGridViewColumn Dim m_AutoCompleteMode As AutoCompleteMode, _ m_AutoCompleteSource As AutoCompleteSource, _ m_AutoCompleteStringCollection As AutoCompleteStringCollection Public Sub New() MyBase.New(New DataValueCell()) End Sub Public Overrides Property CellTemplate() As DataGridViewCell Get Return MyBase.CellTemplate End Get Set(ByVal value As DataGridViewCell) ' Ensure that the cell used for the template is a DataValueCell. If (value IsNot Nothing) AndAlso _ Not value.GetType().IsAssignableFrom(GetType(DataValueCell)) _ Then Throw New InvalidCastException("Must be a DataValueCell") End If MyBase.CellTemplate = value End Set End Property Region "User Defined Properties" '&*--------------------------------------*&' <Description("Indicates the text completion behaviour of the combo box."), DefaultValue(AutoCompleteMode.None)> _ Public Property AutoCompleteMode() As AutoCompleteMode Get Return m_AutoCompleteMode End Get Set(ByVal value As AutoCompleteMode) m_AutoCompleteMode = value End Set End Property <Description("The source of complete strings used to automatic completion."), DefaultValue(AutoCompleteSource.None)> _ Public Property AutoCompleteSource() As AutoCompleteSource Get Return m_AutoCompleteSource End Get Set(ByVal value As AutoCompleteSource) m_AutoCompleteSource = value End Set End Property <Description("The autocomplete custom source.")> _ Public Property AutoCompleteCustomSource() As AutoCompleteStringCollection Get Return m_AutoCompleteStringCollection End Get Set(ByVal value As AutoCompleteStringCollection) m_AutoCompleteStringCollection = value End Set End Property End Region End Class '&*--------------------------------------*&' Class DataValueCell Inherits DataGridViewTextBoxCell Public Sub New() ' End Sub Public Overrides ReadOnly Property EditType As Type Get Return GetType(PCLDataGridViewTextBoxEditingControl) End Get End Property End Class '&*--------------------------------------*&' '&* Edit DataGridView Columns *&' '&*--------------------------------------*&' Class PCLDataGridViewTextBoxEditingControl Inherits DataGridViewTextBoxEditingControl Public Overrides Function EditingControlWantsInputKey(ByVal keyData As Keys, ByVal dataGridViewWantsInputKey As Boolean) As Boolean Select Case ((keyData And Keys.KeyCode)) Case Keys.Prior, Keys.Next, Keys.End, Keys.Home, Keys.Left, Keys.Up, Keys.Right, Keys.Down, Keys.Delete Return True End Select Return MyBase.EditingControlWantsInputKey(keyData, dataGridViewWantsInputKey) End Function Public Overrides Sub ApplyCellStyleToEditingControl(ByVal dataGridViewCellStyle As DataGridViewCellStyle) With DirectCast(Me, TextBox) '.AutoCompleteMode = DataGridViewDataValueColumn.AutoCompleteMode_Value '.AutoCompleteSource = DataGridViewDataValueColumn.AutoCompleteSource_Value '.AutoCompleteCustomSource = MyBase.AutoCompleteCustomSource End With End Sub End Class

    Read the article

  • Myself throwing NullReferenceException... needs help

    - by Amit Ranjan
    I know it might be a weird question and its Title too, but i need your help. I am a .net dev , working on platform for the last 1.5 years. I am bit confused on the term usually we say " A Good Programmer ". I dont know ,what are the qualities of a good programmer ? Is the guy who writes a bug free code? or Can develop applications solely? or blah blah blah...lots of points. I dont know... But as far i am concerned , I know I am not a good programmer, still in learning phase an needs a lot to learn in coming days. So you guys are requested to please help me with this two problems of mine My first problem is regarding the proper Error Handling, which is a most debatable aspect of programming. We all know we use ` try { } catch { } finally { } ` in our code to manage exception. But even if I use try { } catch(exception ex) { throw ex } finally { } , different guys have different views. I still dont know the good way to handle errors. I can write code, use try-catch but still i feel I lacks something. When I saw the codes generated by .net fx tools even they uses throw ex or `throw new Exception("this is my exception")`.. I am just wondering what will be the best way to achieve the above. All means the same thing but why we avoid something. If it has some demerits then it must be made obselete.Anyways I still dont have one [how to handle errors efficiently?]. I generally follow the try-catch(execoption ex){throw ex}, and usually got stucked in debates with leads why you follow this why not that... 2.Converting your entire code blocks in modules using Design patterns of some OOPs concepts. How do you guys decide what architeture or pattern will be the best for my upcoming application based on its working, flow etc. I need to know what you guys can see that I can't. Since I know , I dont have that much experience but I can say, with my experience that experience doesnot comes either from degree/certificates or success you made instead it cames from failures you faced or got stucking situations. Pleas help me out.

    Read the article

  • How does one implement a truly asynchronous java thread

    - by Ritesh M Nayak
    I have a function that needs to perfom two operations, one which finishes fast and one which takes a long time to run. I want to be able to delegate the long running operation to a thread and I dont care when the thread finishes, but the threads needs to complete. I implemented this as shown below , but, my secondoperation never gets done as the function exits after the start() call. How I can ensure that the function returns but the second operation thread finishes its execution as well and is not dependent on the parent thread ? public void someFunction(String data) { smallOperation() Blah a = new Blah(); Thread th = new Thread(a); th.Start(); } class SecondOperation implements Runnable { public void run(){ // doSomething long running } }

    Read the article

  • How does CouchDB perform for a regularly updated dataset?

    - by Ritesh M Nayak
    I am planning on using CouchDB on a project. But as the querying mechanism involves writing views (which are a lot like indexes on regular RDMBMS's) I was wondering, if the document database keeps getting updated a lot ( a write heavy database) would CouchDB perform well compared to a regular RDBMS? Or do we have to compact/re-index the system occasionally to make it perform faster?

    Read the article

< Previous Page | 1 2 3  | Next Page >