Search Results

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

Page 67/316 | < Previous Page | 63 64 65 66 67 68 69 70 71 72 73 74  | Next Page >

  • creating enumeration using .NET's CodeDom

    - by Manish Sinha
    Hi, I want to create an Enumeration using CodeDom API. I have searched enough on the internet and I get results which are hardly of any use. What I want to generate is public enum bug_tracker_type { [Description("Bugzilla")] Bugzilla, [Description("Debbugs")] Debbugs, [Description("PHP Project Bugtracker")] PHP_Project_Bugtracker, [Description("Google Code")] Google_Code } I used CodeTypeDeclaration and set it's IsEnum property as true, created a name, and set it's Attributes. Now the biggest problem is how to populate the body? I tried CodeTypeMember mem = new CodeTypeMember(); mem.Name = WadlSharpUtils.CreateIdentifier(discreteValue.value); mem.CustomAttributes.Add(new CodeAttributeDeclaration(discreteValue.value)); // enumCandidate is an instance of CodeTypeDeclaration enumCandidate.Members.Add(mem); Though using this solution I can generate the Description attributes, the end of line would be ; and not ,

    Read the article

  • Tweepy + App Engine Example OAuth Help

    - by Wasauce
    Hi I am trying to follow the Tweepy App Engine OAuth Example app in my app but am running into trouble. Here is a link to the tweepy example code: http://github.com/joshthecoder/tweepy-examples Specifically look at: http://github.com/joshthecoder/tweepy-examples/blob/master/appengine/oauth_example/handlers.py Here is the relevant snippet of my code [Ignore the spacing problems]: try: authurl = auth.get_authorization_url() request_token = auth.request_token db_user.token_key = request_token.key db_user.token_secret = request_token.secret db_user.put() except tweepy.TweepError, e: # Failed to get a request token self.generate('error.html', { 'error': e, }) return self.generate('signup.html', { 'authurl': authurl, 'request_token': request_token, 'request_token.key': request_token.key, 'request_token.secret': request_token.secret, }) As you can see my code is very similar to the example. However, when I compare the version of the request_token.key and request_token.secret that are rendered on my signup page (this is for the request_token.key and request_token.secret found in the datastore. Any guidance on what I am doing wrong here? Thanks! Reference Links:

    Read the article

  • Built in method to encode ampersands in urls returned from Url.Action?

    - by Blegger
    I am using Url.Action to generate a URL with two query parameters on a site that has a doctype of XHTML strict. Url.Action("ActionName", "ControllerName", new { paramA="1" paramB="2" }) generates: /ControllerName/ActionName/?paramA=1&paramB=2 but I need it to generate the url with the ampersand escaped: /ControllerName/ActionName/?paramA=1&amp;paramB=2 The fact that Url.Action is returning the URL with the ampersand not escaped breaks my HTML validation. My current solution is to just manually replace ampersand in the URL returned from Url.Action with an escaped ampersand. Is there a built in or better solution to this problem?

    Read the article

  • Shark was unable to find symbol information for this address range - iPhone

    - by Elliot
    I'm trying to use Shark to determine which method(s) are taking the most time in my iPhone app. After sampling, I get this: Clicking the "!" button yields: Shark was unable to find symbol information for this address range. Typically this happens because the application was compiled without symbols or they have been subsequently stripped away. In Xcode, make sure the "Generate Debug Symbols" checkbox is selected (passes the -g flag to the compiler). Note that this does not affect code optimization, and does not typically alter performance significantly. However, the extra symbol information does consume significantly more space and may bloat the size of the executable. But I AM using the Debug option, and I am running on my Device. And Generate Debug Symbols IS checked. So what's wrong?

    Read the article

  • Writing JSON with XSLT

    - by JP
    Hi, I'm trying to write XSLT to transform a specific web page to JSON. The following code demonstrates how Ruby would do this conversion, but the XSLT doesn't generate valid JSON (there's one too many commas inside the array) - anyone know how to write XSLT to generate valid JSON? require 'rubygems' require 'nokogiri' require 'open-uri' doc = Nokogiri::HTML(open('http://bbc.co.uk/radio1/playlist')) xslt = Nokogiri::XSLT(DATA.read) puts out = xslt.transform(doc) # Now follows the XSLT __END__ <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml"> <xsl:output method="text" encoding="UTF-8" media-type="text/plain"/> <xsl:template match="/"> [ <xsl:for-each select="//*[@id='playlist_a']//div[@class='artists_and_songs']//ul[@class='clearme']"> {'artist':'<xsl:value-of select="li[@class='artist']" />','track':'<xsl:value-of select="li[@class='song']" />'}, </xsl:for-each> ] </xsl:template> </xsl:stylesheet>

    Read the article

  • Communicating with web service on SSL

    - by Krt_Malta
    Hi, I have a web service which previously was deployed on http. I used to generate stub classes using wsimport using wsimport http://localhost:8080/MiniForumService/MiniForumService?wsdl. Now I deployed it on SSL. But when I try to generate the stub classes from it using wsimport https://localhost:8443/MiniForumService/MiniForumService?wsdl but I'm getting the following error: unable to find valid certification path to requested target I'm using a self-signed certificate on the server. How can I solve this please? I've googled about but haven't found a solution till now Thanks and regards, Krt_Malta

    Read the article

  • NetBeans 6.8/6.7 UML Class Diagrams

    - by ikurtz
    i have tried to generate Class Diagrams in NetBeans 6.7 and 6.8 but all i get is: i figured out installing UML for 6.8 here: NetBeans 6.8 UML i have followed the instructions here: UML Class diagrams i so far i failed to generate anything meaningful. i have followed the tips: Open your project, then create a new UML project (choose "Reverse Engineered Java-Platform model"). After that all your classes will be available in the UML project under "Model". You can now create a new class diagram and drag your classes from "Model" onto the diagram. but nothing meaningful happens when i drag my classes to the Class Diagrams. it always represents the classes as "datatype" on the diagram and class info is not displayed. any helpful tips regarding how can i fix this? or another way of generating Java class diagrams? thank you for your time.

    Read the article

  • Monotouch - ICSharpCode.SharpZipLib giving an error

    - by Claudio
    Hy guys, I'm trying to generate a Zip File with ICSharpCode.SharpZipLib library but it's throwing a really weird error. Code: public static void ZipFiles(string inputFolderPath, string outputPathAndFile, string password) { ArrayList ar = GenerateFileList(inputFolderPath); // generate file list int TrimLength = (Directory.GetParent(inputFolderPath)).ToString().Length; TrimLength += 1; //remove '\' FileStream ostream; byte[] obuffer; ZipOutputStream oZipStream = new ZipOutputStream(File.Create(outputPathAndFile)); // create zip stream if (password != null && password != String.Empty) oZipStream.Password = password; oZipStream.SetLevel(9); // maximum compression ZipEntry oZipEntry; foreach (string Fil in ar) // for each file, generate a zipentry { oZipEntry = new ZipEntry(Fil.Remove(0, TrimLength)); oZipStream.PutNextEntry(oZipEntry); if (!Fil.EndsWith(@"/")) // if a file ends with '/' its a directory { ostream = File.OpenRead(Fil); obuffer = new byte[ostream.Length]; ostream.Read(obuffer, 0, obuffer.Length); oZipStream.Write(obuffer, 0, obuffer.Length); } } oZipStream.Finish(); oZipStream.Close(); } private static ArrayList GenerateFileList(string Dir) { ArrayList fils = new ArrayList(); bool Empty = true; foreach (string file in Directory.GetFiles(Dir,"*.xml")) // add each file in directory { fils.Add(file); Empty = false; } if (Empty) { if (Directory.GetDirectories(Dir).Length == 0) // if directory is completely empty, add it { fils.Add(Dir + @"/"); } } foreach (string dirs in Directory.GetDirectories(Dir)) // recursive { foreach (object obj in GenerateFileList(dirs)) { fils.Add(obj); } } return fils; // return file list } Error: Unhandled Exception: System.NotSupportedException: CodePage 437 not supported at System.Text.Encoding.GetEncoding (Int32 codepage) [0x00000] in <filename unknown>:0 at ICSharpCode.SharpZipLib.Zip.ZipConstants.ConvertToArray (System.String str) [0x00000] in <filename unknown>:0 at ICSharpCode.SharpZipLib.Zip.ZipConstants.ConvertToArray (Int32 flags, System.String str) [0x00000] in <filename unknown>:0 at ICSharpCode.SharpZipLib.Zip.ZipOutputStream.PutNextEntry (ICSharpCode.SharpZipLib.Zip.ZipEntry entry) [0x00000] in <filename unknown>:0 at WpfPrototype1.MainInvoicesView.ZipFiles (System.String inputFolderPath, System.String outputPathAndFile, System.String password) [0x00000] in <filename unknown>:0 at WpfPrototype1.MainInvoicesView.<ViewDidLoad>m__6 (System.Object , System.EventArgs ) [0x00000] in <filename unknown>:0 at MonoTouch.UIKit.UIControlEventProxy.Activated () [0x00000] in <filename unknown>:0 at (wrapper managed-to-native) MonoTouch.UIKit.UIApplication:UIApplicationMain (int,string[],intptr,intptr) at MonoTouch.UIKit.UIApplication.Main (System.String[] args, System.String principalClassName, System.String delegateClassName) [0x00000] in <filename unknown>:0 at MonoTouch.UIKit.UIApplication.Main (System.String[] args) [0x00000] in <filename unknown>:0 at WpfPrototype1.Application.Main (System.String[] args) [0x00000] in <filename unknown>:0 How can I make this code support CodePage 437? Regards, Claudio

    Read the article

  • Invoking active_record error - can not load file in Ruby on Rails

    - by user1623624
    When I try to run rails generate scaffold test the following error always shows C:\Lab\railapps\dbtest>rails generate scaffold test invoke active_record C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:251:in `require': Please install the oracle_enhanced_adapter: `gem install activerecord-oracle_enhanced-adapter` (cannot load such file -- active_record/connection_adapters/oracle_enhanced_adapter) (LoadError) from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:251:in `block in require'" I did install gem oci8 then activerecord-oracle-enhanced-adapter. Can you help me by having a look? Thanks a lot. Version information C:\Lab\railapps\dbtest>gem list ruby-oci8 *** LOCAL GEMS *** ruby-oci8 (2.1.2 ruby x86-mingw32, 2.0.6) C:\Lab\railapps\dbtestgem list activerecord-oracle_enhanced-adapter *** LOCAL GEMS *** activerecord-oracle_enhanced-adapter (1.4.1) database.yml under configure development: adapter: oracle_enhanced database: cvrman.cablevision.com username: ruby password: ruby

    Read the article

  • Exporting a report from Crystal 8.5 causes the report to first refresh, then export, with unexpected

    - by LittleBobbyTables
    We have a VB6 application that can generate reports using the Crystal Reports 8.5 runtime. To generate one of the more complicated reports we have, the VB app does the following: Deletes records from a SQL table (we'll call it Foo) based on the session ID of the user Performs a select statement, and populates the Foo table with the contents of the select statement. Massages the data in Foo. Executes the report (we'll call it Bar). The Bar report uses the Foo table as part of some outer joins to get some descriptions. After the report is opened and populated, the code then deletes the records in Foo. If you ever look in Foo there will be no data since it is always purged at the end, but the Crystal Report will still have the data, since Foo wasn't cleared out until after the report ran. Most sites can export this report afterwards, to either PDF or Excel, with no issue. One site, however, has two servers in production where if you attempt to export the Bar report (doesn't matter what format it is exported to), the report will visibly refresh and then export the report in the requested format. This refresh, however, causes the exported data to be invalid because the report is still doing the outer joins to the Foo table, which is now empty. I'm at a total loss why the report refreshes before printing on these two servers. One server has Crystal Reports 8.5 installed on it as well as the Crystal Reports 8.5 runtime (so they can modify reports). The other server only has the Crystal Reports 8.5 runtime (so you can generate reports from the VB application, but can't modify them on that server). Both of the servers belong to a French site. Another support staff here said the issue sounded vaguely familiar to an issue a few years ago, and suggested re-registering DLLs. I have tried unregistering and re-registering the following DLLs out of frustration: Crystl32.ocx crxlat32.dll cpeau32.dll exportmodeller.dll crtslv.dll atl.dll Unregistering and re-registering the above DLLs does not fix the issue. If we take the problem report, and run it on any of our development or QA servers, we have no issues; the report does NOT refresh before exporting, and the data looks consistent. It seems like a server or regional setting may be causing this, but what could possibly cause the report to refresh before exporting on only two of our servers? The most obvious solution is to simply alter the code so the Foo table isn't purged after the report is run, only when the report is run, but this is a production issue, the customer wants a fix now, and there's quite a few hoops to jump through to make the change.

    Read the article

  • handle SIGSEGV in Linux?

    - by user303967
    Hi all, I need handle the SIGSEGV in my Linux app. The reason is some clean up(3-partry lib) must be done before generate core-dump. What is more, the clean up must be performed in the context of calling thread, cannot do in signal handler. So I plan in signal handler to pass the control to the calling thread, after the clean up finished, then use raise(SIGSEGV) to generate the core-dump. The real problem seems the signal_handler cannot pass the control to calling thread, no matter I use post_sem or some others. Any idea to handle this case? Possbile to hijack the SIGSEGV, then in SIGSEGV hander return to another thread to perform some clean up? signal(SIGSEGV, signal_handler); signal_handler() { ... post_sem(); ... } calling thread() { wait_sem(); clean_up(); ... }

    Read the article

  • 2 AudioQueue questions

    - by iter
    I am learning to use AudioQueue. I wish to generate an audio stream programmatically. I have 2 issues that I cannot account for. I am getting audio when I run in the simulator, but not on an iPhone. (Other apps do produce sound on the phone). I get about 20ms-long gaps of silence between buffers. In my testing, I generate an audio buffer on startup and repeatedly enqueue it without modification. I don't spend any processing on filling audio buffers at runtime, not even copying them. Ari.

    Read the article

  • How to create Encryption Key for Encryption Algorithms?

    - by Akash Kava
    I want to use encryption algorithm available in .Net Security namespace, however I am trying to understand how to generate the key, for example AES algorithm needs 256 bits, that 16 bytes key, and some initialization vector, which is also few bytes. Can I use any combination of values in my Key and IV? e.g. all zeros in Key and IV are valid or not? I know the detail of algorithm which does lots of xors, so zero wont serve any good, but are there any restrictions by these algorithms? Or Do I have to generate the key using some program and save it permanently somewhere?

    Read the article

  • Programatically Create Controller in Rails

    - by Trey Bean
    What's the best way to dynamically create a controller in Rails. I've got a class that needs to generate a bunch of controller that inherit from it. I could just create a bunch of files in /app/controllers, but they'd all be basically empty files. There's got to be a way to generate these classes dynamically and have them treated like other controllers in Rails, e.g. reloaded correctly in dev mode. I tried putting this in a config/initializer: FL.contact_types.each do |contact_type| controller_name = "#{contact_type.pluralize}Controller" Object.const_set(controller_name.to_sym, Class.new(ContactsController)) unless Object.const_defined?(controller_name.to_sym) end This worked, but I run into the dependency/reload problem and get “A copy of AuthenticatedSystem has been removed from the module tree but is still active” since the ContactsController inherits from ApplicationController which includes AuthenticatedSystem. Is creating a bunch of empty files really the best solution?

    Read the article

  • slsvcutil.exe Proxy and Interfaces

    - by JPM
    Is it possible when using slsvcutil.exe to generate a proxy through the command line not to have the proxy file output the Interface in an Asynchronous fashion. For example, if I have a function "foo()" on the serverside in the Interface, when I generate the proxy using Slsvcutil.exe, it makes two functions in the interface definition in the proxy named "BeginFoo()" and "EndFoo()". All I want is "Foo()", I don't need the other two methods. Is this possible? I'm using the proxy with Monotouch which is why I need to use Slsvcutil.exe but don't need the Asynchronous methods. Thanks!

    Read the article

  • bypass IIS xml file settings at file/folder level

    - by Matt Thrower
    Hi, Our site is currently set to pass all files with the xml file extension through the asp.net worker process because all the xml files on the site at the moment are generated dynamically on being hit, by writing the output directly into the response stream. However we now have a requirement to add a file which is much larger and takes several minutes to generate in this way. I wrote a console app to generate the file and set it to run nightly, but because of the global IIS setting directing xml files to run through asp_wp, it's not being served properly. I can't seem to find a way to make an exemption for the treatment of a single file in the IIS settings. Is there any other way we can do it? Cheers, Matt

    Read the article

  • Make compiler copy characters using movsd

    - by Suma
    I would like to copy a relatively short sequence of memory (less than 1 KB, typically 2-200 bytes) in a time critical function. The best code for this on CPU side seems to be rep movsd. However I somehow cannot make my compiler to generate this code. I hoped (and I vaguely remember seeing so) using memcpy would do this using compiler built-in instrinsic, but based on disassembly and debugging it seems compiler is using call to memcpy/memmove library implementation instead. I also hoped the compiler might be smart enough to recognize following loop and use rep movsd on its own, but it seems it does not. char *dst; const char *src; // ... for (int r=size; --r>=0; ) *dst++ = *src++; Is there some way to make the Visual Studio compiler to generate rep movsd sequence other than using inline assembly?

    Read the article

  • What is ltmain.sh, and why does automake say it is missing? What is a good auto (make/conf/etc) gene

    - by gersh
    I just want to develop a C app in linux with the auto(make/conf/...) stuff automatically generated. I tried generating it with ede and anjuta, but it doesn't seem to generate Makefile.am. So, I tried running automake, and it says "ltmain.sh" isn't found. Is there some easy to generate the basic build files for linux C/C++ apps. What is the standard practice? Do most people write these files themselves?

    Read the article

  • Nagios - Custom Report Generation

    - by Naveen
    Hi, I want to generate a custom report in "Nagios-3.2.0". I have defined the work-hours in "timeperiods.cfg" as follows: 'workhours' timeperiod definition define timeperiod { timeperiod_name 0800-2000 alias full time monday 08:00-20:00 tuesday 08:00-20:00 wednesday 08:00-20:00 thursday 08:00-20:00 friday 08:00-20:00 saturday 08:00-20:00 } Now, if I replace "saturday" with "2010-03-27" or "march 27" as shown below: 'workhours' timeperiod definition define timeperiod { timeperiod_name 0800-2000 alias full time monday 08:00-20:00 tuesday 08:00-20:00 wednesday 08:00-20:00 thursday 08:00-20:00 friday 08:00-20:00 2010-03-27 08:00-20:00 } Nagios is not generating report for the given date (2010-03-27). How can I modify "timeperiods.cfg" so that I can generate reports for the given dates ?

    Read the article

  • Java or php tree structure problem

    - by agazerboy
    Hi All, I have all my data in my database. It has following 4 columns id source_clust target_clust result_clust 1 7 72 649 2 9 572 650 3 649 454 651 4 32 650 435 This data is like tree structure. source_clust and target_clust generate target_clust. target_clust can be source_clust or target_clust to make a new target_clust. Is there any php function or class that I can use to generate tree structure for my data???? I see this MySql site they are doing exactly what I need but I couldn't find how to implement that query in my data. Thanks ! Edited Is there any way in java to do it? if we have same data in array ??

    Read the article

< Previous Page | 63 64 65 66 67 68 69 70 71 72 73 74  | Next Page >