Daily Archives

Articles indexed Monday April 9 2012

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

  • How do I verify the ownership of a domain from Namecheap to use Google Apps?

    - by Rook
    I registered a domain with Namecheap.com, and started the Google Apps registration process. After the initial data filling, google apps wishes me to prove the ownership of a domain, and has given me 4 choices: Add a DNS record to your domain's configuration Link to your Google Analytics account Upload an HTML file to your server Add a meta tag to your site's home page What is the differences between these, and how do I (if someone knows perhaps how to do it on Namecheap, it would be even better) complete this step in the process? I would appreciate any advice you might have.

    Read the article

  • How to achieve uniform speed of movement on a bezier curve in cocos 2d?

    - by Andrey Chernukha
    I'm an absolute beginner in cocos2 , actually i started dealing with it yesterday. What i'm trying to do is moving an image along Bezier curve. This is how i do it - (void)startFly { [self runAction:[CCSequence actions: [CCBezierBy actionWithDuration:timeFlying bezier:[self getPathWithDirection:currentDirection]], [CCCallFuncN actionWithTarget:self selector:@selector(endFly)], nil]]; } My issue is that the image moves not uniformly. In the beginning it's moving slowly and then it accelerates gradually and at the end it's moving really fast. What should i do to get rid of this acceleration?

    Read the article

  • libgdx - removing the circle outline rendered on Box2d CircleShape

    - by Brett
    How can I remove the outline on the circleshape below.. CircleShape circle = new CircleShape(); circle.setRadius(1f); ... using ... batch.draw(textureRegion, position.x - 1, position.y - 1, 1f, 1f, 2, 2, 1, 1, angle); I use this to set the body for a Box2d collision but I get a silly circle shape around my texture in libGdx, i.e. my textured sprite (ball) has a circle over the top of it with a line running from center along the radius. Any ideas on how to remove the overlying circle lines?

    Read the article

  • Is knowledge of hacking mechanisms required for an MMO?

    - by Gabe
    Say I was planning on, in the future (not now! There is alot I need to learn first) looking to participating in a group project that was going to make a massively multiplayer online game (mmo), and my job would be the networking portion. I'm not that familiar with network programming (I've read a very basic book on PHP, MYSQL and I messed around a bit with WAMP). In the course of my studying of PHP and MYSQL, should I look into hacking? Hacking as in port scanning, router hacking, etc. In MMOs people are always trying to cheat, bots and such, but the worst scenario would be having someone hack the databases. This is just my conception of this, I really don't know. I do however understand networking fairly well, like subnetting/ports/IP's (local/global)/etc. In your professional opinion, (If you understand the topic, enlighten me) Should I learn about these things in order to counter the possibility of this happening? Also, out of the things I mentioned (port scanning, router hacking) Is there anything else that pertains to hacking that I should look into? I'm not too familiar with the malicious/Security aspects of Networking. And a note: I'm not some kid trying to learn how to hack. I just want to learn as much as possible before I go to college, and I really need to know if I need to study this or not.

    Read the article

  • Architecture of an action multiplayer game from scratch

    - by lcf
    Not sure whether it's a good place to ask (do point me to a better one if it's not), but since what we're developing is a game - here it goes. So this is a "real-time" action multiplayer game. I have familiarized myself with concepts like lag compensation, view interpolation, input prediction and pretty much everything that I need for this. I have also prepared a set of prototypes to confirm that I understood everything correctly. My question is about the situation when game engine must be rewind to the past to find out whether there was a "hit" (sometimes it may involve the whole 'recomputation' of the world from that moment in the past up to the present moment. I already have a piece of code that does it, but it's not as neat as I need it to be. The domain logic of the app (the physics of the game) must be separated from the presentation (render) and infrastructure tools (e.g. the remote server interaction specifics). How do I organize all this? :) Is there any worthy implementation with open sources I can take a look at? What I'm thinking is something like this: -> Render / User Input -> Game Engine (this is the so called service layer) -> Processing User Commands & Remote Server -> Domain (Physics) How would you add into this scheme the concept of "ticks" or "interactions" with the possibility to rewind and recalculate "the game"? Remember, I cannot change the Domain/Physics but only the Game Engine. Should I store an array of "World's States"? Should they be just some representations of the world, optimized for this purpose somehow (how?) or should they be actual instances of the world (i.e. including behavior and all that). Has anybody had similar experience? (never worked on a game before if that matters)

    Read the article

  • How to programatically retarget animations from one skeleton to another?

    - by Fraser
    I'm trying to write code to transfer animations that were designed for one skeleton to look correct on another skeleton. The source animations consist only of rotations except for translations on the root (they're the mocap animations from the CMU motion capture database). Many 3D applications (eg Maya) have this facility built-in, but I'm trying to write a (very simple) version of it for my game. I've done some work on bone mapping, and because the skeletons are hierarchically similar (bipeds), I can do 1:1 bone mapping for everything but the spine (can work on that later). The problem, however, is that the base skeleton/bind poses are different, and the bones are different scales (shorter/longer), so if I just copy the rotation straight over it looks very strange: I've tried multiplying by the original bone's absolute rotation, then by the inverse of the target, and vice-versa... kind of a shot in the dark, and indeed it didn't work. (Tried relative transformations too)... I'm not sure where to go from here, so if anyone has any resources on stuff like this (papers, source code, etc), that would be really helpful. Thanks!

    Read the article

  • Python Regular Expressions: Capture lookahead value (capturing text without consuming it)

    - by Lattyware
    I wish to use regular expressions to split words into groups of (vowels, not_vowels, more_vowels), using a marker to ensure every word begins and ends with a vowel. import re MARKER = "~" VOWELS = {"a", "e", "i", "o", "u", MARKER} word = "dog" if word[0] not in VOWELS: word = MARKER+word if word[-1] not in VOWELS: word += MARKER re.findall("([%]+)([^%]+)([%]+)".replace("%", "".join(VOWELS)), word) In this example we get: [('~', 'd', 'o')] The issue is that I wish the matches to overlap - the last set of vowels should become the first set of the next match. This appears possible with lookaheads, if we replace the regex as follows: re.findall("([%]+)([^%]+)(?=[%]+)".replace("%", "".join(VOWELS)), word) We get: [('~', 'd'), ('o', 'g')] Which means we are matching what I want. However, it now doesn't return the last set of vowels. The output I want is: [('~', 'd', 'o'), ('o', 'g', '~')] I feel this should be possible (if the regex can check for the second set of vowels, I see no reason it can't return them), but I can't find any way of doing it beyond the brute force method, looping through the results after I have them and appending the first character of the next match to the last match, and the last character of the string to the last match. Is there a better way in which I can do this? The two things that would work would be capturing the lookahead value, or not consuming the text on a match, while capturing the value - I can't find any way of doing either.

    Read the article

  • assistance with classifying tests

    - by amateur
    I have a .net c# library that I have created that I am currently creating some unit tests for. I am at present writing unit tests for a cache provider class that I have created. Being new to writing unit tests I have 2 questions These being: My cache provider class is the abstraction layer to my distributed cache - AppFabric. So to test aspects of my cache provider class such as adding to appfabric cache, removing from cache etc involves communicating with appfabric. Therefore the tests to test for such, are they still categorised as unit tests or integration tests? The above methods I am testing due to interacting with appfabric, I would like to time such methods. If they take longer than a specified benchmark, the tests have failed. Again I ask the question, can this performance benchmark test be classifed as a unit test? The way I have my tests set up I want to include all unit tests together, integration tests together etc, therefore I ask these questions that I would appreciate input on.

    Read the article

  • What to pass to UserType, BlobType.setPreparedStatement session parameter

    - by dlots
    http://blog.xebia.com/2009/11/09/understanding-and-writing-hibernate-user-types/ I am attempting to defined a customer serialization UserType that mimics, the XStreamUserType referenced and provided here: http://code.google.com/p/aphillips/source/browse/commons-hibernate-usertype/trunk/src/main/java/com/qrmedia/commons/persistence/hibernate/usertype/XStreamableUserType.java My serializer outputs a bytearray that should presumably written to a Blob. I was going to do: public class CustomSerUserType extends DirtyCheckableUserType { protected SerA ser=F.g(SerA.class); public Class<Object> returnedClass() { return Object.class; } public int[] sqlTypes() { return new int[] {Types.BLOB}; } public Object nullSafeGet(ResultSet resultSet,String[] names,Object owner) throws HibernateException,SQLException { if() } public void nullSafeSet(PreparedStatement preparedStatement,Object value,int index) throws HibernateException,SQLException { BlobType.nullSafeSet(preparedStatement,ser.ser(value),index); } } Unfortunetly, the BlobType.nullSafeSet method requires the session. So how does one define a UserType that gets access to a servlet requests session? EDIT: There is a discussion of the issue here and it doesn't appear there is a solution: Best way to implement a Hibernate UserType after deprecations?

    Read the article

  • Localizing a plist with grouped data

    - by Robert Altman
    Is there a way to localize a plist that contain hierarchical or grouped data? For instance, if the plist contains: Book 1 (dictionary) Key (string) Name (string) Description (localizable string) Book 2 (dictionary) Key (string) Name (string) Description (localizable string) (etcetera...) For the sake of the example, the Key and Name should not be translated (and preferably should not be duplicated in multiple localized property lists). Is there a mechanism for providing localizations for the localizable Description field without localizing the entire property list? The only other strategy that came to my mind is to store a lookup key in the description field and than use that to retrieve the localized text via NSLocalizedString(...) Thanks.

    Read the article

  • Complicated parsing in python

    - by Quazi Farhan
    I have a weird parsing problem with python. I need to parse the following text. Here I need only the section between(not including) "pre" tag and column of numbers (starting with 205 4 164). I have several pages in this format. <html> <pre> A Short Study of Notation Efficiency CACM August, 1960 Smith Jr., H. J. CA600802 JB March 20, 1978 9:02 PM 205 4 164 210 4 164 214 4 164 642 4 164 1 5 164 </pre> </html>

    Read the article

  • Extending a jquery plugins event callback

    - by Greg J
    I'm extending the functionality of a jquery plugin (foo) with another jquery plugin (bar). Essentially, the first plugin specifies an onReady(): var foo = $.foo({ onReady: function() { alert('foo'); }}); Foo is sent to bar as a parameter to bar: var bar = $.bar(foo); I want bar to be able to hook into foo's onReady event: (function($) { $.extend({ bar: function(foo) { var foo = foo; // How to do alert('bar') when foo.onready is called? } }); })(jQuery); I can override foo's onready event: foo.onready = function() { alert('bar'); } But I don't want to override it, I want to extend it so that I'll see both alerts when foo is ready. Thanks in advance!

    Read the article

  • How to pretend to be a Printer on iOS like the Apps Save2PDF or Adobe® CreatePDF?

    - by Lindemann
    I want to convert HTML to PDF on an iOS Device... ...but I dont want to load my HTML in a UIWebView, take a snapshot and generate an ugly PDF from this snapshot picture...because the text must be selectable for my purpose. I wonder how Apps like Save2PDF or Adobe® CreatePDF are able to converting multiple files into PDF and save them. I guess they don't generate the PDF's by their own, but get them from Apples Printing Framework. How does this Apps work?

    Read the article

  • Coding without Grock. Is it wrong?

    - by OldCurmudgeon
    Should a professional programmer allow themselves to write code without completely understanding the requirements? In my 30+ years as a programmer I must have written many thousands of lines of code without completely understanding what is required of me at the time. In most cases the results were rubbish that should have been discarded. Every other industry that employs professionals has systems to root out such behavior. Ours does not. Is this right?

    Read the article

  • if isset PHP not working?

    - by Ellie
    Okay, Im trying to set a captcha up, However with this code in, it breaks. if(isset($_POST["captcha"])) if($_SESSION["captcha"]==$_POST["captcha"]) When i do it with out it, the page works, but the captcha is letting incorrect submits through. Parse error: syntax error, unexpected '"', expecting T_STRING or T_VARIABLE or T_NUM_STRING in /hermes/waloraweb085/b2027/moo.lutarinet/jointest.php on line 71 <?php $pagetitle = "Home"; $checkrank = 0; include ($_SERVER['DOCUMENT_ROOT'].'/header.inc.php'); ECHO <<<END <br><br> <b><center><i><u>DO NOT</u> USE YOUR NEOPETS PASSWORD OR PIN NUMBER!!!</b></i></center> <p> ?> <?php session_start() ?> <center><P><FORM ACTION="join.pro.php" enctype="multipart/form-data" METHOD=POST> <table width="393" height="188" border="0" cellpadding="0" cellspacing="0"> <td width="150">Username</td> <td width="243"><input type=text name="name" value="" size=32 maxlength=15></td> </tr> <tr> <td>Password</td> <td><input type=password name="pass1" VALUE="" maxlength=15></td> </tr> <tr> <td>Confirm Password</td> <td><input type=password name="pass2" VALUE="" size=32 maxlength=15></td> </tr> <tr> <td>Security Code (4 Diget Number)</td> <td><input type=password name="security" VALUE="" size=32 maxlength=4></td> </tr> <tr> <td>Email Address</td> <td><INPUT TYPE=text NAME="email" VALUE="" SIZE=32 maxlength=100></td> </tr> <tr> <td height="41" colspan="2" valign="middle"><p><p><center> By registering an account here you agree to all of our <A HREF="$baseurl/tos.php">Terms and Conditions</A>. You can also view our <A HREF="$baseurl/privacy.php">Privacy Policy</A>. </center></p></td> </tr> <tr><td align="center">CAPTCHA:<br> (antispam code, 3 black symbols)<br> <table><tr><td><img src="captcha.php" alt="captcha image"></td><td><input type="text" name="captcha" size="3" maxlength="3"></td></tr></table> </td></tr> <td height="27" colspan="2" valign="middle"> <center><input type=submit name=Submit value="Register"></center> </td> </table> </form> <?php if(isset($_POST["captcha"])) if($_SESSION["captcha"]==$_POST["captcha"]) { //CAPTHCA is valid; proceed the message: save to database, send by e-mail ... echo 'CAPTHCA is valid; proceed the message'; } else { echo 'CAPTHCA is not valid; ignore submission'; } ?> <?php END; include ($_SERVER['DOCUMENT_ROOT'].'/footer.inc.php'); ?> captcha.php <?php session_start(); header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); header("Cache-Control: no-store, no-cache, must-revalidate"); header("Cache-Control: post-check=0, pre-check=0", false); header("Pragma: no-cache"); function _generateRandom($length=6) { $_rand_src = array( array(48,57) //digits , array(97,122) //lowercase chars // , array(65,90) //uppercase chars ); srand ((double) microtime() * 1000000); $random_string = ""; for($i=0;$i<$length;$i++){ $i1=rand(0,sizeof($_rand_src)-1); $random_string .= chr(rand($_rand_src[$i1][0],$_rand_src[$i1][1])); } return $random_string; } $im = @imagecreatefromjpeg("http://sketchedneo.com/images/sitedesigns/captcha.jpg"); $rand = _generateRandom(3); $_SESSION['captcha'] = $rand; ImageString($im, 5, 2, 2, $rand[0]." ".$rand[1]." ".$rand[2]." ", ImageColorAllocate ($im, 0, 0, 0)); $rand = _generateRandom(3); ImageString($im, 5, 2, 2, " ".$rand[0]." ".$rand[1]." ".$rand[2], ImageColorAllocate ($im, 255, 0, 0)); Header ('Content-type: image/jpeg'); imagejpeg($im,NULL,100); ImageDestroy($im); ?> Help please anyone? Line 71: if(isset($_POST["captcha"])) Line 72: if($_SESSION["captcha"]==$_POST["captcha"])

    Read the article

  • UIPopoverController gesture handling in UISplitViewController for iOS 5.1 and below

    - by 5StringRyan
    I've (along with many others) have noticed that Apple changed the appearance of the popover controller to use a "slider" window rather than the usual "popover" tableview that I've used. While I'm okay with the new appearance, like others I'm having issues with the swipe gesture that is introduced: iOS 5.1 swipe gesture hijacked by UISplitViewController - how to avoid? The fix for this seems to be to set the split view controller method "presentWithGesture" to "NO." UISplitViewController *splitViewController = [[UISplitViewController alloc] init]; splitViewController.presentsWithGesture = NO; This works great if the user is using iOS 5.1, however, if this code is run using iOS 5.0 or below, an exception is thrown since this method is only available for iOS 5.1: Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UISplitViewController setPresentsWithGesture:]: unrecognized selector Is it possible to get rid of this gesture without using this method so that it's backwards compatible with iOS' 5.0 and below?

    Read the article

  • Operator Overloading for Queue C++

    - by Josh
    I was trying to use the overload operator method to copy the entries of one queue into another, but I am going wrong with my function. I don't know how else to access the values of the queue "original" any other way than what I have below: struct Node { int item; Node* next; }; class Queue { public: [...] //Extra code here void operator = (const Queue &original); protected: Node *front, *end; } void Queue::operator=(const Queue &original) { //THIS IS WHERE IM GOING WRONG while(original.front->next != NULL) { front->item = original.front->item; front->next = new Node; front = front->next; original.front = original.front->next; } }

    Read the article

  • Why can't I override WP's 'excerpt_more' filter via my child theme functions?

    - by Osu
    I can't seem to get my functions to work for changing the excerpt_more filter of the Twenty Eleven parent theme. I suspect it might actually be add_action( 'after_setup_theme', 'twentyeleven_setup' ); that's the problem, but I've even tried remove_filter( 'excerpt_more', 'twentyeleven_auto_excerpt_more' ) to get rid Twenty Eleven's function and still my functions aren't changing anything... Can you help? Here's the functions.php code in full: http://pastie.org/3758708 Here's the functions I've added to /mychildtheme/functions.php function clientname_continue_reading_link() { return ' <a href="'. esc_url( get_permalink() ) . '">' . __( 'Read more... <span class="meta-nav">&rarr;</span>', 'clientname' ) . '</a>'; } function clientname_auto_excerpt_more( $more ) { return ' &hellip;' . clientname_continue_reading_link(); } add_filter( 'excerpt_more', 'clientname_auto_excerpt_more' ); Thanks, Osu

    Read the article

  • log4j additivity, category logging level and appender threshold

    - by GBa
    I'm having troubles understanding the relation between additivity, category logging level and appender threshold... here's the scenario (my log4j.properties file): log4j.category.GeneralPurpose.classTypes=INFO, webAppLogger log4j.additivity.GeneralPurpose.classTypes=true log4j.category.GeneralPurpose=ERROR, defaultLogger log4j.additivity.GeneralPurpose=false log4j.appender.webAppLogger=org.apache.log4j.RollingFileAppender log4j.appender.webAppLogger.File=webapps/someWebApp/logs/webApp.log log4j.appender.webAppLogger.MaxFileSize=3000KB log4j.appender.webAppLogger.MaxBackupIndex=10 log4j.appender.webAppLogger.layout=org.apache.log4j.PatternLayout log4j.appender.webAppLogger.layout.ConversionPattern=%d [%t] (%F:%L) %-5p - %m%n log4j.appender.webAppLogger.Encoding=UTF-8 log4j.appender.defaultLogger=org.apache.log4j.RollingFileAppender log4j.appender.defaultLogger.File=logs/server.log log4j.appender.defaultLogger.MaxFileSize=3000KB log4j.appender.defaultLogger.MaxBackupIndex=10 log4j.appender.defaultLogger.layout=org.apache.log4j.PatternLayout log4j.appender.defaultLogger.layout.ConversionPattern=%d [%t] (%F:%L) %-5p - %m%n log4j.appender.defaultLogger.Encoding=UTF-8 insights: category GeneralPurpose.classTypes is INFO category GeneralPurpose.classTypes has additivity TRUE category GeneralPurpose is ERROR category GeneralPurpose has additivity FALSE with the current configuration I would have assumed that INFO messages sent to category GeneralPurpose.classTypes.* would be only logged to webAppLogger since the parent logger (cateogry) is set with ERROR level logging. However, this is not the case, the message is logged twice (one in each log file). Looks like the ERROR logging level for the parent category is not taken into consideration when the event is sent as part of additivity... is my observation correct or am I missing something ? how should I alter the configuration in order to achieve only ERROR level loggings in server.log ? thanks, GBa.

    Read the article

  • Parsing a Directory of files - Check for a String

    - by i.h4d35
    This is my first post here so kindly pardon any mistakes that I have. I'm still learning to find my way around Stack Exchange. I am trying to write a Java program that tries to scan a Directory full of either .txt,.rtf or.doc files(and none other). The aim is to search all the files in the directory, and find out if a particular string exists in the file. If it does, it returns the string and the filename that it found the string in. The aim of this program is, it is a project for school wherein the program scans the personal folders of call center employees to check if they have stored any CC/DC nos and if yes, report the folder name - to reduce CC fraud. The search function was fairly straight forward and works when I individually specify the filename. However, the searching the directory and passing the files to the search function has me stumped. I've posted my code so far, if you guys could look thru it and give me some feedback/suggestions, I'd really appreciate it. Thanks in advance import java.io.*; import java.util.*; public class parse2{ void traverse(String directory) throws FileNotFoundException { File dir = new File(directory); if (dir.isDirectory()) { String[] children = dir.list(); for (int i=0; i<children.length; i++) { //System.out.println("\n" + children[i]); reader(children[i]); } } } void reader(String loc) throws FileNotFoundException { FileReader fr = new FileReader(loc); BufferedReader br = new BufferedReader(fr); Scanner sc = new Scanner(br); char[] chkArray; int chk=1; char ch; while(sc.hasNext()) { String chkStr = sc.next(); chkArray = chkStr.toCharArray(); if ((chkArray[0]=='4')&&(chkStr.length()>13)) { for(int i=0;i<chkArray.length;i++) { ch=chkArray[i]; if((ch=='0')||(ch=='1')||(ch=='2')||(ch=='3')||(ch=='4')||(ch=='5')||(ch=='6')||(ch=='7')||(ch=='8')||(ch=='9')) { chk=0; continue; } else { chk=1; break; } } if(chk==0) System.out.println("\n"+ chkStr); } else if((chkArray[0]=='5')&&(chkStr.length()>13)) { for(int i=0;i<chkArray.length;i++) { ch=chkArray[i]; if((ch=='0')||(ch=='1')||(ch=='2')||(ch=='3')||(ch=='4')||(ch=='5')||(ch=='6')||(ch=='7')||(ch=='8')||(ch=='9')) { chk=0; continue; } else { chk=1; break; } } if(chk==0) System.out.println("\n"+ chkStr); } else if((chkArray[0]=='6')&&(chkStr.length()>13)) { for(int i=0;i<chkArray.length;i++) { ch=chkArray[i]; if((ch=='0')||(ch=='1')||(ch=='2')||(ch=='3')||(ch=='4')||(ch=='5')||(ch=='6')||(ch=='7')||(ch=='8')||(ch=='9')) { chk=0; continue; } else { chk=1; break; } } if(chk==0) System.out.println("\n"+ chkStr); } } } public static void main(String args[]) throws FileNotFoundException { parse2 P = new parse2(); P.traverse("C:/Documents and Settings/h4d35/Desktop/javatest/chk"); } }

    Read the article

  • Regex - Modifying strings except in specified enclosures - PHP

    - by Kovo
    I have found similar answers to my current needs on SO, however I am still trying to grasp modifying strings based on a rule, except in certain enclosures within those strings. Example of what Im trying to accomplish now: preg_replace("/\s*,\s*/", ",", $text) I found the above in many places. It will remove spaces before and after all commas in a string. That works great. However, if I want to exclude modifying commas found within " ", I am not sure how that rule has to be modified. Any help? Thanks! EDIT: I want to clarify my question: I would like all whitespace before and after the commas in the following sentence removed, except commas found in double or single quotes: a, b , c "d, e f g , " , h i j ,k lm,nop Expected result: a,b,c "d, e f g , ",h i j,k lm,nop

    Read the article

  • Using javascript to add form fields, but what will the new name be?

    - by user1322844
    After reading this post: using javascript to add form fields.. but below, not to the side? I've made the button work! But I don't know how to receive the output. This is what I entered. var counter = 0; function addNew() { // Get the main Div in which all the other divs will be added var mainContainer = document.getElementById('mainContainer'); // Create a new div for holding text and button input elements var newDiv = document.createElement('div'); // Create a new text input var newText = document.createElement('input'); newText.type = "input"; newText.maxlength = "50"; newText.maxlimit = "50"; newText.size = "60"; newText.value = counter; // Create a new button input var newDelButton = document.createElement('input'); newDelButton.type = "button"; newDelButton.value = "Delete"; // Append new text input to the newDiv newDiv.appendChild(newText); // Append new button input to the newDiv newDiv.appendChild(newDelButton); // Append newDiv input to the mainContainer div mainContainer.appendChild(newDiv); counter++; // Add a handler to button for deleting the newDiv from the mainContainer newDelButton.onclick = function() { mainContainer.removeChild(newDiv); } } </script> With this in the form: <input type="button" size="3" cols="30" value="Add" onClick="addNew()"> So, what will the new field names be? I don't understand enough of the coding to figure out what I'm telling it to. Good thing there are other smart folks out there for me to lean on! Thanks for any answers.

    Read the article

  • Disable action if textarea is empty

    - by mymlyn
    Could I somehow disable action (send, redirect) from submit if the textarea was empty (so nothing at all happens onclick). I want to avoid displaying error here, thats why I'm asking. My textarea: <textarea id="message" name="message" maxlength="35"></textarea> My submit button: <input id="send" type="image" src="/site_media/static/images/submit.png" value="Submit"> This is what i tried: http://jsfiddle.net/5Xwyb/ My brain died couple of hours ago.

    Read the article

  • Having troubles inheriting base class

    - by Nick
    When I inherit the base class, it's telling me there is no such class This is enhanced.h: class enhanced: public changeDispenser // <--------where error is occuring { public: void changeStatus(); // Function: Lets the user know how much of each coin is in the machine enhanced(int); // Constructor // Sets the Dollar amount to what the User wants void changeLoad(int); // Function: Loads what change the user requests into the Coin Machine int dispenseChange(int); // Function: Takes the users amount of cents requests and dispenses it to the user private: int dollar; }; This is enhanced.cpp: #include "enhanced.h" #include <iostream> using namespace std; enhanced::enhanced(int dol) { dollar = dol; } void enhanced::changeStatus() { cout << dollar << " dollars, "; changeDispenser::changeStatus(); } void enhanced::changeLoad(int d) { dollar = dollar + d; //changeDispenser::changeLoad; } This is changeDispenser.h: class changeDispenser { public: void changeStatus(); // Function: Lets the user know how much of each coin is in the machine changeDispenser(int, int, int, int); // Constructor // Sets the Quarters, Dimes, Nickels, and Pennies to what the User wants void changeLoad(int, int, int, int); // Function: Loads what change the user requests into the Coin Machine int dispenseChange(int); // Function: Takes the users amount of cents requests and dispenses it to the user private: int quarter; int dime; int nickel; int penny; }; I didn't include the driver file or the changeDispenser imp file, but in the driver, these are included #include "changeDispenser.h" #include "enhanced.h"

    Read the article

  • asp.net menu control css for child items

    - by Andres
    I have an asp.net menu control which the child items(submenu) width is tied to its parent's width, I was wondering is there a work around? because some of the titles for the submenu are longer than the title of the parent so it looks all smooshed together and just horrible on the eyes. Any help is much appreciated. :) .net control: <asp:Menu ID="navigation" runat="server" Orientation="Horizontal" CssClass="topmenu" MaximumDynamicDisplayLevels="20" IncludeStyleBlock="false"> <DynamicSelectedStyle /> <DynamicMenuItemStyle /> <DynamicHoverStyle /> <DynamicMenuStyle /> <StaticMenuItemStyle /> <StaticSelectedStyle /> <StaticHoverStyle /> </asp:Menu> html rendered: <div class="topmenu" id="navigation"> <ul class="level1"> <li><a class="popout level1" href="dashboard.aspx?option=1">Seguridad</a> <ul class="level2"> <li><a class="level2" href="security/users.aspx?option=15">Usuarios</a></li> <li><a class="level2" href="security/profiles.aspx?option=16">Perfiles</a></li> <li><a class="level2" href="security/options.aspx?option=17">Opciones</a></li> <li><a class="level2" href="security/actions.aspx?option=18">Acciones</a></li> </ul> </li> </ul> </div> css: div.topmenu{} div.topmenu ul { list-style:none; padding:5px 0; margin:0; background: #0b2e56; } div.topmenu ul li { float:left; padding:10px; color: #fff; height:16px; z-index:9999; margin:0; } div.topmenu ul li a, div.menu ul li a:visited{ color: #fff; } div.topmenu ul li a:hover{ color:#fff; } div.topmenu ul li a:active{color:#fff; } thats what I have and the styling works i just need help in getting submenus to expand if they are bigger than main title. Thanks in advance!

    Read the article

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