Search Results

Search found 20140 results on 806 pages for 'output formatting'.

Page 118/806 | < Previous Page | 114 115 116 117 118 119 120 121 122 123 124 125  | Next Page >

  • Can you embed PHP code in the output of a CGI script?

    - by Joe Corkery
    I have a CGI based form that I am working with and I would like to be able to include some PHP code in the generated results. However, when I do this, the PHP does not appear to get processed and just ends up being displayed in the resulting web page. Is what I am doing actually possible or am I missing something? Thanks.

    Read the article

  • How would i output a message that says "values inserted to table" ?

    - by ranlo
    <?php error_reporting(0); $con=mysql_connect("localhost","root",""); if (!$con) { die('could not connect:'.mysql_error()); } mysql_select_db("final?orgdocs",$con); $org_name = $_POST["org_name"]; $org_type = $_POST["org_type"]; $org_code = $_POST["org_code"]; $description = $_POST["description"]; $stmt = "INSERT INTO organization VALUES('".$org_name."','".$org_type."','".$org_code."','".$description."')"; $result = mysql_query("SELECT * FROM organization WHERE org_name = '$org_name' "); echo '<TABLE BORDER = "1">'; $result1 = $result; while ($row = mysql_fetch_array($result1)){ echo '<TR>'.'<TD>'.'Organization Name'.'</TD>'.'<TD>'.'Organization Type'.'</TD>'.'<TD>'.'Organization Code'.'</TD>'.'<TD>'.'Description'.'</TD>'.'<TD>'.'Constitution'.'</TD>'; echo '</TR>'; echo '<TR>'.'<TD>'.$row['org_name'].'</TD>'.'<TD>'.$row['org_type'].'</TD>'; echo '<TD>'.$row['org_code'].'</TD>'.'<TD>'.$row['description'].'</TD>'.'<TD>'; echo '</TR>'; } echo '</TABLE>'; ?>

    Read the article

  • R: How to separate character output in a loop?

    - by John
    I'm blanking on the best way to paste a list of strings together to go into an SQL statement... I'm having trouble with the separator bar | printing at the beginning when I don't want it to: foo = "blah" paste_all_together = NULL for (n in 1:4) { paste_together = paste(foo ,sep = "") paste_all_together = paste(paste_all_together, paste_together, sep = "|") } > paste_all_together [1] "|blah|blah|blah|blah" I just want it to print out "blah|blah|blah|blah". Do I need a nested loop, or is there a better itterator in R for doing this? Or perhaps a better way to input SQL statements?

    Read the article

  • SQL JOIN with two or more tables as output - most efficient way?

    - by littlegreen
    I have an SQL query that executes a LEFT JOIN on another table, then outputs all results that could be coupled into a designated table. I then have a second SQL query that executes the LEFT JOIN again, then outputs the results that could not be coupled to a designated table. In code, this is something like: INSERT INTO coupledrecords SELECT b.col1, b.col2... s.col1, s.col2... FROM bigtable AS b LEFT JOIN smallertable AS s ON criterium WHERE s.col1 IS NOT NULL INSERT INTO notcoupledrecords SELECT b.col1, b.col2... bigtable AS b LEFT JOIN smallertable AS s ON criterium WHERE s.col1 IS NULL My question: I now have to execute the JOIN two times, in order to achieve what I want. I have a feeling that this is twice as slow as it could be. Is this true, and if yes, is there a way to do it more efficiently?

    Read the article

  • How can I change the color of build output in a shell window?

    - by Tim Gradwell
    I have a build process which runs from a batch file. It produces a large volume of text. Sometimes it prints the word "Error" or "Warning" followed by a message. The errors and warnings are getting lost among a sea of text. Can I highlight those words in a different color, maybe in a dos window, or a cygwin shell window, possibly by piping them through some string manipulation program before posting them to the screen? Thanks.

    Read the article

  • Jquery ajax get - how to output data based on condition?

    - by arunas_t
    Hello, there, I have a such piece of code: $("#choose").change(function(){ $.get("get_results.php", {name: $("#choose").val()}, function(data){ if(data !== ""){ $("#results").html(data); }else{ $("#results").html('<strong>Sorry, no records.</strong>'); } }); }); Now the problem is that the first condition ( if(data !== "") ) is always evaluated correctly and executed, but the else clause ('Sorry, no records') never shows up. Can anyone spot the error? Data passed for the else clause is specifically "". Thank You.

    Read the article

  • Java: Is it possible to take a GUI Panel and output it into a picture?

    - by user369748
    So I have this chart that's a little special. Kind of like an XY plot of points but my boss wanted to look like a bunch of boxes rather than dots connected by lines. And I basically made a chart using gridlayout and a whole bunch of cells that I'll be colouring in black or white depending on the data. Now he sorta wants it to be outputted to a image file. Is there any way to save a Panel into a picture? He wants to display not only the data but also save a visual representation of the data into an image file.

    Read the article

  • Beginnerquestion: How to count amount of each number drawn in a Lottery and output it in a list?

    - by elementz
    I am writing this little Lottery application. Now the plan is, to count how often each number has been drawn during each iteration of the Lottery, and store this somewhere. My guess is that I would need to use a HashMap, that has 6 keys and increments the value by one everytime the respective keys number is drawn. But how would I accomplish this? My code so far: public void numberCreator() { // creating and initializing a Random generator Random rand = new Random(); // A HashMap to store the numbers picked. HashMap hashMap = new HashMap(); // A TreeMap to sort the numbers picked. TreeMap treeMap = new TreeMap(); // creating an ArrayList which will store the pool of availbale Numbers List<Integer>numPool = new ArrayList<Integer>(); for (int i=1; i<50; i++){ // add the available Numbers to the pool numPool.add(i); hashMap.put(nums[i], 0); } // array to store the lotto numbers int [] nums = new int [6]; for (int i =0; i < nums.length; i++){ int numPoolIndex = rand.nextInt(numPool.size()); nums[i] = numPool.get(numPoolIndex); // check how often a number has been called and store the new amount in the Map int counter = hashMap.get numPool.remove(numPoolIndex); } System.out.println(Arrays.toString(nums)); } Maybe someone can tell me if I have the right idea, or even how I would implement the map properly?

    Read the article

  • Why are some programs writing on stderr instead of stdout their output?

    - by Zagorax
    I've recently added to my .bashrc file an ssh-add command. I found that ssh-add $HOME/.ssh/id_rsa_github > /dev/null results on a message "identity added and something else" every time I open a shell. While ssh-add $HOME/.ssh/id_rsa_github > /dev/null 2>&1 did the trick and my shell is now 'clean'. Reading on internet, I found that other command do it, (for example time). Could you please explain why it's done?

    Read the article

  • Is Memory increase create difference in output or behavior of java application?

    - by Nitz
    Hey Guys I have created one java-swing application. The application runs perfectly runs perfect on my pc. But it doesn't run perfectly on client pc. I had increase my Virtual Memory, earlier on my pc. So my question is.. Is changing memory limit, effect or change application behavior? Is there anything that change the behavior of java application? bcz same application runs perfectly on my pc and same application does not running perfectly on client pc? and there is no problem in code, i have checked three times.

    Read the article

  • Can I get a patch-compatible output from git-diff?

    - by Malvolio
    I am doing something very simple wrong. I'm trying to prepare an ordinary patch file, so I can reapply some changes: $ git diff > before $ git diff something_here > save.patch $ git checkout . $ patch < save.patch $ git diff > after $ diff before after $ With something_here blank it almost works, but the file names aren't right. I think I'm just I'm missing some option. In real life, I am going to do a merge after the checkout, so the patch might fail there, but you see what I'm getting at.

    Read the article

  • How do I remove line references in generate output in doxygen?

    - by MeThinks
    I want to remove lines look as follows but I still want to return source code browsing Definition at line 377 of file xxx.h. I have tried the following two in the doxygen config file but these just remove cross references on types # If the REFERENCES_RELATION tag is set to YES # then for each documented function all documented entities # called/used by that function will be listed. REFERENCES_RELATION = NO # If the REFERENCES_LINK_SOURCE tag is set to YES (the default) # and SOURCE_BROWSER tag is set to YES, then the hyperlinks from # functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will # link to the source code. Otherwise they will link to the documentation. REFERENCES_LINK_SOURCE = NO update: I've just trying setting the following and seems to do the jobs but waiting to confirm if this is the correct way of achieving what I want SOURCE_BROWSER = NO

    Read the article

  • What will be the output of this program? And why?

    - by Mac
    I came across a good example written below: class Test { private: int m_iX; public: Test(void): m_iX(0) { } ~Test(void) { } void Show() { printf("Hello World"); } }; int main() { Test* pTemp = NULL; pTemp->Show(); return 0; } But, what does this code mean and do? Thanks

    Read the article

< Previous Page | 114 115 116 117 118 119 120 121 122 123 124 125  | Next Page >