Search Results

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

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

  • Scala create xhtml elements dynamically

    - by portoalet
    Given a String array val www = List("http://bloomberg.com", "http://marketwatch.com"); I want to dynamically generate <span id="span1">http://bloomberg.com</span> <span id="span2">http://marketwatch.com</span> def genSpan(web: String) = <span id="span1"> + web + </span>; www.map(genSpan); // How can I pass the loop index? How can I use scala map function to generate the ids (span1, span2), as 1 and 2 are the loop indexes ? Or is the only way is to use for comprehension?

    Read the article

  • How to get balanced diagrams from graphviz?

    - by user360872
    Is there a setting in graphviz to generate balanced diagrams like this: When diagram is more complex like below - it isn't balanced like that above (4 is below **). Code to generate second diagram: graph { n1 [label="+"]; n1 -- n2; n2 [label="/"]; n2 -- n3; n3 [label="*"]; n3 -- n4; n4 [label="1"]; n3 -- n5; n5 [label="2"]; n2 -- n6; n6 [label="3"]; n1 -- n7; n7 [label="**"]; n7 -- n8; n8 [label="4"]; n7 -- n9; n9 [label="5"]; }

    Read the article

  • Creating user generated reports

    - by Marquinio
    Hello Everyone, I need users to create custom reports. These users do not know any technical skills like SQL. We currently have a custom database report design. So basically whatever the user does on the GUI the application will have to generate the appropriate SQL to generate the report structure. Has anyone done this before? I know there are reporting solutions out there but we already have our own database tables for reporting. We already have a section where users can view reports displayed in HTML. Like for example if user selects a "UserID" and "Accounts" fields from GUI, how would I know that my SQL has to join the USER and ACCOUNTS table? I guess I'm just looking for some ideas to help me solve this problem. Thanks.

    Read the article

  • Visual Studio build and deploy ordering

    - by mthornal
    We have a VS 2010 solution that includes a few class library projects, a SQL Server 2008 database project and a Wix setup project. We are trying to get to a point where the following happens in the order specified: Build the class library projects and the database project Deploy the database project to generate the deploy .sql script Build the Wix setup project. The reason for the desired order is that the setup project requires the deployment .sql scripts as it will use these to generate/update the database on the machine that the msi is run. It seems that there is no way within a Visual Studio solution file to create this type of build/deploy/build order. Is this correct? Thanks

    Read the article

  • JNAerator Unnamed Union Missing in Structure

    - by Nick
    I'm trying to get JNAerator to generate some JNA backed Java code from a C shared library and everything is fine except that it failed to generate an unnamed union nested inside a structure. Example: typedef struct MY_STRUCTURE { union { My_Type1 var1; My_Type2 var2; }; }MY_STRUCTURE; If I change the header to make the union have a name it will work. But for obvious reasons I can't just change the header without breaking the shared library I'm trying to use. Any solutions other than changing the header file and shared library to named union?

    Read the article

  • Calling asynchronous methods from wcf service

    - by hima
    In my asp.net application, I am using wcf service to get all the business logic. I am using that service reference in my application to work with that. Now adding that service reference is giving another option Update service reference is giving Generate asynchronous operations. If I check the option and add the service will it generate asynchronous methods for my existing service. If so how do I use the metohd. Let me know the way for that. Thanks, Hima.

    Read the article

  • iOS enterprise program - In-house Distribution

    - by fr33d0m
    I'm development a app for iPad that will be used within the company only. As the devices that will use the app will be more than 100, the company need to join iOS enterprise program. How works the distribution for In-house distribution? I need to register all the devices to generate one Certificate for the app? Or I can generate one Certificate and the app will work on every devices? Apple need to approve the application for In-house distribution? The company's objective for distribution will be deploy the application on their website so the employees can access the web site, login, and download the app for theirs devices. There is any roles from apple that does not approve this method? What is the best method for distribution In-house app?

    Read the article

  • before_filter not inheriting from parent controller correctly?

    - by Scott
    Sorry if this may be a stupid question but I'm unable get my filters to inherit the way the Rails 3 documentation is saying it should. Specifically I have an Admin controller that was generated via: rails generate controller admin I added only a single action to the admin controller, the before filter & the private filter method class AdminController < ApplicationController before_filter require_admin_creds def index end private def require_admin_creds unless current_user && current_user.admin? flash[:error] = ... redirect_to .... end end end I next then created my nested resources under the admin section with: rails generate scaffold admin/model While my admin index is indeed getting the filter, the admin/model index (or any other actions) are not. What is happening under the hood here that I must have excluded? Thanks in advance.

    Read the article

  • Security issues in accepting passwords vs auto generating the password

    - by Vivekanand Poojari
    Hi, I am developing a console application. This application generates a self signed certificate and installs it in the current machine's certificate store. The steps invlolved are :- Generate a certificate Create a pfx file Install the pfx file For these steps i would need a password for protecting the private key and the pfx file. However these passwords are used only during the execution of the exe. Should I auto generate a password using some random number generation algorithm or accept the password as input from the user? What are the security issues involved in both the scenarios ? Thanks Vivekanand

    Read the article

  • sql: DELETE + INSERT vs UPDATE + INSERT

    - by user93422
    A similar question has been asked, but since it always depends, I'm asking for my specific situation separately. I have a web-site page that shows some data that comes from a database, and to generate the data from that database I have to do some fairly complex multiple joins queries. The data is being updated once a day (nightly). I would like to pre-generate the data for the said view to speed up the page access. For that I am creating a table that contains exact data I need. Question: for my situation, is it reasonable to do complete table wipe followed by insert? or should I do update,insert? SQL wise seems like DELETE + INSERT will be easier (it is single SQL expression). EDIT: RDBMS: MS SQL Server 2008 Ent

    Read the article

  • Asign Id's dynamically to DOM elements with javascript.

    - by jnkrois
    Hello everybody, I just have a quick question about how to generate id's on-the-fly for HTML elements. So far I've tried a few things, I started with a "for" loop, I already know how many elements I have to generate Id's for, in this case I have an "ul" with 6 "li". My "for" loop is as follows: var items = $("ul li").length; for(var i = 0; i <= items; i++){ $("ul li").attr("id", "number" + i); } "number" would be the new id concatenated with "i", so I get a different Id for each "li". As you can probably tell, this does not work, because I end up with the same Id for each "li": in this case I get <li id="number6">... </li> for all the "li" elments in the "ul". I tried a "while" loop and ".each()" with jQuery but I get the exact same thing. Any help would be appreciated.

    Read the article

  • JPA GeneratedValue with GenerationType.TABLE does a big jump after jvm restart

    - by joeduardo
    When I start my server and add an entry, the generated id will start with 1, 2, so on and so forth. After a restart, adding an entry would generate an id like 32,xxx. Another restart and adding of entry would generate an id like 65,xxx. I don't know why this is happening. Here's a snippet of the annotation I'm using for my id. I'm using Hibernate. @Id @GeneratedValue(strategy = GenerationType.TABLE) private Long id;

    Read the article

  • best way to create tables with ORM?

    - by ajsie
    assume that i start coding an application from scratch, is the best way to create tables when using an ORM (doctrine), to manually create tables in mysql and then generate models from the tables, or is it the other way around, that is to create the models in php and then generate tables from models? and if i already have a database, will the models created be optimal? cause i have heard some say that its best to create the database from scratch when using ORM, so that the relations are optimized for OOD. share your thoughts!

    Read the article

  • Generating link-time error for deprecated functions

    - by R..
    Is there a way with gcc and GNU binutils to mark some functions such that they will generate an error at link-time if used? My situation is that I have some library functions which I am not removing for the sake of compatibility with existing binaries, but I want to ensure that no newly-compiled binary tries to make use of the functions. I can't just use compile-time gcc attributes because the offending code is ignoring my headers and detecting the presence of the functions with a configure script and prototyping them itself. My goal is to generate a link-time error for the bad configure scripts so that they stop detecting the existence of the functions.

    Read the article

  • Unique number identifier generation

    - by xwrs
    I have to create logic for generation unique number identifier for records in database. id, generated in database is a separate column. At this moment, when user calls "create record" action, I save new record, get its database id, generate record number using this id, then put it to the edit form. Using this way means that all entity fields should be nullable to save record to database. I don't like this way. I know that should be better way. Is there a better practice to generate unique number identifier? What is possibility of generating non-unique random numbers? Thank you

    Read the article

  • How can I ask Hibernate to create an index on a foreign key (JoinColumn)?

    - by Kent Chen
    Hi, This is my model. class User{ @CollectionOfElements @JoinTable(name = "user_type", joinColumns = @JoinColumn(name = "user_id")) @Column(name = "type", nullable = false) private List<String> types = new ArrayList<String>(); } You can imagin there would be a table called "user_type", which has two columns, one is "user_id", the other is "type". And when I use hbm2ddl to generate the ddls, I can have this table, along with the foreign key constraint on "user_id". However, there is no index of this for this column. And I need this index. How can I let hibernate to generate this index for me? Thank you!

    Read the article

  • Private Accessor for method is not found

    - by Farinha
    I'm getting this error when generating a new unit test under Visual Studio 2010 using the context menu (right-click the method name - "Generate Unit Tests"): Private Accessor for methodName is not found. Please rebuild the containing project or run the Publicize.exe manually. The method is public (checked that by applying applying a filter to not show non-public methods in the "Generate Unit Tests" dialog. Visual Studio creates some kind of .accessor file automatically. Do I need to do anything in it? What else could be the problem?

    Read the article

  • Is there a way to specify java annotations in antlr grammar files?

    - by Steve B.
    I'm looking for a way to include a few additional strings in output .java files generated from antlr. Is there a comprehensive listing of available directives? For example, given parser output like this: package com.foo.bar; //<-- this can be generated with @header { .... } //antlr generated import org.antlr.runtime.*; ... //<-- is there a way to generate anything here? public class MyParser { //<--- or here? public void f1(){ ... } } Is there a way to generate strings that appear after the import statements (e.g. class-level annotations) or possibly method annotations?

    Read the article

  • How can I delete a file in Sinatra after it has been sent via send_file?

    - by John Reilly
    I have a simple sinatra application that needs to generate a file (via an external process), send that file to the browser, and finally, delete the file from the filesystem. Something along these lines: class MyApp < Sinatra::Base get '/generate-file' do # calls out to an external process, # and returns the path to the generated file file_path = generate_the_file() # send the file to the browser send_file(file_path) # remove the generated file, so we don't # completely fill up the filesystem. File.delete(file_path) # File.delete is never called. end end It seems, however, that the send_file call completes the request, and any code after it does not get run. Is there some way to ensure that the generated file is cleaned up after it has been successfully sent to the browser? Or will I need to resort to a cron job running a cleanup script on some interval?

    Read the article

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