Search Results

Search found 3152 results on 127 pages for 'jq beginner'.

Page 67/127 | < Previous Page | 63 64 65 66 67 68 69 70 71 72 73 74  | Next Page >

  • Delete an (exact) element from an array in php

    - by Holian
    Hi Masters! For example i have an array like this: $test= array("0" => "412", "1" => "2"); I would like to delete the element if its = 2 $delete=2; for($j=0;$j<$dbj;$j++) { if (in_array($delete, $test)) { unset($test[$j]); } } print_r($test); But with this, unfortunatelly the array will empty... How can i delete an exact element from the array? Thank you

    Read the article

  • PHP Form (post) Repeating input in a tabel

    - by Sef
    Hello, I have a form (with post method) that takes the following input: - a certain name - a number - 3 checkboxes All this input gets generated and calculated in a table.(html code within the php) Everything gets properly calculated and displayed in a table. So my question: How do i make it possible after giving all those input to give in more input? Meaning i have made a hyperlink that goes back to the form itself (where i can give the input). So i can give in new data, and after submiting that again the table now contains 2 rows of values insteed of just 1. Not really sure what exactly i need for this. Regards.

    Read the article

  • jquery json parsing

    - by lolweb
    How do I parse this json with jQuery? DayEvents : [{"0":"886","event_id":"886","1":"5029","user_id":"5029","2":"Professional","user_type":"Professional", ...

    Read the article

  • Error handling with Python + Pylons

    - by ensnare
    What is the proper way to handle errors with Python + Pylons? Say a user sets a password via a form that, when passed to a model class via the controller, throws an error because it's too short. How should that error be handled so that an error message gets displayed on the web page rather than the entire script terminating to an error page? Should there be any error handling in the controller itself? I hope I am explaining myself clearly. Thank you.

    Read the article

  • How to execute an exe using Javascript?

    - by Karthick
    I need to open an EXE from a folder, when the folder is present, using javascript. I have added the code, but am not able to open the EXE after checking the folder, please share your thoughts. <html> <body> <script language="JScript"> <!-- function checkfolder() { var myObject; myObject = new ActiveXObject("Scripting.FileSystemObject"); if(myObject.FolderExists("\\tmp")) { alert("tmp Folder Exists"); } else { alert("tmp Folder doesn't exist"); } } --> </script> Check for folder "tmp" <form name="myForm"> <input type="Button" value="Check Folder" onClick='checkfolder()'> </form> </body> </html>

    Read the article

  • C++ Inheritance and Constructors

    - by DizzyDoo
    Hello, trying to work out how to use constructors with an inherited class. I know this is very much wrong, I've been writing C++ for about three days now, but here's my code anyway: clientData.h, two classes, ClientData extends Entity : #pragma once class Entity { public: int x, y, width, height, leftX, rightX, topY, bottomY; Entity(int x, int y, int width, int height); ~Entity(); }; class ClientData : public Entity { public: ClientData(); ~ClientData(); }; and clientData.cpp, which contains the functions: #include <iostream> #include "clientData.h" using namespace std; Entity::Entity(int x, int y, int width, int height) { this->x = x; this->y = y; this->width = width; this->height = height; this->leftX = x - (width/2); this->rightX = x + (width/2); this->topY = y - (height/2); this-bottomY = y + (height/2); } Entity::~Entity() { cout << "Destructing.\n"; } ClientData::ClientData() { cout << "Client constructed."; } ClientData::~ClientData() { cout << "Destructing.\n"; } and finally, I'm creating a new ClientData with: ClientData * Data = new ClientData(32,32,32,16); Now, I'm not surprised my compiler shouts errors at me, so how do I pass the arguments to the right classes? The first error (from MVC2008) is error C2661: 'ClientData::ClientData' : no overloaded function takes 4 arguments and the second, which pops up whatever changes I seem to make is error C2512: 'Entity' : no appropriate default constructor available Thanks.

    Read the article

  • technology for new webproject?

    - by elCapitano
    Hi there, i am planing to set up a new webproject which has to use a database and a model which can be presented in a browser. I looked at a lot of technologies (JSF, PHP, ..) but i could not find a free and easy framework/technology for me (in the end i prefered asp.net, but this is not free). What can you recommend me for a new webproject from scratch?

    Read the article

  • Same script, working on a site, not working on the other!

    - by Tioneb
    Hello, First of all I apologize in advance for this question, a bit off the rang of stackoverflow, but I've spend a day trying to solve that issue and I'm totally stuck. The issue: The search function of my script (php) works perfectly fine on one host but not on the other. If you search something here : edu-cafe.com, you'll get a result, just as it should be. However, try a search on this site, hosted somewhere else : code-reduc.com, exact same script, files and datable, and it just hang. I've asked both the host and the original programmer of the script to look at the issue but they can't seem to find an answer... Obviously the cause of my troubles comes from the Host, but I can't find the issue Any bit of help would be hugely appreciated! PS: part of the script here: http://codepaste.net/fuymqn Thanks!

    Read the article

  • Beginning PHP for someone interested in Security

    - by MaXX
    I'd like to learn PHP specifically for dealing with security vulnerabilities/exploits. Could someone recommend a book? I don't know if I need to learn HTML/CSS/XML/XHTML etc, do I have to learn those too? I don't really plan on designing websites, could anyone help me with this? :P

    Read the article

  • Understanding PHP's way of reading if statements

    - by Masi
    How does PHP read if statements? I have the following if statements in this order if ( $number_of_figures_in_email < 6) { -- cut: gives false } if($number_of_emails > 0) { -- cut: gives false } if ( $number_of_emails == 0) { -- cut: gives true } The code behaves randomly. It sometimes goes to the third if clause and gives me a success, while sometimes to the one of the first two if clauses when the input variables are constant. This suggests me that I cannot code only with if statements.

    Read the article

  • What is the security risk of object reflection?

    - by Legend
    So after a few hours of workaround the limitation of Reflection being currently disabled on the Google App Engine, I was wondering if someone could help me understand why object reflection can be a threat. Is it because I can inspect the private variables of a class or are there any other deeper reasons?

    Read the article

  • C++ template restrictions

    - by pingvinus
    I wondering is there any way to set restrictions on template class? Specify that every type substituted in template must have specific ancestor (realize some interface). template < class B > //and every B must be a child of abstract C class A { public: B * obj; int f() { return B::x + this->obj->f(); } }; Like = in haskell func :: (Ord a, Show b) => a -> b -> c

    Read the article

  • Codeigniter: State Machine how to

    - by Kevin Brown
    I created a db row called "activity_state" to denote which things a user has and hasn't completed. The problem is, I don't know how to use it... How can I use this single row to determine what a user has done? ie. have they completed their profile?, have they completed an assignment? Someone mentioned using it as a bitfield, but I'm unfamiliar with that. Is that a good idea? Any ideas?

    Read the article

  • Express one dimension of 2d array as new array

    - by user208080
    I have a 2d array a[3,3]. How can I express one dimension as a new array and pass it to some function? int[,] a = new int[3,3]; a[0,0] = 1; ... string b = concatenate(a[0]); // where concatenate is a function // take a one dimension array as param Also, can I create a 65000x65000 array with C#? I got some "out of memory" error.

    Read the article

  • What is the last entry in an unfilled array (C++)?

    - by jwaffe
    I put C++ because I'm just starting in C# and I'm not sure if there's a difference. if you declare an array char arr[10] and fill in values for arr[0] through arr[8], what value will be put in arr[9]? a space ' '? An endline '\n'? '\0'? Or is it nothing at all? I'm asking this because I've always used tactics like this char word[20]; for(count = 0 ; count < 20 ; count++) { cout << word[count]; } to print the entire contents of an array, and I was wondering if I could simplify it (e.g., if the last entry was '\0') by using something like this char word[20]; while(word[count] != '\0') { cout << word[count]; } that way, I wouldn't have to remember how many pieces of data were entered into an array if all the spaces weren't filled up. If you know an even faster way, let me know. I tend to make a bunch of mistakes on arrays.

    Read the article

  • Where I get wrong?

    - by Ole Jak
    I have PHP code like this require_once( "includes" . DIRECTORY_SEPARATOR . "constants.php"); $userID = validKey( $key ); $query = "select a.username, b.streamID from user a, streams b where a.id = b.userID;)"; $connection = mysql_connect(DB_SERVER,DB_USER,DB_PASS); if (!$connection) { die("Database connection failed: " . mysql_error()); } $db_select = mysql_select_db(DB_NAME,$connection); if (!$db_select) {die( "Database selection failed: " . mysql_error()); } $generated_table = mysql_fetch_array(mysql_query($query, $connection)); // line (*) print_r($generated_table); But PHP gives me error/worning and does not print anything out Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given on line (*) 1) Why It does not printed me anything out 2) Where am I wrong?

    Read the article

< Previous Page | 63 64 65 66 67 68 69 70 71 72 73 74  | Next Page >