Daily Archives

Articles indexed Wednesday May 26 2010

Page 29/118 | < Previous Page | 25 26 27 28 29 30 31 32 33 34 35 36  | Next Page >

  • JAXB Locator - missing dependency?

    - by Wouter Lievens
    On my current project we generate JAXB beans from an XSD file. We need line number information on the beans (beyond XSD validation errors!) so I used the -Xlocator option specified here: http://java.sun.com/webservices/docs/1.6/jaxb/xjc.html However, I'm missing the Locator class. The jar file referenced to on that six-year old page can't be found anywhere, as I don't see a download for JWSDP on any site at all. Is XJC dead? Should I be using something else?

    Read the article

  • Switching from form_for to remote_form_for problems with submit changes in Rails

    - by Matthias Günther
    Hi there, another day with Rails and today I want to use Ajax. linkt_remote_link for changing a text was pretty easy so I thought it would also be easy to switch my form_for loop just to an ajax request form with remote_form_for, but the problem with the remote_form_for is that it doesn't save my changes? Here the code that worked: <% form_for bill, :url => {:action => 'update', :id => bill.id} do |f| %> # make the processing e.g. displaying texfields and so on <%= submit_tag 'speichern'%> It produces the following html code: <form action="/adminbill/update/58" class="edit_bill" id="edit_bill_58" method="post"><div style="margin:0;padding:0;display:inline"><input name="_method" type="hidden" value="put" /></div> <!-- here the html things for the forms --> <input class="button" name="commit" type="submit" value="speichern" /> Here the code which don't save me the changes and submit them: <% remote_form_for bill, :url => {:action => 'update', :id => bill.id} do |f| %> # make the processing e.g. displaying texfields and so on <%= submit_tag 'speichern'%> It produces the following html code: <form action="/adminbill/update/58" class="edit_bill" id="edit_bill_58" method="post" onsubmit="$.ajax({data:$.param($(this).serializeArray()), dataType:'script', type:'post', url:'/adminbill/update/58'}); return false;"><div style="margin:0;padding:0;display:inline"><input name="_method" type="hidden" value="put" /></div> <!-- here the html things for the forms --> <input class="button" name="commit" type="submit" value="speichern" /> I don't know if I have to consider something special when using remote_form_for (see remote_form_for)

    Read the article

  • Indexer in C sharp.

    - by Jacksquad
    Hello guys, i got a problem while overloading indexer property. public class ClassName { private int[] a; private int[] b; private string[] c; private string[] d; public int this[int pos] { get{ return a[pos];} set{a[pos] = value;} } public int this[int pos] { get{ return b[pos];} set{b[pos] = value;} } public int this[int pos] { get{ return c[pos];} set{c[pos] = value;} } public int this[int pos] { get{ return d[pos];} set{d[pos] = value;} } } /* I AM GETTING "Error 1 'Class1 variables' already defines a member called 'this' with the same parameter types" Please suggest me how to implement this?

    Read the article

  • Download attachment issue with IE6-8 - non ssl

    - by Arun P Johny
    I'm facing an issue with file download with IE6-8 in non ssl environment. I've seen a lot of articles about the IE attachment download issue with ssl. As per the articles I tried to set the values of Pragma, Cache-Control headers, but still no luck with it. These are my response headers Cache-Control: private, max-age=5 Date: Tue, 25 May 2010 11:06:02 GMT Pragma: private Content-Length: 40492 Content-Type: application/pdf Content-Disposition: Attachment;Filename="file name.pdf" Server: Apache-Coyote/1.1 I've set the header values after going through some of these sites KB 812935 KB 316431 But these items are related to SSL. I've checked the response body and headers using fiddler, the response body is proper. I'm using window.open(url, "_blank") to download the file, if I change it to window.open(url, "_parent") or change the "Content-Disposition" to 'inline;Filename="file name.pdf"' it works fine. Please help me to solve this problem

    Read the article

  • Web Deployment Projects for VS2010 on build server failing with Error MSB4086

    - by SteveBering
    When I upgraded my Web Deployment Project from VS2008 to the VS2010 beta version, I was able to execute the build locally on my development box. However, when I tried to execute the build on our TeamCity build server, I began getting the following exception: C:\Program Files\MSBuild\Microsoft\WebDeployment\v10.0\Microsoft.WebDeployment.targets(162, 37): error MSB4086: A numeric comparison was attempted on "$(_SourceWebProjectPath.Length)" that evaluates to "" instead of a number, in condition "'$(_SourceWebProjectPath)' != '' And $(_SourceWebProjectPath.Length) >= 4)". I did install the Web Deployment Project addin on my build server and I did copy over the C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\WebApplications directory on my development box to the C:\Program Files\MSBuild\Microsoft\VisualStudio\v10.0\ directory on the build server. Note: My dev box is 64bit and the build server 32bit. I can't figure out why this is behaving differently on the build server than on my dev machine. Anyone have any ideas? Thanks, Steve

    Read the article

  • Users Hierarchy Logic

    - by user342944
    Hi guys, I am writing a user security module using SQLServer 2008 so threfore need to design a database accordingly. Formally I had Userinfo table with UserID, Username and ParentID to build a recursion and populated tree to represent hierarchy but now I have following criteria which I need to develop. I have now USERS, ADMINISTRATORS and GROUPS. Each node in the user hierarchy is either a user, administrator or group. User Someone who has login access to my application Administrator A user who may also manage all their child user accounts (and their children etc) This may include creating new users and assigning permissions to those users. There is no limit to the number of administrators in user structure. The higher up in the hierarchy that I go administrators have more child accounts to manage which include other child administrators. Group A user account can be designated as a group. This will be an account which is used to group one or more users together so that they can be manage as a unit. But no one can login to my application using a group account. This is how I want to create structure Super Administrator administrator ------------------------------------------------------------- | | | Manager A Manager B Manager C (adminstrator) (administrator) (administrator) | ----------------------------------------- | | | Employee A Employee B Sales Employees (User) (User) (Group) | ------------------------ | | | Emp C Emp D Emp E (User) (User) (User) Now how to build the table structure to achieve this. Do I need to create Users table alongwith Group table or what? Please guide I would really appreciate.

    Read the article

  • Html.RadioButtonListFor problem

    - by ognjenb
    <%using (Html.BeginForm("Numbers", "Numbers", FormMethod.Post)) { %> <table id="numbers"> <tr> <th> prvi_br </th> <th> drugi_br </th> <th> treci_br </th> </tr> <%int rb =1; %>" <% foreach (var item in Model) { %> <tr> <td> <%= Html.Encode(item.prvi_br) %> <input type="radio" name="<%= Html.Encode(rb) %>" value="<%= Html.Encode(rb) %>" /> </td> <td> <%= Html.Encode(item.drugi_br) %> <input type="radio" name="<%= Html.Encode(rb) %>" value="<%= Html.Encode(rb) %>"/> </td> <td> <%= Html.Encode(item.treci_br) %> <input type="radio" name="<%= Html.Encode(rb) %>" value="<%= Html.Encode(rb) %>"/> </td> </tr> <% rb++; %> <% } %> </table> <p> <input type="submit" value="Save" /> </p> <%} %> How post this form with only one checked radio button? In my case all of 3 radio buttons is possible to check. How to restrict so that it is possible check only one radio. In this article I found good solutions but it can not be applied because I have a table.

    Read the article

  • Best graphical source code diff viewer/editor for code comparison and merging?

    - by Assaf Lavie
    The options for source code diff viewing/editing/merging seem to be: Free: Tortoise Merge Meld * WinDiff WinMerge * DiffMerge * KDiff AJC Diff Commercial: Total Commander's Diff viewer * Beyond Compare * Delta Walker * Araxis Merge * Are there any other options? (Wikipedia suggests a few) What's your favorite tools for source code diff? And how does it differ from the ones in the list? * Supports directory diffs

    Read the article

  • Setup voip with PennyTel on Nexus One [closed]

    - by Glen
    Hi, I am trying to get VOIP working with PennyTel on my Nexus One. I have created a penny tel voip account and put $10 in. I have tried two options: Sipdroid: I installed this app and followed this guide: http://seethisnowreadthis.com/2009/07/11/get-sipdroid-to-work-with-any-sip-provider-on-your-android-phone/ But I had no luck. i just get an error that it could not authenticate PennyTel test version app by seer I entered my pennytel details in and tried to make a call but it just hangs up immediately. Thanks, Glen.

    Read the article

  • Warning: passing Argument 1 of "sqlite3_bind_text" from incompatible pointer type" What should I do

    - by Amarpreet
    Hi All, i am pretty new in iphone development. I have created one function to insert data into database. The code compiles successfully. But when comes to statement sqlite3_bind_text(sqlStatement, 1, [s UTF8String], -1, SQLITE_TRANSIENT); it does not do anything but hangs AND in warning it says "passing Argument 1 of "sqlite3_bind_text" from incompatible pointer type"" for all statements in Red colour The same code i am using to fetch the data from database and its working on other viewController. Below in the code. Its pretty straightforward. Please help guys. -(void) SaveData: (NSString *)FirstName: (NSString *)LastName: (NSString *)State: (NSString *)Street: (NSString *)PostCode { databaseName = @"Zen.sqlite"; NSArray *documentPaths = NSSearchPathForDirectoriesInDomains(NSDocumentDire ctory, NSUserDomainMask,YES); NSString *documentsDir=[documentPaths objectAtIndex:0]; databasePath=[documentsDir stringByAppendingPathComponent:databaseName]; sqlite3 *database; if(sqlite3_open([databasePath UTF8String], &database) == SQLITE_OK) { const char *sqlStatement = "insert into customers (FirstName, LastName, State, Street, PostCode) values(?, ?, ?, ?, ?)"; sqlite3_stmt *compiledStatement; sqlite3_prepare_v2(database, sqlStatement, -1, &compiledStatement, NULL); sqlite3_bind_text(sqlStatement, 1, [FirstName UTF8String], -1, SQLITE_TRANSIENT); sqlite3_bind_text(sqlStatement,2,[LastName UTF8String],-1,SQLITE_TRANSIENT); sqlite3_bind_text(sqlStatement,3,[State UTF8String],-1,SQLITE_TRANSIENT); sqlite3_bind_text(sqlStatement,4,[Street UTF8String],-1,SQLITE_TRANSIENT); sqlite3_bind_text(sqlStatement,5,[PostCode UTF8String],-1,SQLITE_TRANSIENT); sqlite3_step(sqlStatement); sqlite3_finalize(compiledStatement); } sqlite3_close(database); }

    Read the article

  • Entity Aspect (in Spring)

    - by niklassaers
    Hi guys, I'm having a bit of a problem defining my aspects. I've got a bunch of entities that I'd like to profile the get-methods in, so I've written the following pointcut and method @Pointcut("execution(* tld.myproject.data.entities.*.get*()") public void getEntityProperty() {} @Around("getEntityProperty()") public Object profileGetEntityProperty(ProceedingJoinPoint pjp) throws Throwable { long start = System.currentTimeMillis(); String name = pjp.getSignature().getName(); Object output = pjp.proceed(); long elapsedTime = System.currentTimeMillis() - start; if(elapsedTime > 100) System.err.println("profileGetEntityProperty: Entity method " + name + " execution time: " + elapsedTime + " ms."); return output; } I've got weaving turned on in my configuration, and aspects weaving into the business layer work just fine. Is my pointcut correctly written? Or is there something about entities that make them non-weavable? (my entity is prefixed with @Entity before the class definition) Cheers Nik

    Read the article

  • Tree data structure in php

    - by Piyush
    in my application user starts a new tree or get added under a child-user and keep on adding users in branches in such a way- >there are 10 level of tree type structure. >root node contain 1 user and each node(user) can have max 5 child-user in this way tree will be like level 0 = 1 user , level 1 = 5 user, level 2 = 25 user , level 3 = 125 user and so on. I created one MySQL table having columns like- User_id , level, super_id, child1_id, child2_id, child3_id, child4_id, child5_id my question is How can I get all child-user(child to child also) of a particular user at any level do I need to add some more columns in my table??

    Read the article

  • How to nightly update a copy folder of main website?

    - by HollerTrain
    I have a main website, then I have a backup of the main site in another folder on the server to be used if main site goes down I can push traffic to my copy of the main site. With that said I want to nightly update the copy site with the updated files made to the main site from the prior day's updates to text files and new images. What is best method of doing this automatically every 24 hours? I assume a cron script could be created for this need? Any help would be greatly appreciated.

    Read the article

  • How do I make "simple" throughput servlet-filter?

    - by Tommy
    I'm looking to create a filter that can give me two things: number of request pr minute, and average responsetime pr minute. I already got the individual readings, I'm just not sure how to add them up. My filter captures every request, and it records the time each request takes: public void doFilter(ServletRequest request, ...() { long start = System.currentTimeMillis(); chain.doFilter(request, response); long stop = System.currentTimeMillis(); String time = Util.getTimeDifferenceInSec(start, stop); } This information will be used to create some pretty Google Chart charts. I don't want to store the data in any database. Just a way to get current numbers out when requested As this is a high volume application; low overhead is essential. I'm assuming my applicationserver doesn't provide this information.

    Read the article

  • How to set the HomeScreen image without using method HomeScreen.setBackgroundImage(url)?

    - by Richa
    Hello, Can anyone help me out as I am looking for a method that helps me to set the wallpaper using the images from the Pictures folder on Blackberry Curve 8310. I found one method HomeScreen.setBackground(url), but it doen't works on Blackberry Curve. I am using Operating system 4.5 and this method is useable with operating systems 4.7 & above So, i want to know is their any method for blackberry curve to set the wallpaper or is their any operating system that supports the above method? Kindly reply Thanks a lot Best Regards, Richa Bhatia

    Read the article

  • C# Recursion SumOfOnlyNeg Elements

    - by Chris
    Hello, A array gets filled up with random elements (negative and positive). Now i want to calculate the sum of ONLY the postive elements. Iterative there is no problem, but in the recursion version i can only get the sum of both negative and postive. How can i "check" in the recursive version that it only sums up the Postive elements? Best Regards. Iterative version: public int IterSomPosElem(int[] tabel, int n) { n = 0; for (int i = 0; i < tabel.Length; i++) { if (tabel[i] >= 0) { n += tabel[i]; } } return n; } Recursive version atm (sums up all the elements insteed, of only the positive) public int RecuSomPosElem(int[] tabel, int n) { if(n == 1) return tabel[0]; //stopCriterium else { return (tabel[n - 1] + RecuSomPosElem(tabel, n - 1)); // how to check, so it only sums up the postive elements and "ignores" the negative elements. } }

    Read the article

< Previous Page | 25 26 27 28 29 30 31 32 33 34 35 36  | Next Page >