Search Results

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

Page 71/316 | < Previous Page | 67 68 69 70 71 72 73 74 75 76 77 78  | Next Page >

  • why javascript can not read the cookie in asp.net ?

    - by MemoryLeak
    I want to read the sessionid in cookie which is automatically generated by asp.net. such as ASP.NET_SessionId. but when i use javascript: document.cookie = "ASP.NET_SessionId=;" since i want to set the ASP.NET_SessionId to be empty. but after the javascript executed, i found instead of change the ASP.NET_SessionId to empty, system generate a new cookie with ASP.NET_SessionId equal to empty. why system not modify the cookie but generate a new one ? Thanks!

    Read the article

  • How to model my database when using entity framework 4?

    - by Junior Ewing
    Trying to wrap my head around the best approach in modelling a database when we are using Entity Framework 4 as the ORM layer. We are going to use asp.net mvc 2 for the application. Is it worth trying to model using the class diagram modeller that comes with Visual Studio 2010 where you graphically configure your models into the EDMX file and then generate out the database structure? I have run into a bunch of non trivial issues and for complex many to many mappings or multi primary key entities the answer is not that obvious even after poking around a while with the tools. I figure its easy at this point to give up and start modelling the DB using real, working DB modelling tools and then try to generate out the EDMX from the database, rather than trying to do the model first approach.

    Read the article

  • OOWrite is to LaTeX as OODraw is to?

    - by grimborg
    I'm looking for a tool to nicely generate single-page PDFs. My needs are: Able to put a PDF/EPS/... as a background Absolute positioning Able to define tables, lists Able to rotate blocks Reasonably easy syntax (will be used to automatically generate many similar looking documents) Easily usable from Python Free or very cheap In essence I'm looking for the tool X that is to OODraw/CorelDraw/... as LaTeX is to OOWrite/MS Word. I've looked at webkit2pdf and a headless OODraw, but both seem a bit of an overkill. XML-FO has some limitations such as not being able to predict how many pages your document spans. Reportlab is pricey. Any ideas? Thanks!

    Read the article

  • XSD generation from a MS SQL database using schemas

    - by madprog
    I'm willing to use NDbUnit on a MS SQL database which uses schemas. I have to generate the XSD schema from the database. Visual Studio has a tool to do that, but Visual Studio 2005 doesn't include the schema information in the generated XSD. Therefore, NDbUnit fails because the generated SQL queries do not match the database. Worse, when I try to use Proteus, the XSD schema doesn't validate against the database, and Proteus fails with a warning telling that data could be lost if this check was skipped. So, my question is: is there any tool that would generate my XSD schema properly and from the database information?

    Read the article

  • How to set parameters in Python zlib module

    - by fagricipni
    I want to write a Python program that makes PNG files. My big problem is with generating the CRC and the data in the IDAT chunk. Python 2.6.4 does have a zlib module, but there are extra settings needed. The PNG specification REQUIRES the IDAT data to be compressed with zlib's deflate method with a window size of 32768 bytes, but I can't find how to set those parameters in the Python zlib module. As for the CRC for each chunk, the zlib module documentation indicates that it contains a CRC function. I believe that calling that CRC function as crc32(data,-1) will generate the CRC that I need, though if necessary I can translate the C code given in the PNG specification. Note that I can generate the rest of the PNG file and the data that is to be compressed for the IDAT chunk, I just don't know how to properly compress the image data for the IDAT chunk after implementing the initial filtering step.

    Read the article

  • how to pass parameters to a URL and get the generated image

    - by Nubkadiya
    i want o pass several parameters to this url and generate the map from it and show it in my java application. i know the code to download the image and show it in the java application. i want to know how to pass parameters to this address "http://maps.google.com/maps/api/staticmap?center=Nugegoda&zoom=14&size=1000x312&maptype=roadmap&markers=color:blue|label:S|size=tiny|Mirihana\&markers=size:mid|color:0xFFFF00|label:C|Udahamulla&sensor=false " in this link Nugegoda and Mirihana and Udahamulla is the one that i should pass from the application. and then it will generate a image and i do need to show it. even if u check this link. its a image. can someone help me

    Read the article

  • How to do steps of an API through CLI

    - by Dolphin
    I'm using Audiveris API to generate xml(MusicXML) file once the sheetmusic(e.g. pdf/img file) is being input (i.e. When I give the sheet music (pdf file) location, to generate the xml file out of it (in another location)). Audiveris has its own GUI to do this. But can I do this process of sheetmusic-to-xml without using their GUI, but only from the CLI? If so how may I approach it? And also if so - is there a possibility to make it work in CLI - using Java code (say to invoke steps for API to occur in the CLI using Java Code)? I managed to open the GUI by opening the jar file from CLI. But I need to know whether there's a possibility to carry out the sheetmusic(say pdf)-to-xml process without using their GUI, but only through CLI? Greatly appreciate any help or guidance Thanks in advance

    Read the article

  • How do I programmatically translate a LINQ query to readable English text that correctly describes t

    - by eniac
    I am working on a project that uses Albahari's PredicateBuilder library http://www.albahari.com/nutshell/ to create a linq expression dynamically at run time. I would like to find a way to translate this dynamically created linq predicate of type Expression<Func<T, bool>> into a readable english statement at runtime. I'll give a statically created linq statement as an example: from p in Purchases select p where p.Price 100 && p.Description != "Bike". For this linq statement I would want to dynamically generate at runtime an english description along the lines of: "You are searching for purchases where the price is greater than 100 and the description is not bike". Are there any libraries that already exist which accomplish this goal, keep in mind I am using PredicateBuilder to dynamically generate the where predicate. If no solution exists how would you go about building a solution? Thanks!

    Read the article

  • Symfony 1.4: Is it possible to prevent escaping of a redirect URL?

    - by Tom
    Hi, If I do a redirect in action as normal: $this->redirect('@mypage?apple=1&banana=2&orange=3'); ... Symfony produces the correct URL: /something/something?apple=1&banana=2&orange=3 However, the following gets escaped for some bizarre reason: $string = 'apple=1&banana=2&orange=3'; $this->redirect('@mypage?'.$string); ... and the following URL is produced: /something/something?apple=1&amp;banana=2&amp;orange=3 Is there a way to avoid this escaping and have the ampersands appear correctly in the URL? I've tried everything I can think of and it's driving me mad. I need this for a situation where I'm pulling a saved query as a string from the database and would just like to latch it onto the URL. I'm aware that I could generate an array from the string and then generate a brand new URL from the array, but it just seems like a lot of overhead because of this silly escaping. Thanks.

    Read the article

  • why is internet explorer displaying my javascript pagination backwards?

    - by user278457
    Here's a version of the code I'm using, stripped down to just the parts that aren't working. This is all written to generate some basic pagination with jQuery. In Chrome/Safari/Moz, I generate see spans, 1,2,3,4,...,etc When I look in IE7/8, I see etc,...,4,3,2,1 The string seems to be concatenating backwards!! This seems very strange to me, because there's not a whole lot going on in the code here, I can't figure out which bit could be causing problems. Obviously, the 1,2,3,4,...,etc is what I'm aiming for here, so as well as an explanation of why this is an issue, I'd love it if someone could offer a quick fix. myVar = { arr:$.makeArray($('.my_li')) }; var str; str=''; for (s in myVar.arr){ r=parseInt(s,10)+1; str+='<span class="my_class">'+r+'</span>'; } $('#my_other_div').html(str);

    Read the article

  • How can I save the schema of a SQL Database to a file?

    - by Eric
    I'm writing a software application in C#.Net that connects to a SQL Server database. My C# project is under SVN version control, but I'd like to include my database schema in the SVN repository as well. An answer to a previous question of mine suggested storing the scripts to generate the database in version control. Is there a way to automatically generate these scripts from an existing database? I'm very new to SQL Server, but I noticed in management studio that the SQL commands to create a table can be generated automatically by right clicking on the table and clicking "Script Table As". Is there an equivalent command that would work with the entire database?

    Read the article

  • Can I combine atom feeds from separate resources into one?

    - by stephemurdoch
    I have two resources for which I would like to generate feeds; they are called podcasts and posts. The problem is that when I include the auto_discovery_link in my templates, I have to add one for each of the two atom feeds that I've generated. The reason why this is a problem is that there are now two feeds for users to choose from, and most people probably won't realise that they need both so will only pick one. Is there a way to combine atom feeds from different resources into one atom feed? Like application.atom or something? I'm using builder to generate the feed.

    Read the article

  • Can I combine atom feeds from seperate resources into one?

    - by stephemurdoch
    I have two resource for which I would like to generate feeds; they are called podcasts and posts. The problem is that when I include the auto_discovery_link in my templates, I have to add one for each of the two atom feeds that I've generated. The reason why this is a problem is that there are now two feeds for users to choose from, and most people probably won't realise that they need both so will only pick one. Is there a way to combine atom feeds from different resources into one atom feed? Like application.atom or something? I'm using builder to generate the feed.

    Read the article

  • Group by date range on weeks/months interval

    - by khelll
    I'm using MySQL and I have the following table: | clicks | int | | day | date | I want to be able to generate reports like this, where periods are done in the last 4 weeks: | period | clicks | | 1/7 - 7/5 | 1000 | | 25/6 - 31/7 | .... | | 18/6 - 24/6 | .... | | 12/6 - 18/6 | .... | or in the last 3 months: | period | clicks | | July | .... | | June | .... | | April | .... | Any ideas how to make select queries that can generate the equivalent date range and clicks count?

    Read the article

  • Reporting on release changes when using JIRA, Ivy and SVN

    - by HaveAGuess
    Hey guys, We have an Ivy release procedure where resolve our dependancies using Ivy pre-tagging which means that we can pull in changes for releases by other members of the team that we are not expecting We want to generate reports and track changes to dependancies between releases but there doesn't seem to be an easy way of doing this without a significant effort. We also want to generate a JIRA list of all changes not only in the main project but in dependancies that we own. This is an extension of the problem above. Otherwise we simply don't know what we are releasing - any ideas?!

    Read the article

  • Is this a legitimate implementation of a 'remember me' function for my web app?

    - by user246114
    Hi, I'm trying to add a "remember me" feature to my web app to let a user stay logged in between browser restarts. I think I got the bulk of it. I'm using google app engine for the backend which lets me use java servlets. Here is some pseudo-code to demo: public class MyServlet { public void handleRequest() { if (getThreadLocalRequest().getSession().getAttribute("user") != null) { // User already has session running for them. } else { // No session, but check if they chose 'remember me' during // their initial login, if so we can have them 'auto log in' // now. Cookie[] cookies = getThreadLocalRequest().getCookies(); if (cookies.find("rememberMePlz").exists()) { // The value of this cookie is the cookie id, which is a // unique string that is in no way based upon the user's // name/email/id, and is hard to randomly generate. String cookieid = cookies.find("rememberMePlz").value(); // Get the user object associated with this cookie id from // the data store, would probably be a two-step process like: // // select * from cookies where cookieid = 'cookieid'; // select * from users where userid = 'userid fetched from above select'; User user = DataStore.getUserByCookieId(cookieid); if (user != null) { // Start session for them. getThreadLocalRequest().getSession() .setAttribute("user", user); } else { // Either couldn't find a matching cookie with the // supplied id, or maybe we expired the cookie on // our side or blocked it. } } } } } // On first login, if user wanted us to remember them, we'd generate // an instance of this object for them in the data store. We send the // cookieid value down to the client and they persist it on their side // in the "rememberMePlz" cookie. public class CookieLong { private String mCookieId; private String mUserId; private long mExpirationDate; } Alright, this all makes sense. The only frightening thing is what happens if someone finds out the value of the cookie? A malicious individual could set that cookie in their browser and access my site, and essentially be logged in as the user associated with it! On the same note, I guess this is why the cookie ids must be difficult to randomly generate, because a malicious user doesn't have to steal someone's cookie - they could just randomly assign cookie values and start logging in as whichever user happens to be associated with that cookie, if any, right? Scary stuff, I feel like I should at least include the username in the client cookie such that when it presents itself to the server, I won't auto-login unless the username+cookieid match in the DataStore. Any comments would be great, I'm new to this and trying to figure out a best practice. I'm not writing a site which contains any sensitive personal information, but I'd like to minimize any potential for abuse all the same, Thanks

    Read the article

  • How to do steps of an API through CLI/ batch mode without GUI

    - by Dolphin
    I'm using Audiveris API to generate xml(MusicXML) file once the sheetmusic(e.g. pdf/img file) is being input (i.e. When I give the sheet music (pdf file) location, to generate the xml file out of it (in another location)). Audiveris has its own GUI to do this. But can I do this process of sheetmusic-to-xml without using their GUI, but only from the CLI? If so how may I approach it? And also if so - is there a possibility to make it work in CLI - using Java code (say to invoke steps for API to occur in the CLI using Java Code - I've heard this is possible using shell commands)? I managed to open the GUI by opening the jar file from CLI. But I need to know whether there's a possibility to carry out the entire sheetmusic(say pdf)-to-xml process without using their GUI, but only through CLI (i.e. in batch mode)? Greatly appreciate any help or guidance Thanks in advance

    Read the article

  • clarification on the concept of "web service"

    - by udit
    Im a little confused on the varying definitions and implementations of web services available as implementations. Need some clarification please. Ones I have used till now: If a vendor gives me a specific format of XML that I can send populated with data to request and I make a simple HTTP POST over the internet passing in the XML String as the payload, is this a web service call ? If so, is there a specific name to it, this kind of web service ? Because obviously, it does not use anything like Axis, WSDL or SOAP to establish this connection. A variant of this is If the vendor gives me an XSD, I use JAXB to make a java class out of it and pass in the serialized version of the object, which eventually works out to be the same as option 1. RESTful web service: Vendor gives me a URL like http://restfulservice/products and I can make HTTP Requests to the URL and depending on what HTTP verb I use, the appropropriate action is called and the response sent over the wire. Ones I have only read about\ have a vague idea about SOAP. How does this work?.. Ive read the W3Schools tutorial and I undertsand that there is a very specific form of XML that is standardized according to W3C standards that we use to pass the same kind of messages as we did in option 1. But how does this work in real life? Vendor sends me what? Do I generate classes? Do I serialize some objects and http post them over to an address? Or do the generated objects themselves have connection methods that will do them for me? What about WSDL? When does a vendor send me WSDL and what do I do with it ? I guess I can generate classes from it. If yes, then what do I do with the generated classes ? When do I need that axis jar to generate classes from something that the vendor sends ? As you can see, I have some clear and other mostly vague ideas about the different kinds of web services available. would help if someone ould clarify and\or point to more real-world resources. I've looked a little bit into Java Web Services on the internet and the numerous four letter acronyms that get thrown at me make me dizzy. Thanks

    Read the article

  • Evenly distribute items on the screen

    - by abolotnov
    I am trying to solve this little puzzle (the algorithm): I have N image icons and I want to distribute them evenly on users screen. Say, I put them in a table. If there is one image, there will be one cell in a table. If two - one row with two columns, if three - one row and three columns, if four - two rows, two columns... and so on until row space is gone and since then the table should only grow in columns without adding extra rows. I'm trying to figure an algorithm for this and perhaps this is something that has a solution already somewhere? My attempt is so far something like this: obtain_max_rows() obtain_visible_columns() if (number_of_pictures > max_rows*max_columns) { columns = roundup(number_of_pictures/max_rows) for(max_rows){generate row;for columns{generate column}} } else { **here comes to trouble...** } This logic is bit silly though - it somehow needs to think cases where there are 12 pictures on first screen and 2 on the other trying to balance it say 8/6 or somehow like that.

    Read the article

  • What tools do you use when generating markup from mockups?

    - by Paul
    So I endeavor to spend most of time on the app server side of things but time to time I need to get my hands dirty and generate markup/css/js from a wireframe or mockup. As far as tools go, Ive found browsershots and Litmus app helpful and of course, vm's as well for checking things out live in ie-{6,7,8}. Otherwise I do the heavy lifting in vim. For generating new markup thats not tied to a target design I think some of the css frameworks & tools like sass look useful but Im skeptical of their utility when needing to generate markup to match a photoshop design. So what tips / tools do you keep in your markup generating utility belt when building solid markup from designs? My list so far: Browsershots Browserlab.adobe.com Haml / Less / Sass (not used but will probably explore)

    Read the article

  • How to create a clip region from a path that includes the 'outline'?

    - by mackenir
    I am creating a rounded rectangle GraphicsPath (see red outline image below), and then using this as a clip region both when drawing graphics, and as the Region of a Form. Unfortunately, although the path looks good, it doesn't work well as a region (see solid black image below) Is there a way that I can generate a clipping region from the path that includes all the 'outline' pixels of the path? Do I need to generate a bitmap and then process this to create a region? The rounded rectangle path: When used as a clip region: The discrepancy (red pixels are in the path outline, but outside the region. blue pixels are in both):

    Read the article

  • Ruby on Rails and database associations

    - by Marco
    Hi to all, I'm new to the Ruby world, and there is something unclear to me in defining associations between models. The question is: where is the association saved? For example, if i create a Customer model by executing: generate model Customer name:string age:integer and then i create an Order model generate model Order description:text quantity:integer and then i set the association in the following way: class Customer < ActiveRecord::Base has_many :orders end class Order < ActiveRecord::Base belongs_to :customer end I think here is missing something, for example the foreign key between the two entities. How does it handle the associations created with the keywords "has_many" and "belongs_to" ? Thanks

    Read the article

  • Generating a Grid of NSTextField Objects From NSDictionary Items

    - by SteveStifler
    I'm trying to create an vocabulary study application using Obj-C and the Cocoa frameworks. I have about two week's experience in both areas and have reached an edge of my current knowledge. Here's where I'm stuck. When I press a checkbox, a corresponding plist is loaded into memory as an NSDictionary. I want to generate a "Label: Textfield" pair for each key:value pair, where the Label is the key. When the text typed into the Textfield matches the key's value, I want the Label's text to turn green. So how would I generate this grid, and once generated, how would I make the text green upon correct input? Thanks!

    Read the article

  • Django Generating RSS feed with description

    - by Issy
    Hey Guys, I am trying to generate a full rss feed, however when loading the feed in Mail, it just shows the title, with a read more link at the bottom. I have tried several different options. But none seem to work. I would like to generate the feed with a combination of several feeds in my modl. Here is the code i have tried: class LatestEvents(Feed): description_template = "events_description.html" def title(self): return "%s Events" % SITE.name def link(self): return '/events/' def items(self): events = list(Event.objects.all().order_by('-published_date')[:5]) return events author_name = 'Latest Events' def item_pubdate(self, item): return item.published_date And in my template which is stored in TEMPLATE_ROOT/feeds/ {{ obj.description|safe }} <h1>Event Location Details</h1> {{ obj.location|safe }} Even if i hard code the description it does not work.

    Read the article

< Previous Page | 67 68 69 70 71 72 73 74 75 76 77 78  | Next Page >