Daily Archives

Articles indexed Thursday April 29 2010

Page 22/119 | < Previous Page | 18 19 20 21 22 23 24 25 26 27 28 29  | Next Page >

  • Getting the valid email address.

    - by user219315
    Hi In a MVC application i want to validate the email addresses. I want to get the valid emailID from the list.If I use the emailaddress from the address book of any mail account then the name of the user get appended with the emailID .eg:"Ayushi Soni" ,.. and then copy these address to a textbox in an MVC application. Now I want to retrieve the actual EmailID from the list ignoring the name that is appended.Is there any utitliy or jquery that we can use to filter this out and validate the filtered email. I donot want to use regex,substring method for this. Thanks. skothari

    Read the article

  • How can I remove the present view when I have added more than one subView ?

    - by srikanth rongali
    How can I remove the present view when I touched the close button. I did [self.view removeFromSuperView] when I added only one subView. It worked. But, I have now added another subView to the previous subView. I need to to get the parent view . How can I do it. My code of adding the subView is here. When I did the following only one view is removed. //FirstViewController: UIViewController -(void)libraryFunction:(id)sender { LibraryController *libraryController = [[LibraryController alloc]init]; [self.view addSubview:libraryController.view]; } //LibraryController: UIViewController -(void)viewDidLoad{ RootViewController *rootViewController = [[RootViewController alloc] initWithStyle:UITableViewStylePlain]; UINavigationController *aNavigationController = [[UINavigationController alloc] initWithRootViewController:rootViewController]; self.navController = aNavigationController; [aNavigationController release]; [rootViewController release]; [self.view addSubview:navController.view]; } //RootViewController: UITableViewController - (void)viewDidLoad { [super viewDidLoad]; self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"Close" style:UIBarButtonItemStyleBordered target:self action:@selector(close:)]; } -(void)close:(id)sender { [self.view removeFromSuperview]; } Thank You.

    Read the article

  • Arithmetic + and Bitwise OR

    - by Mohanavel
    Is there any difference between Arithmetic + and bitwise OR. For the below operation i used arithmetic operation, my friend told that this is wrong. In what way this is differing. uint a = 10; uint b = 20; uint arithmeticresult = a + b; uint bitwiseOR = a | b; Both the results are 30.

    Read the article

  • Changed name of form and project stopped working. Help

    - by Ani
    I have a big project and I changed the name of 1st form from "Form1" to "WebBrowser", now I It gives me following error. The type or namespace 'Form1' could not be found(are you missing a using directive or an assembly reference?) cannot even Change the name back to Form1. it says cannot find WebBrowser.cs on disk its is renamed or deleted from the disk. What I should do, I have a submission tomorrow. Thanks

    Read the article

  • How can this closure test be written in other languages?

    - by Jian Lin
    I wonder how the following closure test can be written in other languages, such as C and Java. Can the same result be expected also in Perl, Python, and PHP? Ideally, we don't need to make a new local variable such as x and assign it the value of i inside the loop, but just so that i has a new copy in the new scope each time. (if possible). (some discussion is in this question.) The following is in Ruby, the "1.8.6" on the first line of result is the Ruby version which can be ignored. p RUBY_VERSION $foo = [] (1..5).each do |i| $foo[i] = lambda { p i } end (1..5).each do |j| $foo[j].call() end the print out is: [MacBook01:~] $ ruby scope.rb "1.8.6" 1 2 3 4 5 [MacBook01:~] $ Contrast that with another test, with i defined outside: p RUBY_VERSION $foo = [] i = 0 (1..5).each do |i| $foo[i] = lambda { p i } end (1..5).each do |j| $foo[j].call() end the print out: [MacBook01:~] $ ruby scope2.rb "1.8.6" 5 5 5 5 5 [MacBook01:~] $

    Read the article

  • Backreferences in lookbehind

    - by polygenelubricants
    Can you use backreferences in a lookbehind? Let's say I want to split wherever behind me a character is repeated twice. String REGEX1 = "(?<=(.)\\1)"; // DOESN'T WORK! String REGEX2 = "(?<=(?=(.)\\1)..)"; // WORKS! System.out.println(java.util.Arrays.toString( "Bazooka killed the poor aardvark (yummy!)" .split(REGEX2) )); // prints "[Bazoo, ka kill, ed the poo, r aa, rdvark (yumm, y!)]" Using REGEX2 (where the backreference is in a lookahead nested inside a lookbehind) works, but REGEX1 gives this error at run-time: Look-behind group does not have an obvious maximum length near index 8 (?<=(.)\1) ^ This sort of make sense, I suppose, because in general the backreference can capture a string of any length (if the regex compiler is a bit smarter, though, it could determine that \1 is (.) in this case, and therefore has a finite length). So is there a way to use a backreference in a lookbehind? And if there isn't, can you always work around it using this nested lookahead? Are there other commonly-used techniques?

    Read the article

  • Webservice error

    - by Parth
    i am new to webservices, I have created a basic stockmarket webservice, I have successfully created the server script for it and placed it in my server, Now I also creted a clent script and accessed it hruogh the same server.. Is it valid ? can boh files be accesed from the same server? or do I have to place them in different servers? If yes Then Y? If No then why do i get the blank page? I am using nusoap library for webservice. When I use my cleint script from my local machine I get these errors "Deprecated: Assigning the return value of new by reference is deprecated in D:\wamp\www\pranav_test\nusoap\lib\nusoap.php on line 6506 Fatal error: Class 'soapclient' not found in D:\wamp\www\pranav_test\stockclient.php on line 3" stockserver.php at server <?php function getStockQuote($symbol) { mysql_connect('localhost','root','******'); mysql_select_db('pranav_demo'); $query = "SELECT stock_price FROM stockprices " . "WHERE stock_symbol = '$symbol'"; $result = mysql_query($query); $row = mysql_fetch_assoc($result); return $row['stock_price']; } require('nusoap/lib/nusoap.php'); $server = new soap_server(); $server->configureWSDL('stockserver', 'urn:stockquote'); $server->register("getStockQuote", array('symbol' => 'xsd:string'), array('return' => 'xsd:decimal'), 'urn:stockquote', 'urn:stockquote#getStockQuote'); $HTTP_RAW_POST_DATA = isset($HTTP_RAW_POST_DATA) ? $HTTP_RAW_POST_DATA : ''; $server->service($HTTP_RAW_POST_DATA); ?> stockclient.php <?php require_once('nusoap/lib/nusoap.php'); $c = new soapclient('http://192.168.1.20/pranav_test/stockserver.php'); $stockprice = $c->call('getStockQuote', array('symbol' => 'ABC')); echo "The stock price for 'ABC' is $stockprice."; ?> please help...

    Read the article

  • How to detect column conflicts with Hibernate?

    - by Slim
    So let's say I have an ArrayList full of Products that need to be committed to the database via Hibernate. There are already a large number of Products in the database. Each product has an ID. Note this is NOT the PK that is autogenerated by Hibernate. My questions is: what is the best way to detect conflicts with this ID? I am looking for a relatively efficient method of obtaining, from the the database, a List of Products that share an ID with any of the Products in my ArrayList. This is all in a single table called Products and the ID attribute is in column ProductID. The way I've done it is grabbing a list of all Products in the database, and compared each one with each entry in my ArrayList - but that is seriously inefficient and I don't think it would work well with a larger database. How should it be done? Thanks. I say "relatively" efficient because efficiency is not the primary concern, but it shouldn't take noticeably long to test against a table of ~1000-5000 rows. Help? EDIT* I'm very new to hibernate and below is the best I've come up with. How does this look? for(long id : idList){ //idList just holds the IDs of each Product in my ArrayList Query query = session.createQuery("select product from Product product where product.id = :id"); query.setLong("id", id); for(int i = 0; i < query.list().size(); i++){ listOfConflictingProducts.add((Product) query.list().get(i)); } }

    Read the article

  • android supported devices

    - by Aswan
    Hi all, i developed one application that should run on all the android supported devices.can you please suggest me different screen resolution of android os devices Thanks in advance Aswan

    Read the article

  • ASP.NET The underlying connection was closed: Could not establish trust relat

    - by David Lively
    When attempting to use HttpWebRequest to retrieve a page from my dev server, I get a web exception: The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel." The remote certificate is invalid according to the validation procedure... The url I'm attempting to read from is a plain-old http://myserver.com/mypage.asp - no SSL. The production server has a valid certificate so this shouldn't be an issue, but our dev server doesn't. Help!

    Read the article

  • c language:make fgets to keep taking input until I press enter twice?

    - by wello horld
    hi I would like to ask how I would modify this code for the question: (It only accepts one input then prints it out. I want it to keep going until I hit enter (\n) twice. #include <stdio.h> #define MAXLENGTH 1000 int main(void) { char string[MAXLENGTH]; fgets(string, MAXLENGTH, stdin ); printf("%s\n", string); return 0; } I'm confused at the fgets(string, MAXLENGTH, stdin ); line, what does stdin mean/do?

    Read the article

  • hibernate3-maven-plugin dependencies for newer version of hibernate

    - by Samuel
    I would like to use hibernate-3.5-1.Final along with this plugin, what should be my dependencies here. It seems to be picking up a older set of jars and failing right now. <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>hibernate3-maven-plugin</artifactId> <version>2.2</version> </plugin> EDIT1: [INFO] class org.hibernate.cfg.ExtendedMappings has interface org.hibernate .cfg.Mappings as super class [INFO] -------------------------------------------------------------------- ---- [INFO] Trace java.lang.IncompatibleClassChangeError: class org.hibernate.cfg.ExtendedMap pings has interface org.hibernate.cfg.Mappings as super class at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:621) at java.security.SecureClassLoader.defineClass(SecureClassLoader.ja va:124) at java.net.URLClassLoader.defineClass(URLClassLoader.java:260) at java.net.URLClassLoader.access$000(URLClassLoader.java:56) at java.net.URLClassLoader$1.run(URLClassLoader.java:195) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) at java.lang.ClassLoader.loadClass(ClassLoader.java:307) at org.codehaus.classworlds.RealmClassLoader.loadClassDirect(RealmC lassLoader.java:195) at org.codehaus.classworlds.DefaultClassRealm.loadClass(DefaultClas sRealm.java:255) at org.codehaus.classworlds.RealmClassLoader.loadClass(RealmClassLo ader.java:214) at java.lang.ClassLoader.loadClass(ClassLoader.java:252) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320) at org.hibernate.cfg.AnnotationConfiguration.createExtendedMappings (AnnotationConfiguration.java:187) at org.hibernate.cfg.AnnotationConfiguration.secondPassCompile(Anno tationConfiguration.java:277) at org.hibernate.cfg.Configuration.buildMappings(Configuration.java :1206) at org.hibernate.ejb.Ejb3Configuration.buildMappings(Ejb3Configurat ion.java:1226) at org.hibernate.ejb.EventListenerConfigurator.configure(EventListe nerConfigurator.java:173) at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration. java:854) at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration. java:191) at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration. java:253)

    Read the article

  • Resolution Free Application

    - by Asim Sajjad
    What is meant by the Resolution free application, As I have discussed it with many of my friend and they says that resolution free mean what ever resolution user want to see an application it should adjust it position, the resolultion is monitor resolution or any say 100 by 100 what is resolution?

    Read the article

  • jquery multiple dialoge boxes

    - by tismon
    Hi i am trying to put multiple dialog boxes in a single page. i had downloaded demo for a single dialog box and apply same effect to different "div"s.. but it came on the same position. how can i put diff. dialog boxes in diff positions ? i has set styles for 2nd and 3rd "div"s; but its not working.. somebody please help me.. regards tismon

    Read the article

  • Minimizing SpringLdap dependencies.

    - by mP
    I would like to use SpringLDAP to do some simple username/password verification for authentication purposes. WHile the actual jar file is quite small (less than 1 meg) it seems to have a lot of dependencies as listed by link text. By alot i mean it seems to suck in over 50 things many which dont seem right such as spring-jdbc as I dont want any jdbc and only the ldap template class and its bare dependencies. Without wasting too much time is it possible to the spring-ldap with only a bare minimum number of dependencies which amount to something like: spring core spring ldap whatever logging deps they require. spring tx I dont see or appreciate why the rest of thes tuff is reuqired and was wondering can anyone verify they arent really needed in the end if one sticks to the basics. The other stuff i am referring too include: spring-orm // no jdbc beans // i dont want ioc. spring-aop // no need for aop. I intend to wire up the beans i will be using manually. I dont want more crap in there for what ammounts to setting a few properties, and want confirmation that I dont need what is probably there just to do the ioc stuff when all i want is the ldap stuff.

    Read the article

  • iphone application

    - by jaynaiphone
    I am working on the module in which I have to decompress the data. The data comes from server which is zipped using gzip format. I am using NSData+Gzip.m file in which there is a function named "gzipInflate" to unzip the data. but it gives me the error "Z_OK -3". Now what is the solution of that error. How can I solve it. Please reply me :)

    Read the article

  • Hadopi : Frédéric Mitterrand questionné sur SeedFuck, et sur la présomption de culpabilité

    Mise à jour du 29.04.2010 par Katleen Hadopi : Frédéric Mitterrand questionné sur SeedFuck, et sur la présomption de culpabilité L'outil Seedfuck fait son petit bonhomme de chemin. Après l'arrivée de diverses mutations, il a réussi à se hisser dans les plus hautes sphères de la politique, puisque Frédéric Mitterrand a été pris officiellement à parti à ce propos lors d'une séance de l'Assemblée Nationale. C'est le député UMP Michel Zumkeller (ayant voté contre Hadopi) qui a interrogé le ministre dans une question écrite à propos de ce «petit programme [qui] inonde les réseaux de téléchargements, en peer to peer, de fausses adresses IP ». Comme quoi, Seedfuck a réussi a créer la ...

    Read the article

  • Benefits of Using Both SEO Techniques and Google AdWords

    As the name suggests, Search Engine Optimization is the process by which your web page is optimized to appear in the first few results of Google's search page also known as SERP (Search Engine Results Page). This is not as simple as it sounds unfortunately. To get your page onto the first page you must actively promote your site using legitimate and natural means by which the site gets more visitors, reciprocal links, backlinks and ultimately high quality traffic.

    Read the article

  • MS SQL Return 1 Row Per Boat

    - by Tyler
    Basically, what I want to do is join 4 tables together and return 1 row for each boat. Table Layouts [Boats] id, date, section, raft [Photos] id, boatid, pthurl, purl [River_Company] id, sort, company, company_short [River_Section] id, section Its very simple as far as structure, however, I've having the time of my life trying to get it to return only 1 row. No boat will ever be on the same day, the only thing that's messing this up is the photo table. If you know a better way for it to return the record table for all the boats boats and only 1 photo from the photo table, please, please post it!!

    Read the article

< Previous Page | 18 19 20 21 22 23 24 25 26 27 28 29  | Next Page >