Search Results

Search found 12043 results on 482 pages for 'dynamically generated'.

Page 2/482 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • How to give highest priority to events generated from main thread than those generated from secondar

    - by martjno
    I have a c++ application written in wxWidgets, which has a main thread (GUI) and a working thread (calculations). The working thread executes commands requested by the main thread and communicates the result to the main thread posting an event after every step of the processing. The problem is that when the working thread is sending many events consecutively, the gui requests made by the user (i.e. interrupt the processing clicking a button) won't be processed by the event handler until the working thread has finished. This is actually happening on OSX, on Windows it works perfectly. I've tried to wxThread::SetPriority and wxThread::Yield but nothing changes. It is working if I put wxThread::Sleep in the working thread, but this slows down very much the processing.

    Read the article

  • dynamically include zipfilesets into a WAR

    - by Konstantin
    hi all - a bit of clumsy situation but for the moment we cannot migrate to more straight-forward project layout. We have a project called myServices and it has 2 source folders (yes, I know, but that's the way it is for now) - I'm trying to make build process a bit more flexible so we now have a property called artifact.names that will be parsed by generic build.xml and based on name, it will call either jar or war task, eg. myService-war will create a WAR file with the following zipfilesets included there: myService-war-classes, myService-war-web-inf, myService-war-meta-inf. I want to add a bit more flexibility, and allow having additional zipfilesets, eg. myService-war-etc-1,2 etc - so these will be picked up by the package target automatically. I cannot use "if" inside war target, and also ${ant.refid:myService-war-classes} property is not resolved, so I'm kind of stuck at the moment with my options - how do I dynamically include a zipfileset into a WAR? You can refer to fileset by id, but it MUST be defined then, eg. you can't have it optional on project level. Thank you. Some build.xml snippets: <target name="archive"> <for list="${artifact.names}" param="artifact"> <sequential> <echo>Packaging artifact @{artifact} of project ${project.name}</echo> <property name="display.@{artifact}.packaging" refid="@{artifact}.packaging" /> <echo>${display.@{artifact}.packaging}</echo> <propertyregex property="@{artifact}.archive.type" input="@{artifact}" regexp="([a-zA-Z0-9]*)(\-)([ejw]ar)" select="\3" casesensitive="false"/> <propertyregex property="@{artifact}.base.name" input="@{artifact}" regexp="([a-zA-Z0-9]*)(\-)([ejw]ar)" select="\1" casesensitive="false"/> <echo>${@{artifact}.archive.type}</echo> <if> <then> <war destfile="${jar.dir}/${@{artifact}.base.name}.war" compress="true" needxmlfile="false"> <resources refid="@{artifact}.packaging" /> <zipfileset refid="@{artifact}-classes" erroronmissingdir="false" /> <zipfileset refid="@{artifact}-meta-inf" erroronmissingdir="false" /> <zipfileset refid="@{artifact}-web-inf" erroronmissingdir="false" /> <!-- Additional zipfilesets to package --> <zipfileset refid="@{artifact}-etc-2" erroronmissingdir="false" /> <zipfileset refid="@{artifact}-etc-3" erroronmissingdir="false" /> <zipfileset refid="@{artifact}-etc-4" erroronmissingdir="false" /> <zipfileset refid="@{artifact}-etc-5" erroronmissingdir="false" /> <zipfileset refid="@{artifact}-etc-6" erroronmissingdir="false" /> <zipfileset refid="@{artifact}-etc-7" erroronmissingdir="false" /> <zipfileset refid="@{artifact}-etc-8" erroronmissingdir="false" /> <zipfileset refid="@{artifact}-etc-9" erroronmissingdir="false" /> <zipfileset refid="@{artifact}-etc-10" erroronmissingdir="false" /> </war> </then> <!-- Generic JAR packaging --> <else> <jar destfile="${jar.dir}/@{artifact}.jar" compress="true"> <resources refid="@{artifact}.packaging" /> <zipfileset refid="@{artifact}-meta-inf" erroronmissingdir="false" /> </jar> </else> </if> </sequential> </for> </target>

    Read the article

  • Debugging dynamically added Javascript code

    - by gilm
    One of the programmers I worked with has something similar in code: var head = document.getElementsByTagName("head")[0]; var e = document.createElement("script"); e.type = "text/javascript"; var b = "function moo() { alert('hello'); }"; e.appendChild(document.createTextNode(b)); head.appendChild(e); moo(); This is all good and dandy, but I would like to step into moo(), and firebug just can't do that. I know I can rip the whole thing apart, but I reallllly don't want to touch it and his code works :) Any ideas how I can debug this with Firebug? Cheers

    Read the article

  • Dynamically adding meta tags using php

    - by rekhasathvika
    Hi, In my site I have a list of categories and I have to put meta keywords and description for them.I have a single page where I will retrieve the categories from the database. Can anyone tell me how to make this much simpler to put meta tags for all the categories. Regards, Rekha http://hiox.org

    Read the article

  • dynamically create sitemap xml using php

    - by rekhasathvika
    Hi, I have created sitemap for my site using some reference code in the below link http://stackoverflow.com/questions/2747801/creating-an-xml-sitemap-with-php But I am getting error as XML Parsing Error: undefined entity Location: as my content is as follows << alt attribute and it says something like < loc http://www.example.com/700- & laquo;alt & raquo;-attributes-in-images.php< /loc Can anyone tell me how to get rid of this error.

    Read the article

  • Loading Views dynamically

    - by Dann
    Case 1: I have created View-based sample application and tried execute below code. When I press on "Job List" button it should load another view having "Back Btn" on it. In test function, if I use [self.navigationController pushViewController:jbc animated:YES]; nothing gets loaded, but if I use [self presentModalViewController:jbc animated:YES]; it loads another view haveing "Back Btn" on it. Case 2: I did create another Navigation Based Applicaton and used [self.navigationController pushViewController:jbc animated:YES]; it worked as I wanted. Can someone please explain why it was not working in Case 1. Does it has something to do with type of project that is selected? @interface MWViewController : UIViewController { } -(void) test; @end @interface JobViewCtrl : UIViewController { } @end @implementation MWViewController (void)viewDidLoad { UIButton* btn = [UIButton buttonWithType:UIButtonTypeRoundedRect]; btn.frame = CGRectMake(80, 170, 150, 35); [btn setTitle:@"Job List!" forState:UIControlStateNormal]; [btn addTarget:self action:@selector(test) forControlEvents:UIControlEventTouchUpInside]; [self.view addSubview:btn]; [super viewDidLoad]; } -(void) test { JobViewCtrl* jbc = [[JobViewCtrl alloc] init]; [self.navigationController pushViewController:jbc animated:YES]; //[self presentModalViewController:jbc animated:YES]; [jbc release]; } (void)dealloc { [super dealloc]; } @end @implementation JobViewCtrl -(void) loadView { self.view = [[UIView alloc] initWithFrame:[[UIScreen mainScreen] applicationFrame]]; self.view.backgroundColor = [UIColor grayColor]; UIButton* btn = [UIButton buttonWithType:UIButtonTypeRoundedRect]; btn.frame = CGRectMake(80, 170, 150, 35); [btn setTitle:@"Back Btn!" forState:UIControlStateNormal]; [self.view addSubview:btn]; } @end

    Read the article

  • WPF - Dynamically access a specific item of a collection in XAML

    - by Andy T
    Hi, I have a data source ('SampleAppearanceDefinitions'), which holds a single collection ('Definitions'). Each item in the collection has several properties, including Color, which is what I'm interested in here. I want, in XAML, to display the Color of a particular item in the collection as text. I can do this just fine using this code below... Text="{Binding Source={StaticResource SampleAppearanceDefinitions}, Path=Definitions[0].Color}" The only problem is, this requires me to hard-code the index of the item in the Definitions collection (I've used 0 in the example above). What I want to do in fact is to get that value from a property in my current DataContext ('AppearanceID'). One might imagine the correct code to look like this.... Text="{Binding Source={StaticResource SampleAppearanceDefinitions}, Path=Definitions[{Binding AppearanceID}].Color}" ...but of course, this is wrong. Can anyone tell me what the correct way to do this is? Is it possible in XAML only? It feels like it ought to be, but I can't work out or find how to do it. Any help would be greatly appreciated! Thanks! AT

    Read the article

  • Create controls dynamically

    - by Afnan
    I want to know if this is possible in c# winform. create control when ever button is pressed and place it at given location. I think it is possible like this private TextBox txtBox = new TextBox(); private Button btnAdd = new Button(); private ListBox lstBox = new ListBox(); private CheckBox chkBox = new CheckBox(); private Label lblCount = new Label(); but the problem lies when ever button is pressed same name controls are created.How to avoid that

    Read the article

  • Access cost of dynamically created objects with dynamically allocated members

    - by user343547
    I'm building an application which will have dynamic allocated objects of type A each with a dynamically allocated member (v) similar to the below class class A { int a; int b; int* v; }; where: The memory for v will be allocated in the constructor. v will be allocated once when an object of type A is created and will never need to be resized. The size of v will vary across all instances of A. The application will potentially have a huge number of such objects and mostly need to stream a large number of these objects through the CPU but only need to perform very simple computations on the members variables. Could having v dynamically allocated could mean that an instance of A and its member v are not located together in memory? What tools and techniques can be used to test if this fragmentation is a performance bottleneck? If such fragmentation is a performance issue, are there any techniques that could allow A and v to allocated in a continuous region of memory? Or are there any techniques to aid memory access such as pre-fetching scheme? for example get an object of type A operate on the other member variables whilst pre-fetching v. If the size of v or an acceptable maximum size could be known at compile time would replacing v with a fixed sized array like int v[max_length] lead to better performance? The target platforms are standard desktop machines with x86/AMD64 processors, Windows or Linux OSes and compiled using either GCC or MSVC compilers.

    Read the article

  • Adding Attributes to Generated Classes

    ASP.NET MVC 2 adds support for data annotations, implemented via attributes on your model classes.  Depending on your design, you may be using an OR/M tool like Entity Framework or LINQ-to-SQL to generate your entity classes, and you may further be using these entities directly as your Model.  This is fairly common, and alleviates the need to do mapping between POCO domain objects and such entities (though there are certainly pros and cons to using such entities directly). As an example, the current version of the NerdDinner application (available on CodePlex at nerddinner.codeplex.com) uses Entity Framework for its model.  Thus, there is a NerdDinner.edmx file in the project, and a generated NerdDinner.Models.Dinner class.  Fortunately, these generated classes are marked as partial, so you can extend their behavior via your own partial class in a separate file.  However, if for instance the generated Dinner class has a property Title of type string, you cant then add your own Title of type string for the purpose of adding data annotations to it, like this: public partial class Dinner { [Required] public string Title { get;set; } } This will result in a compilation error, because the generated Dinner class already contains a definition of Title.  How then can we add attributes to this generated code?  Do we need to go into the T4 template and add a special case that says if were generated a Dinner class and it has a Title property, add this attribute?  Ick. MetadataType to the Rescue The MetadataType attribute can be used to define a type which contains attributes (metadata) for a given class.  It is applied to the class you want to add metadata to (Dinner), and it refers to a totally separate class to which youre free to add whatever methods and properties you like.  Using this attribute, our partial Dinner class might look like this: [MetadataType(typeof(Dinner_Validation))] public partial class Dinner {}   public class Dinner_Validation { [Required] public string Title { get; set; } } In this case the Dinner_Validation class is public, but if you were concerned about muddying your API with such classes, it could instead have been created as a private class within Dinner.  Having the validation attributes specified in their own class (with no other responsibilities) complies with the Single Responsibility Principle and makes it easy for you to test that the validation rules you expect are in place via these annotations/attributes. Thanks to Julie Lerman for her help with this.  Right after she showed me how to do this, I realized it was also already being done in the project I was working on. Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here.

    Read the article

  • How have Guava unit tests been generated automatically?

    - by dzieciou
    Guava has unit test cases automatically generated: Guava has staggering numbers of unit tests: as of July 2012, the guava-tests package includes over 286,000 individual test cases. Most of these are automatically generated, not written by hand, but Guava's test coverage is extremely thorough, especially for com.google.common.collect. How they were generated? What techniques and technologies were used to design and generate them?

    Read the article

  • VS2010 crashes when opening a vsp generated using VS 2012

    - by Tarun Arora
    I recently profiled some web applications using Visual Studio 2012, a vsp (Visual Studio Profile) file was generated as a result of the profiling session. I could successfully open the vsp file in Visual Studio 2012 as expected but when I tried to open the vsp file in Visual Studio 2010 the VS2010 IDE crashed. As a responsible citizen I raised bug # 762202 on Microsoft Connect site using the Microsoft Visual Studio 2012 Feedback Client. Note – In case you didn’t already know, VSP generated in Visual Studio 2012 is not backward compatible. Please refer below for the steps to reproduce the issue and the resolution of the connect bug. 1. Behaviour and Steps to Reproduce the Issue Description I have generated a vsp file by using the Visual Studio 2012 Standalone profiler. When I try and open the vsp file in Visual Studio 2010 the IDE crashes. I understand that a vsp generated by using VS 2012 cannot be opened in VS 2010, but the IDE crashing is not the behaviour I would expect to see. Steps to Reproduce the Issue 1. Pick up the Stand lone profiler from the VS 2012 installation media. The folder has both x 64 and x86 installer, since the machine I am using is x64 bit. I have installed the x64 version of the standalone profiler. 2. I have configured the system path by setting the 'environment variable' path to where the profiler is installed. In my case this is, C:\Program Files (x86)\Microsoft Visual Studio 11.0\Team Tools\Performance Tools 3. Created a new environment variable _NT_SYMBOL_PATH and set its value to CACHE*C:\SYMBOLSCACHE;SRV*C:\SYMBOLSCACHE*HTTP://MSDL.MICROSOFT.COM/DOWNLOAD/SYMBOLS;\\FOO\BUILD1234 4. Open up CMD as an administrator and run 'VSPerfASPNETCmd /tip http://localhost:56180/ /o:C:\Temp\SampleEISK.vsp' 5. This generates the following message on the cmd       Microsoft (R) VSPerf ASP.NET Command, Version 11.0.0.0     Copyright (C) Microsoft Corporation. All rights reserved.     Configuring and attaching to ASP.NET process. Please wait.     Setting up profiling environment.     Starting monitor.     Launching ASP.NET service.     Attaching Monitor to process.     Launching Internet Explorer.     The profiler is attached to ASP.net. Please run your application scenario now.     Press Enter to stop data collection...   6. I perform certain actions and then I come back to the cmd and hit enter to shut down the profiling. Once I do this, the following message is written to the cmd, Press Enter to stop data collection... Profiling now shut down. Report file "C:\Temp\SampleEISK.vsp" was generated. Running VsPerfReport, packing symbols into the .VSP. Shutting down profiling and restarting ASP.NET. Please wait. Restarting w3wp.exe.   7. I look in the C:\Temp folder and I can see the SampleEISK.vsp file generated. I can successfully open this file in Visual Studio 2012. 8. When I am trying to open the vsp file in VS 2010 the VS 2010 IDE crashes. Kaboooom! What I would expect to happen I expect to receive a message "VS 2010 does not support the vsp file generated by VS 2012". What actually happened The VS 2010 IDE crashed 2. Resolution This is a valid bug! However, there isn’t much value in releasing a hotfix for this issue. Refer below to the resolution provided by the Visual Studio Profiler Team.  Thank you for taking the time to report this issue. We completely agree that Visual Studio 2010 should not crash. However in this particular case this is not a bug we are going to retroactively release a fix to 2010 for at this point. Given that a fix would not unblock the scenario of opening a 2012 created file on Visual Studio 2010, and there is not an active update channel for Visual Studio 2010 other than manually locating and installing hot fixes, we will not be fixing this particular issue. Best Regards, Visual Studio Profiler Team   Though it would be great to improve the behaviour however, this is not a defect that would stop you from progressing in any way. It’s important to note however that VSP files generated by Visual Studio 2012 are not backward compatible so you should refrain from opening these files in Visual Studio 2010.

    Read the article

  • My Xmap generated sitemap is not being submitted

    - by user2014989
    I m using Joomla Xmap component for creating sitemap. Here is the URL of my Xmap generated Sitemap: http://www.acethehimalaya.com/index.php?option=com_xmap&sitemap=1&view=xml I tried to submit my sitemap to Google but the problem I'm facing is that the URL doesn't get submitted and I'm having the issue that it says the sitemap is empty. Can Xmap generated sitemaps not be submitted, or am I doing anything wrong?

    Read the article

  • Generated Methods with Type Hints

    - by Ondrej Brejla
    Hi all! Today we would like to introduce you just another feature from upcoming NetBeans 7.3. It's about generating setters, constructors and type hints of their parameters. For years, you can use Insert Code action to generate setters, getters, constructors and such. Nothing new. But from NetBeans 7.3 you can generate Fluent Setters! What does it mean? Simply that $this is returned from a generated setter. This is how it looks like: But that's not everything :) As you know, before a method is generated, you have to choose a field, which will be associated with that method (in case of constructors, you choose fileds which should be initialized by that constructor). And from NetBeans 7.3, type hints are generated automatically for these parameters! But only if a proper PHPDoc is used in a corresponding field declaration, of course. Here is how it looks like. And that's all for today and as usual, please test it and if you find something strange, don't hesitate to file a new issue (product php, component Editor). Thanks a lot!

    Read the article

  • Is any simple way to create method and set its body dynamically in C#?

    - by greatromul
    I hold body of method in string. I want to create method dynamically. But I don't know, how to set its body. I saw very tedious way using CodeDom. And I saw using Emit with OpCodes. Is any way to use ready code from string variable? string method_body = "return \"Hello, world!\";"; //there is method body DynamicMethod dm = new System.Reflection.Emit.DynamicMethod("My_method", typeof(string), new Type[] { }); //any way to create method dynamically //any way to set body string result = (string)dm.Invoke(...); //I need write result in variable

    Read the article

  • All video thumbnails fail to be generated

    - by Forage
    Not a single video thumbnail is being generated and shown in Nautilus. The folder ~/.cache/thumbnails/fail/gnome-thumbnail-factory/ keeps getting filled for all of them. I tried removing all the thumbnails from the folder, reinstalling the gstreamer-plugins-... and totem packages, changing the thumbnail settings (Always, 4 GB) in the Preview section of the Nautilus preferences. All to no avail. Some recommend to install packages like libxine1 and ffmpegthumbnailer but this didn't not solve it either. There used to be an .xsession-errors error log file generated in the home folder in previous version of Ubuntu but that doesn't seem to be the case any more. I'm running Ubuntu 12.10 GNOME remix (x64) with the GNOME3 ppa packages installed. What could be the cause of the problem and how can I fix it?

    Read the article

  • I Don't Understand Anything About Randomly Generated Worlds [closed]

    - by Alex Larsen
    What tools do I need to make a Minecraft-like generated world? I heard about Perlin noise and Simplex, but I don't understand anything about them. So far all I found on the internet was a Simplex version for C#, and all it has is functions, and this is what I get: Console.WriteLine(Noise.Generate(SomeNumber, SomeNumber, SumNumber)); Outputs random floats. I'm really lost. I don't understand the whole random generated worlds concept. Can someone help me? And if I use the noise thing I don't understand how to use it.

    Read the article

  • How do you authenticate user generated "apps" for your app?

    - by Brian Armstrong
    I'm think something like Facebook apps here. User generated pieces of code that people can write to interact with my app. I understand how an authenticated API works, but this seems a little more complicated because not only does the APP have to authenticate itself (with a regular api-key) but the USER using the app has to be authenticated somehow too, without giving the app free reign. I've been reading a bit here to see how FB does it: http://wiki.developers.facebook.com/index.php/How_Facebook_Authenticates_Your_Application And it looks like you have to pass a signature in addition to the api-key along with every call, but I'm having trouble wrapping my head around how this gets generated and used on the other end (my server). Figure there must be a simple explanation of this out there? Thanks! P.S. I'm building a Rails app if there are any applicable gems/plugins.

    Read the article

  • How to change the divider height of listview dynamically?

    - by sunil
    Hi, I have a listview in which there should be different divider height between different rows. So, how can we set the divider height dynamically? Suppose, I have 10 rows and there should be a divider height of 5 between first 2 rows and then there should be a divider height of 1 between next 5 rows and so on. Can someone let me know the way of doing this? Regards Sunil

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >