Search Results

Search found 31606 results on 1265 pages for 'generate table'.

Page 75/1265 | < Previous Page | 71 72 73 74 75 76 77 78 79 80 81 82  | Next Page >

  • Hibernate: same generated value in two properties

    - by Markos Fragkakis
    Hi, I have an entity A with fields: aId (the system id) bId I want the first to be generated: @Id @Column(name = "PRODUCT_ID", unique = true, nullable = false, precision = 12, scale = 0) @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "PROD_GEN") @BusinessKey public Long getAId() { return this.aId; } I want the bId to be initially exactly as the aId. One approach is to insert the entity, then get the aId generated by the DB (2nd query) and then update the entity, setting the bId to be equal to aId (3rd query). Is there a way to get the bId to get the same generated value as aId? Note that afterwards, I want to be able to update bId from my gui. If the solution is JPA, even better.

    Read the article

  • How to generate, sign and import SSL certificate from Java

    - by Demiurg
    I need to generate a self signed certificates at run time, sign them and import to the Java keystore. I can do this using "keytool" and "openssl" from command line in the following way: keytool -import -alias root -keystore keystore.txt -file cacert.pem keytool -genkey -keyalg RSA -keysize 1024 -alias www.cia.gov -keystore keystore.txt keytool -keystore keystore.txt -certreq -alias www.cia.gov -file req.pem openssl x509 -req -days 3650 -in req.pem -CA cacert.pem -CAkey cakey.pem -CAcreateserial -out reqsigned.pem keytool -import -alias www.cia.gov -keystore keystore.txt -trustcacerts -file reqsigned.pem I can, of course, ship my application with keytool and openssl binaries and execute the above commands from Java, but I'm looking for a cleaner approach which would allow me to do all of the above using pure Java. Any libraries I can use ?

    Read the article

  • Trying to generate a pdf using Snappy (wkhtmltopdf wrapper)

    - by tirengarfio
    I'm trying to generate a pdf using snappy through this code: $snappy = new SnappyPdf; $snappy->setExecutable('/usr/bin/wkhtmltopdf'); $snappy->save('http://www.google.com', '/tmp/jander.pdf'); In the apache log i find this: Done Loading pages (1/6) [ ] 0% [====== ] 10% [========== ] 18% [============ ] 20% [============= ] 22% [=============== ] 25% [================ ] 28% [================== ] 30% [=================== ] 33% [===================== ] 35% [====================== ] 37% [========================= ] 43% [=========================== ] 46% [============================================================] 100% Counting pages (2/6) [============================================================] Object 1 of 1 Resolving links (4/6) [============================================================] Object 1 of 1 Loading headers and footers (5/6) Printing pages (6/6) [ ] Preparing [============================================================] Page 1 of 1 Done but the pdf is not generated. Any idea? Javier

    Read the article

  • Visual Studio XSD Tool: Generate Collections Rather Than Arrays

    - by senfo
    I generated some C# classes from an XSD using the Visual Studio XSD utility and it generated arrays for storing a collection of elements, rather than one of the built-in generic Collection<T> (or related) classes. None of the command line parameters mentioned in xsd /? mention anything about generating collections rather than arrays, but I know that this can be done with web service proxy classes that Visual Studio generates, so I figured it must be possible. Does anybody know how to have the XSD utility generate collection classes rather than arrays?

    Read the article

  • Ajax, Html: can't generate the content of SELECT tag

    - by Syom
    i have the following html code <select id="c0" name="countries" onchange="show_other()"> <option value="1">something</option> <div id="c1"> </div> </select> i have the option "something", and i want to generate other options via Ajax. but if i try to this document.getElementById('c1').innerHTML = xmlhttp.responseText it doesn't work, but document.getElementById('c0').innerHTML = xmlhttp.responseText works fine, but i need to keep the first option. could you explain what is the problem? thanks

    Read the article

  • How to generate a random alpha-numeric string in Java

    - by Todd
    I've been looking for a simple java algorithm to generate a pseudo-random alpha-numeric string. In my situation it would be used as a unique session/key identifier that would "likely" be unique over 500K+ generation (my needs don't really require anything much more sophisticated) . Ideally I would be able to specify a length depending on my uniqueness needs. For example, a generated string of length 12 might look something like "AEYGF7K0DM1X". Answers: I like @Apocalisp and @erickson's answers equally well. The only downside to @Apocalisp's answer is it requires an apache class. Thanks to both for the help!

    Read the article

  • How does git-diff generate hunk descriptions?

    - by RobM
    (git version 1.6.5.7) When I run git diff the output has a nice scope hint after the line numbers for my Python scripts, e.g.: diff --git a/file.py b/file.py index 024f5bb..c3b5c56 100644 --- a/file.py +++ b/file.py @@ -14,6 +14,8 @@ TITF: Test Infrastructure Tags Format ... @@ -1507,13 +1533,16 @@ class Tags( object ): ... Note that the line numbers are followed by TITF: Test Infrastructure Tags Format and class Tags( object ):. The first patch applies to module scope and the description TITF: Test Infrastructure Tags Format is the module's description. The second patch applies to a method of the Tags class. How does git generate these descriptions? How can I tweak them to show the method name that the patch applies to?

    Read the article

  • How to Generate Edifact message from a xml ?

    - by Clem
    Hello, I'm currently dealing with customs messages Beans in Java. After filling in the Beans with different values, I want to produce an EDIFACT CUSDEC message corresponding to each message. For each attribute of a message Bean, I have the information to put the attribute in the right place in EDIFACT CUSEDC format. Thus, I am looking for a free tool (a Java API) which could ideally convert my full-filled Bean into an EDIFACT CUSDEC message. I found a commercial solution (not free) there : http://www.datadirect.com/products/edifact-grid/index.ssp And a quick tutorial here : http://biemond.blogspot.com/2008/09/generate-edifact-message-from-xml.html But ... unfortunately it is not free.. Thanks in advance for your help!

    Read the article

  • Embedding a Bitmap in ASP.NET's WebResource

    - by Andreas Grech
    I am generating a System.Drawing.Bitmap on the fly in an ASP.NET Custom Web Server Control, and then I want to serve this bitmap as part of the WebResource, because I do not want to save it on the hosting computer. Is there a way to instruct ASP.NET to serve the generated System.Drawing.Bitmap as part of it's WebResource? (therefore making it an "Embedded Resource")

    Read the article

  • format.js generate 406 Not Acceptable error

    - by Denis
    Hello, following code generate a 406 Not Acceptable error. What can be wrong with my code? def remote_create @photo = Photo.new(params[:photo]) respond_to do |format| if @photo.save # add @photo's thumbnail to last import tag format.js { render :update do |page| page.insert_html :bottom, 'polaroids' , :partial => 'polaroid', :locals => {:photo => @photo} end } else format.html end end end Started POST "/photos/remote_create" for 127.0.0.1 at 2010-03-14 14:02:08 Processing by PhotosController#remote_create as HTML Parameters: {"photo"=>{"photo"=>#<File:/var/folders/BT/BTpdsWBkF6myaI-sl3+1NU+++TI/-Tmp-/RackMultipart20100314-285-1y9eq1x-0>, "name"=>"4204497503_a0c43c561d.jpg"}} SQL (0.6ms) INSERT INTO "photos" ("created_at", "filename", "height", "name", "photo_content_type", "photo_file_name", "photo_file_size", "photo_updated_at", "size", "updated_at", "width") VALUES ('2010-03-14 13:02:08.449499', NULL, NULL, '4204497503_a0c43c561d.jpg', 'application/octet-stream', '4204497503_a0c43c561d.jpg', 136710, '2010-03-14 13:02:08.446370', NULL, '2010-03-14 13:02:08.449499', NULL) [paperclip] Saving attachments. [paperclip] saving /Users/denisjacquemin/Documents/code/projects/photos/public/system/photos/224/original/4204497503_a0c43c561d.jpg Completed in 101ms with 406

    Read the article

  • generate all subsets of size k from a set

    - by Kumar
    hi, i want to generate all the subsets of size k from a set. eg:-say i have a set of 6 elements, i have to list all the subsets in which the cardinality of elements is 3. I tried looking for solution,but those are code snippets. Its been long since I have done coding,so I find it hard to understand the code and construct a executable program around it. A complete executable program in C or C++ will be quite helpful. Hoping of an optimal solution using recursion. Thanks in advance. Kumar.

    Read the article

  • generate images with labels from a database

    - by Duncan Benoit
    hi there I need to have some images into my database, and the thing is that i need that images to have certain file names, dimensions and text on it. I know how to generate some images using the opencv lib, but this means that i need to install the lib and do just that job(which sounds as reinventing the wheel). Do you think is worth to do that or maybe you have a better idea? ps: the images are for testing stage of a software application, so i don;t need anything fancy or artistic.

    Read the article

  • generate Grid from template

    - by theXs
    Howdy, I've got another question regarding phone 7... I want to generate a couple of Grids in a stackpanel - since they all have the same layout I thought it would be a great idea to use DataTemplates ... But then I found that the GRID Object has no "DataTemplate" Property and now I'm kinda stuck ... the template which I use is the following: <DataTemplate x:Key="Speise"> <Grid> <TextBlock Height="36" Margin="8,43,104,0" TextWrapping="Wrap" Text="TextBlock" VerticalAlignment="Top"/> <TextBlock HorizontalAlignment="Right" Height="36" Margin="0,44,8,0" TextWrapping="Wrap" Text="TextBlock" VerticalAlignment="Top" Width="92"/> </Grid> </DataTemplate> The way I now thought of creating my objects is: Grid blubber = (Grid)this.Resources["Speise"]; But that is not working ... I think it's again a really short thing, but I have no clue of how to google for it :(

    Read the article

  • Play Framework: Generate PDF from template that uses Javascript for graphing

    - by digiarnie
    I have a template that has some Javascript used to generate graphs in the browser. I would like to use that same template to create a PDF and send as an attachment in an e-mail. In this scenario, there would be no browser/client interaction. I am using the PDF module that is available from the Play website and I have managed to get the PDF rendering to work. The only issue is that the graphs don't show up in the PDF but all other static text does. I'm assuming the graphs aren't appearing in the PDF due to the Javascript not being executed prior to the PDF generation. Does anyone have any ideas on how to get around this problem?

    Read the article

  • SQL Server, Generate scripts, unencrypted stored procedures only

    - by PeterO
    I have a SQL Server database with 3195 stored procedures. Most (approx 90%) of the stored procedures are encrypted (it's a 3rd party app) but there are many that are not encrypted (added by consultants later). I need to get an overview of the unencrypted stored procedures created by consultants and then apply fixes so that they can work with UTC time. I use Generate Scripts and select only stored procedures but that fails. I assume that is because the first stored procedure that it tries to write out is encrypted. Is there a way to write out the approx 300 stored procedures that are not encrypted?

    Read the article

  • Generate encoding String according to creation order.

    - by Tony
    I need to generate encoding String for each item I inserted into the database. for example: x00001 for the first item x00002 for the sencond item x00003 for the third item The way I chose to do this is counting the rows. Before I insert the third item, I count against the database, I know there're already 2 rows, so the next encoding is ended with 3. But there is a problem. If I delete the second item, the forth item will not be the x00004,but x00003. I can add additional columns to table, to store the next encoding, I don't know if there's other better solutions ?

    Read the article

  • Maven install-file won't generate pom.xml

    - by anotherCoder
    I've installed some third party jars to my repository using the following command: mvn install:install-file -Dfile=/home/anotherCoder/Downloads/nifty-1.0.jar -DgroupId=nifty-gui -DartifactId=nifty-gui -Dversion=1.0 -Dpackaging=jar However, once I do mvn compile, maven complains that there is no pom file in the repository and attempts to download it, but can't cause it is not published at any remote repository. Here is the exact message from maven: Downloading: http://repo1.maven.org/maven2/nifty-gui/nifty-gui/1.0/nifty-gui-1.0.pom [INFO] Unable to find resource 'nifty-gui:nifty-gui:pom:1.0' in repository central (http://repo1.maven.org/maven2) So how do I get maven to generate a pom file for that jar and put it in my local repository?

    Read the article

  • generate an array from an array with conditions

    - by Aman
    Suppose i have an array $x = (31,12,13,25,18,10); I want to reduce this array in such a way that the value of each array element is 32. so after work my array will become $newx = (32,32,32,13); I have to generate this array in such a way the sum of array values is never greater than 32. so to create first value, i will reduce 1 from second index value i.e. 12, so the second value will become 11 and first index value will become 31+1 =32. This process should continue so that each array value becomes equal to 32.

    Read the article

  • How to generate .json file with PHP?

    - by Srinivas Tamada
    CREATE TABLE Posts { id INT PRIMARY KEY AUTO_INCREMENT, title VARCHAR(200), url VARCHAR(200) } json.php code <?php $sql=mysql_query("select * from Posts limit 20"); echo '{"posts": ['; while($row=mysql_fetch_array($sql)) { $title=$row['title']; $url=$row['url']; echo ' { "title":"'.$title.'", "url":"'.$url.'" },'; } echo ']}'; ?> I have to generate results.json file.

    Read the article

  • Need help displaying a table dynamically based on a drop down date selection

    - by Gideon
    I am designing a job rota planner for a company and need help displaying a dynamic table containing the staff details. I have the following tables in MySQL database: Staff, Event, and Job. The staff table holds staff details (staffed, name, address...etc), the Event table (eventide, eventName, Fromdate, Todate...etc) and the Job table holds (Jobid, Jobdate, Eventid(fk), Staffid (fk)). I need to dynamically display the available staff list from the staff table when the user selects the event and the date (3 drop downs: date, month, and year) from a PHP form. I need to display staff members that have not been assigned work on the selected date by checking the Jobdate in the Job table. I have been at this for all day and can't get around it. I am still learning PHP and would surely appreciate any help I can get. My current code displays all staff members when an event is selected: //Create the day pull-down menu. $days = range (1, 31); echo "<Select Name=day Value=''><Option>Day</option>"; foreach ($days as $value) { echo '<option value="'.$value.'">'.$value.'</option>\n'; } echo "</Select>"; echo "</td><td>"; //Create the month pull-down menu echo "<Select Name=month Value=''><Option>Month</option>"; echo "<option value='01'>Jan</option>"; echo "<option value='02'>Feb</option>"; echo "<option value='03'>Mar</option>"; echo "<option value='04'>Apr</option>"; echo "<option value='05'>May</option>"; echo "<option value='06'>Jun</option>"; echo "<option value='07'>Jul</option>"; echo "<option value='08'>Aug</option>"; echo "<option value='09'>Sep</option>"; echo "<option value='10'>Oct</option>"; echo "<option value='11'>Nov</option>"; echo "<option value='12'>Dec</option>"; echo "</select>"; echo "</td><td>"; //Create the year pull-down menu $currentYear = date ("Y"); $years = range ($currentYear, 2020); echo "<Select Name=year Value=''><Option>Year</option>"; foreach ($years as $value) { echo '<option value="'.$value.'">'.$value.'</option>\n'; } echo "</Select>"; echo "</td></tr></table>"; echo "</td><td>"; //echo "<img src='../ETMSimages/etms_staff.png'</img></td><td>"; //construct the available staff list $staffsql = "SELECT StaffId, LastName, FirstName FROM Staff order by StaffId"; $staffResult = mysql_query($staffsql); if ($staffResult){ echo "<p><table cellspacing='1' cellpadding='3'>"; echo "<th colspan=6>List of Available Staff</th>"; echo "</tr><tr><th> Select</th><th>Id</th><th></th><th>Last Name </th><th></th><th>First Name </th></tr>"; while ($staffarray = mysql_fetch_array($staffResult)) { echo "<tr onMouseOver= this.bgColor = 'red' onMouseOut =this.bgColor = 'white' bgcolor= '#FFFFFF'> <td align=center><input type='checkbox' name='selectbox[]' id='selectbox[]' value=".$staffarray['StaffId']."> </td><td align=left>".$staffarray['StaffId']." </td><td>&nbsp&nbsp</td><td align=center>".$staffarray['LastName']." </td><td>&nbsp&nbsp</td><td align=center>".$staffarray['FirstName']." </td></tr>"; } echo "</table>"; } else { echo "<br> The Staff list can not be displayed!"; } echo "</td></tr>"; echo "<tr><td></td>"; echo "<td align=center><input type='submit' name='Submit' value='Assign Staff'>&nbsp&nbsp"; echo "<input type='reset' value='Start Over'>"; echo "</td></tr>"; echo "</table>";

    Read the article

  • SQL Script To Generate a Database Dictionary **With Linked Fields**

    - by Albert
    I would like to generate a Data Dictionary for a SQL Server 2008 database that has one row for each field, and the following columns: table_name field_name data_type link_table (for when the field in question is a foreign key) link_field (for when the field in question is a foreign key) I can get the first 3 columns with something like the SQL script below...but I don't know how to get the last two columns of foreign key information. INFORMATION_SCHEMA.TABLE_CONSTRAINTS gets close, but doesn't have the data I'm looking for. Can someone help with this point? SELECT TABLE_NAME,COLUMN_NAME,DATA_TYPE FROM INFORMATION_SCHEMA.COLUMNS Secondarily if anyone has any suggestions on additional fields which would be helpful please post.

    Read the article

  • Generate all permutations with sort constraint

    - by Moos Hueting
    Hi! I have a list consisting of other lists and some zeroes, for example: x = [[1, 1, 2], [1, 1, 1, 2], [1, 1, 2], 0, 0, 0] I would like to generate all the combinations of this list while keeping the order of the inner lists unchanged, so [[1, 1, 2], 0, 0, [1, 1, 1, 2], [1, 1, 2], 0] is fine, but [[1, 1, 1, 2], [1, 1, 2], 0, 0, [1, 1, 2], 0] isn't. I've got the feeling that this should be fairly easy in Python, but I just don't see it. Could somebody help me out?

    Read the article

  • How to generate <a> tag from input fields

    - by NonProgrammer
    Using ASP.Net (in C#), I need to generate a tag that contains person's name, address, etc. I have barely any experience with ASP.NET (or .NET languages) and I am given this assignment. Could someone please guide me to correct path please? Link should look like this: https://example.com/PRR/Info/Login.aspx?SupplierId=36&RegisteredUserLogin=T000001&Mode=RegisteredLoginless&RegisteredModeFunction=AutoShowTotals&RegisteredModeFunction=AutoShowTotals&PayerCountry=FI&[email protected]&ExternalOrderId=1000123&ServiceId=286&Amount286=5000.00&PayerInfo286=T000001|10000123|type1|m&SuccessReturnURL=http://success.html&FailureReturnURL=http://failure.html&SuccessCallbackURL=http://youpay.com/p247/success.html&FailureCallbackURL=http://yourfailure.html following components/fields needs to be sent to API in order to pre-populate information for users: FirstName, LastName, SupplierID = integer, Person's userlogin (Should increment by 1. Example: person 1 = t00001. Person2 = t00002, etc.), PayerCountry, Email, amount For some reason, my management thinks that this is something a non-technical person can do! Any help would be appreciated! Thanks!

    Read the article

  • Generate MySQL data dump in SQL from PHP

    - by Álvaro G. Vicario
    I'm writing a PHP script to generate SQL dumps from my database for version control purposes. It already dumps the data structure by means of running the appropriate SHOW CREATE .... query. Now I want to dump data itself but I'm unsure about the best method. My requirements are: I need a record per row Rows must be sorted by primary key SQL must be valid and exact no matter the data type (integers, strings, binary data...) Dumps should be identical when data has not changed I can detect and run mysqldump as external command but that adds an extra system requirement and I need to parse the output in order to remove headers and footers with dump information I don't need (such as server version or dump date). I'd love to keep my script as simple as I can so it can be hold in an standalone file. What are my alternatives?

    Read the article

< Previous Page | 71 72 73 74 75 76 77 78 79 80 81 82  | Next Page >