Search Results

Search found 7897 results on 316 pages for 'generate'.

Page 143/316 | < Previous Page | 139 140 141 142 143 144 145 146 147 148 149 150  | Next Page >

  • How to get the list in second image ?

    - by rajesh
    Hi, actually i have 2 images ,when we click on one image it generates pop window containing n no of list. if i click on any link 2 parameters are passed to function one for url and other image path and now i have another image ,what i want to do is if i click on that image it will generate a list which has a content of first image after clicking any link of first image means if i click image1 image2 1 2 3 now if i click 1 then result must be like this image1 image2 1 1 2 3 Please help thanks.

    Read the article

  • Enumerate over an enum in C++

    - by jameszhao00
    In C++, Is it possible to enumerate over an enum (either runtime or compile time (preferred)) and call functions/generate code for each iteration? Sample use case: enum abc { start a, b, c, end } for each (__enum__member__ in abc) { function_call(__enum__member__); } Plausible duplicates: C++: Iterate through an enum Enum in C++ like Enum in Ada?

    Read the article

  • scope equivalent in rails 2.3.x?

    - by Jacob Relkin
    Is there a way to generate a group of routes under an admin scope without having to create a new physical directory (like namespace requires you to). I know that in Rails 3 there is a scope method on the route mapper, and this appears to do what I want, but apparently it doesn't exist in Rails 2.3.x My goal is to have a route like this: "/admin/products" map to "app/controllers/products_controller, not "app/controllers/admin/products_controller". Is there any way to accomplish this in Rails 2.3.x?

    Read the article

  • How do I override file.write() under Python 3?

    - by Sorin Sbarnea
    Below works on Python 2.6 but on Python 3.x it doesn't: old_file_write = file.write class file(): def write(self, d): if isinstance(d, types.bytes): self.buffer.write(d) else: old_file_write(d) # ... do something like f = open("x") f.write("...") The problems is that with Python 3.x the first like will generate an error: NameError: name 'file' is not defined How can I make this work on Python 3.x? PS. In fact I'm looking for a solution that will work on both versions.

    Read the article

  • (PHP) 1)How to genrate Secreate key on User & Client Side ? 3) How to Compare Server side MD5 and Client side Md5 ?

    - by user557994
    /* In Below Code .. My problem is that 1) How to genrate Secreate key on User Side ? 2) How to genrate Secreate key on Client Side ? 3) How to Compare Server side MD5 and Client side Md5 ? Can you solve my problem ? */ $gid = $_GET['id']; if($gid=="") { $filename = "counter.txt"; $fp = fopen( $filename, "r" ) or die("Couldn't Generate Whiteboard"); while ( ! feof( $fp ) ) { $countfile = fgets( $fp); $countfile++; } fclose( $fp ); $fp = fopen( $filename, "w" ) or die("Couldn't generate whiteboard"); fwrite( $fp, $countfile ); fclose( $fp ); $doc = new DOMDocument('1.0', 'UTF-8'); $ele = $doc-createElement( 'root' ); $ele-nodeValue = $uvar; $doc-appendChild( $ele ); $test = $doc-save("$countfile.xml"); genkey($id); echo ""; $uvar=$_POST['msgval']; exit; } else { if($uvar == "") { $xdoc = new DOMDocument( '1.0', 'UTF-8' ); $xdoc-Load("$gid.xml"); $candidate = $xdoc-getElementsByTagName('root')-item(0); $newElement = $xdoc -createElement('root'); $txtNode = $xdoc -createTextNode ($root); $newElement - appendChild($txtNode); $candidate - appendChild($newElement); $msg = $candidate-nodeValue; } } function genkey($id) { $encrypt_key = "GJHsahakst1468464a"; $key = MD5("$id","$$encrypt_key"); return $key; } ? function sendRequest() { var uvar = document.getElementById('txtHint').value; var xmlhttp = new XMLHttpRequest(); xmlhttp.onreadystatechange = function() { if(xmlhttp.readyState == 4 && xmlhttp.status==200) { document.getElementById('txtHint').value = ""; } } xmlhttp.open("POST","post.php?id=",true); xmlhttp.setRequestHeader("Content-type","application/x-www-form-urlencoded"); xmlhttp.send("umsg="+uvar); return; } Msg " /

    Read the article

  • Asp.Net (c#) - Read Excel Sheet.

    - by Pino
    I have a requirment to do some imports from an Excel spread sheet and have been looking at various examples on the web, they all seem to use the "Jet" driver which is not compatible with 64Bit. Now I am fully aware of the workarounds available (in changing how IIS runs etc) however I would like to know if there is repalcment for the "Jet" driver so I can read and generate excel sheets from Asp.Net running on a 64Bit server with no IIS modifications.

    Read the article

  • Convert in-memory pdf to byte[]

    - by daft
    I'm writing a websercive in C# that will generate pdf-files and send back to the caller as a byte[]. The pdf file is generated using a third party component, but I'm struggling with the conversion. The pdf is just an in-memory object in the web service, and I can't find any good way of converting the generated pdf to a byte[] before returning it to the caller. Any advice on this?

    Read the article

  • Codeigniter: Retrieving data on button click with Ajax

    - by OllyTenerife
    I have a simple webpage which generates a random quote from my database upon refreshing the page. I wish to implement some AJAX and JQuery in order to generate quotes via the button rather than having to refresh the page. I have done some research but I am not sure how to implement this in Codeigniter. My current code is below... Page controller: public function index() { $this->load->model('quote_model', '', TRUE); $data['quotes'] = $this->quote_model->getRandom(); $this->load->view('home', $data); } The view: <?php include ('layout/header.php'); ?> <div class="container-fluid"> <div class="row"> <div class="col-md-4 quote-holder"> <img src="application/assets/alan1.jpg" alt="..." class="img-circle img-responsive"> <br> <blockquote class="text-center"> <p><?php echo $quotes[0]['quote']; ?></p> <footer class="text-center"><?php echo $quotes[0]['character_name']; ?> in <cite title="Source Title"><?php echo $quotes[0]['series_name']; ?></cite></footer> </blockquote> <button type="button" class="btn btn-default center-block">Generate quote</button> </div> </div> <?php include ('layout/footer.php'); ?> Here is the function in the model I am retrieving the data from: function getRandom() { $query = $this->db->query(" SELECT * FROM quotes, characters, series WHERE quotes.series_id = series.series_id AND quotes.character_id = characters.character_id ORDER BY rand() LIMIT 1 "); return $query->result_array(); } Should I simply be using something like this? $("button").click(function(){ $.get( "Page/index", function( data ) { //output data to page element... } });

    Read the article

  • Importing images using subfloats in LaTeX

    - by melisma
    I am using subfloats to import 2 .png files in a figure to basically generate subfigures. There's no space between the figures when I compile it. How do I put some white space in between them? And is it possible to convert them to black and white using LaTeX?

    Read the article

  • Display Hierarchial data in treeview using xml?

    - by RAMA KRISHNA
    i need to dispaly the hierarchial data in TreeView. Which is getting from sql server into to the dataset in the form of [ID],[Name],[parentID]. create the Relation on the DataSet and generate the xml by using the xslt i want to bind it to the Tree i can able to do it for the menu control but not for the TreeView.

    Read the article

  • Scientific Plotting in Python

    - by user100046
    I have a large data set of tuples containing (time of event, latitude, longitude) that I need to visualize. I was hoping to generate a 'movie'-like xy-plot, but was wondering if anyone has a better idea or if there is an easy way to do this in Python? Thanks in advance for the help, --Leo

    Read the article

  • “Function” calling inside store procedure

    - by idimba
    Hi, I have a big store procedure, that contains a lot of INSERTs. There're many INSERTS that almost identical - they're different by some parameter(s) (all INSERTs to the same table) Is there a way to create a function/method, to which I'll pass the above parameter(s) and the function/method will generate concrete INSERT's? Thanks

    Read the article

  • Build model with nested model in rspec integration test

    - by user1116573
    I understand that I can do something like in rspec: let(:project) { Project.new } but in my app a project accepts_nested_attributes_for tasks and when I generate the Project form I build a task along with it using: @project = Project.new @project.tasks.build I need something like: let(:project) { Project.new.tasks.build } but that doesn't seem to work. How can I do this as a let in my rspec test?

    Read the article

  • Python templates for huge HTML/XML

    - by newtover
    Hello, Recently I needed to generate a huge HTML page containing a report with several thousand row table. And, obviously, I did not want to build the whole HTML (or the underlying tree) in memory. As result, I built the page with the old good string interpolation, but I do not like the solution. Thus, I wonder whether there are Python templating engines that can yield resulting page content by parts.

    Read the article

  • java random percentages

    - by erw
    I need to generate n percentages (integers between 0 and 100) such that the sum of all n numbers adds up to 100. If I just do nextInt() n times, each time ensuring that the parameter is 100 minus the previously accumulated sum, then my percentages are biased (i.e. the first generated number will usually be largest etc.). How do I do this in an unbiased way?

    Read the article

  • Using Git or Mercurial, how would you know when you do a clone or a pull, no one is checking in file

    - by Jian Lin
    Using Git or Mercurial, how would you know when you do a clone or a pull, no one is checking in files (pushing it)? It can be important that: 1) You never know it is in an inconsistent state, so you try for 2 hours trying to debug the code for what's wrong. 2) With all the framework code -- potentially hundreds of files -- if some files are inconsistent with the other, can't the rake db:migrate or script/generate controller cause some damage or inconsistencies to the code base?

    Read the article

  • Random Int in VB.Net

    - by brendan
    I need to generate random integer between 1-n (where n is a positive whole number) to use for a unit test. I don't need something overly complicated to ensure true randomnesses - just an old fashioned random number. How would I do that?

    Read the article

  • What is the opposite of JAXB? i.e. generating XML FROM classes?

    - by 8EM
    I am currently designing a solution to a problem I have. I need to dynamically generate an XML file on the fly using Java objects, in the same way JAXB generates Java classes from XML files, however the opposite direction. Is there something out there already like this? Alternatively, a way in which one could 'save' a state of java classes. The goal I am working towards is a dynamically changing GUI, where a user can redesign their GUI in the same way you can with iGoogle.

    Read the article

  • Modifying MySQL Where Statement Based on Array

    - by Ryan
    Using an array like this: $data = array ( 'host' => 1, 'country' => 'fr', ) I would like to create a MySQL query that uses the values of the array to form its WHERE clause like: SELECT * FROM table WHERE host = 1 and country = 'fr' How can I generate this query string to use with MySQL?

    Read the article

< Previous Page | 139 140 141 142 143 144 145 146 147 148 149 150  | Next Page >