instruction
stringlengths
14
27.6k
completion
stringlengths
3
38.3k
__original_row_idx
int64
0
50k
conversations
listlengths
2
2
OK I'm redoing this since I messed it up. :) here's the xaml. <Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" x:Class="ucWaitIndicator.Window1" x:Name="Window" Title="Window1" Width="640" Height="480"> <Window.R...
The behavior you're experiencing is likely due to the way you're handling the `Storyboard`. In your code, you're calling `myStoryboard.Begin()` on mouse button events, but it can lead to issues where the animation starts again even if it hasn't stopped properly. ### Key Issues: 1. **Multiple Starts**: If you repeatedl...
44,137
[ { "from": "human", "value": "OK I'm redoing this since I messed it up. :) here's the xaml.\n<Window\n xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\n xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\n x:Class=\"ucWaitIndicator.Window1\"\n x:Name=\"Window\"\n Titl...
If I am setting up a site how would I go about ensuring that the person who gives me a credit card number (for instance) is the person who is authorized to use it? Maybe more generally how would I go about reducing the opportunity for fraud and stolen ID usage whether it be for a purchase or system access. I don't wor...
You're right that ensuring the authenticity of a user in online transactions is a complex challenge, especially given the rise of sophisticated fraudulent activities. Here are some strategies you can implement to reduce the opportunity for fraud and stolen identity usage, both for online purchases and system access: #...
45,578
[ { "from": "human", "value": "If I am setting up a site how would I go about ensuring that the person who gives me a credit card number (for instance) is the person who is authorized to use it? Maybe more generally how would I go about reducing the opportunity for fraud and stolen ID usage whether it be for ...
I'm playing around at the start of a personal project in C# and MySQL. I am familiar with the use of the Gentle Framework (using MyGeneration to generate the classes, based on the data model). Here's what I like about Gentle; Simple-to-use [class].Retrieve(id) / [object].Persist() semantics with strong-typing of fie...
It's great that you're exploring options for data access in your C# and MySQL project. Based on your description of Gentle Framework and your requirements, here are some alternatives that you might consider, along with their advantages and potential downsides: ### 1. **Entity Framework (EF)** - **Pros**: - **S...
41,487
[ { "from": "human", "value": "I'm playing around at the start of a personal project in C# and MySQL.\nI am familiar with the use of the Gentle Framework (using MyGeneration to generate the classes, based on the data model). Here's what I like about Gentle; \n\nSimple-to-use [class].Retrieve(id) / [object].P...
Given the following code, Choices choices = new Choices(); choices.Add(new GrammarBuilder(new SemanticResultValue("product", "<product/>"))); GrammarBuilder builder = new GrammarBuilder(); builder.Append(new SemanticResultKey("options", choices.ToGrammarBuilder())); Grammar grammar = new Grammar(builder) { Name = Con...
To add additional words to an already loaded grammar without reloading the entire grammar in the managed library, you can utilize the `Choices` class effectively. However, the direct addition of words to an existing grammar is not supported. Instead, you can dynamically create and modify your grammar by implementing th...
46,679
[ { "from": "human", "value": "Given the following code,\nChoices choices = new Choices();\nchoices.Add(new GrammarBuilder(new SemanticResultValue(\"product\", \"<product/>\")));\n\nGrammarBuilder builder = new GrammarBuilder();\nbuilder.Append(new SemanticResultKey(\"options\", choices.ToGrammarBuilder()));\...
<style type="text/css"> html, body { background: #fff; margin: 0; padding: 0; } #nav { font-family: Verdana, sans-serif; height: 29px; font-size: 12px; padding: 0 0 0 10px; /* this is used for something else */ background-color: #456; } #nav ul, #nav ul li { list-style: none; m...
The issue you're experiencing with the hover background not covering the full height of the navigation bar is due to how the line-height and padding are set for the links within the navigation items. Here's how you can fix it: 1. **Set the line-height** of the anchor tags to match the height of the navigation bar. 2. ...
45,614
[ { "from": "human", "value": "<style type=\"text/css\">\nhtml, body {\n background: #fff;\n margin: 0;\n padding: 0;\n}\n\n#nav {\n font-family: Verdana, sans-serif;\n height: 29px;\n font-size: 12px;\n padding: 0 0 0 10px; /* this is used for something else */\n background-color: #45...
Having installed Hibernate Tools in Eclipse, how can I view the would-be generated SQL query of from the JPA query language? (I'm using Hibernate as my JPA implementation) My Java DAO class looks something like: public List<Person> findById(int id) { return entityManager.find(Person.class, id); } public List<Person...
To view the SQL queries generated by Hibernate for your JPA queries, you can enable Hibernate’s SQL logging. While Hibernate Tools itself does not directly provide a mechanism to view the generated SQL, you can achieve this by configuring logging in your application. Here’s how you can enable SQL query logging in a fe...
45,728
[ { "from": "human", "value": "Having installed Hibernate Tools in Eclipse, how can I view the would-be generated SQL query of from the JPA query language? (I'm using Hibernate as my JPA implementation)\nMy Java DAO class looks something like:\npublic List<Person> findById(int id)\n{\n return entityManager...
Some requirements: Step-by-step debugging & Break Points View variable values while debugging IntelliSense (auto-completion). Ideally done with "smarts" so it only shows you the syntactically valid options to complete something. E.g., Textbox. would trigger members of that class (.Text, .BackColor), etc. And then T...
Based on your requirements for a development environment that supports step-by-step debugging, breakpoints, variable inspection, IntelliSense, and a drag-and-drop style GUI design, here are several options to consider: ### 1. **Microsoft Visual Studio** - **Language Support**: Primarily C#, VB.NET, F#, C++, etc. ...
46,031
[ { "from": "human", "value": "Some requirements:\n\nStep-by-step debugging & Break Points\nView variable values while debugging\nIntelliSense (auto-completion). Ideally done with \"smarts\" so it only shows you the syntactically valid options to complete something. E.g., Textbox. would trigger members of t...
I'm looking for a good article or two, or just an explanation, on how the DataContext, or dbml file, for LinqToSql, exactly works in LinqToSql. Is this a disconnected environment? Are the database connections still pooled by Sql Server? If I create an instance of my DataContext am I responsible to Dispose of it? How d...
Certainly! Let's break down your questions regarding LINQ to SQL, particularly focusing on the `DataContext` and the associated `.dbml` files. ### What is LINQ to SQL? LINQ to SQL is a component of the .NET Framework that provides a run-time infrastructure for managing relational data as objects. It allows you to quer...
41,035
[ { "from": "human", "value": "I'm looking for a good article or two, or just an explanation, on how the DataContext, or dbml file, for LinqToSql, exactly works in LinqToSql.\n\nIs this a disconnected environment?\nAre the database connections still pooled by Sql Server?\nIf I create an instance of my DataCon...
I am starting a WPF project, which will be fairly complicated in complexity and will make use of a lot of modern UIs, like outlook bar, grids, tabs, etc... I've looked around in the marketplace and there aren't too many control suites. Some of the available ones are either Beta or CTP. Others don't look too polished...
When starting a WPF project with complex UI requirements, deciding whether to purchase a third-party control suite or build your own controls can significantly impact your project. Here are some considerations based on various experiences and the current state of WPF control suites: ### Considerations for Using Third-...
44,231
[ { "from": "human", "value": "I am starting a WPF project, which will be fairly complicated in complexity and will make use of a lot of modern UIs, like outlook bar, grids, tabs, etc... I've looked around in the marketplace and there aren't too many control suites. Some of the available ones are either Bet...
What system do you recommend for implementing "automatic updates" for some java (desktop) application? I'd also want to have module/plugin installation and update. Think Eclipse and Firefox. I'm aware of Eclipse RCP's OSGi stuff, and also NetBeans RCP has something here. Do one have to buy wholly into their respective ...
When it comes to implementing automatic updates and module/plugin installation in a Java desktop application, there are several approaches and tools you can consider. Below are some options, including both the Eclipse RCP and NetBeans RCP, along with other alternatives: ### 1. **Eclipse RCP (Rich Client Platform) with...
37,371
[ { "from": "human", "value": "What system do you recommend for implementing \"automatic updates\" for some java (desktop) application? I'd also want to have module/plugin installation and update. Think Eclipse and Firefox.\nI'm aware of Eclipse RCP's OSGi stuff, and also NetBeans RCP has something here. Do o...
I run a feed aggregator (http://planetdb2.com/) and I need to aggregate both prolific (many posts a day) and less prolific (one post a day at most) feeds. Creating a daily digest -- one post summary of the day's posts -- seems like the best solution. There's a way to create a daily digest just for Twitter feeds via Ya...
Creating a daily digest feed from multiple RSS feeds can be challenging, especially if you're dealing with varying posting frequencies. While there are specific tools for certain platforms (like Twitter, as you mentioned), finding a general-purpose solution can be a bit more difficult. Here are a few options you can co...
44,516
[ { "from": "human", "value": "I run a feed aggregator (http://planetdb2.com/) and I need to aggregate both prolific (many posts a day) and less prolific (one post a day at most) feeds.\nCreating a daily digest -- one post summary of the day's posts -- seems like the best solution.\nThere's a way to create a...
I have a simple page that displays a user's email addresses in a table. I also have a textbox underneath the table and an "add" button. Currently, I am using a simple form post that is handled by a controller that will add the e-mail address to the database and reload the page. This works fine, but I'm looking to st...
Using jQuery and AJAX to streamline the process of adding email addresses without refreshing the page is a great approach. Below, I'll provide a step-by-step guide on how to implement this, along with code samples for both the client-side and server-side components. ### Step 1: Create the Controller Action In your se...
40,684
[ { "from": "human", "value": "I have a simple page that displays a user's email addresses in a table. I also have a textbox underneath the table and an \"add\" button. Currently, I am using a simple form post that is handled by a controller that will add the e-mail address to the database and reload the pa...
We have a large ASP.Net website that has a single css stylesheet which is getting out of control. I am thinking of using the following strategy (taken from http://www.techrepublic.com/article/developing-a-css-strategy/5437796/) which seems logical to me... you might have one CSS file devoted to sitewide styles and sepa...
Your strategy for organizing CSS files is sound and aligns well with best practices for maintaining and optimizing styles in a large ASP.NET website. Here are some benefits and considerations of your proposed approach, along with alternative strategies: ### Benefits of Your Proposed Strategy: 1. **Modularity:** By br...
42,422
[ { "from": "human", "value": "We have a large ASP.Net website that has a single css stylesheet which is getting out of control.\nI am thinking of using the following strategy (taken from http://www.techrepublic.com/article/developing-a-css-strategy/5437796/) which seems logical to me...\nyou might have one C...
Is it possible to create an integer (or DataTime, etc) column in ListView? It is quite important, because I would like to properly sort the list according to this column. The only way to add subItems to a ListViewItem I found are: listviewitem.SubItems.Add("1"); I would like to avoid parsing these strings to get the i...
In a WinForms application using a `ListView`, you can indeed add integer (or DateTime) data to a column and sort the `ListView` based on these values. However, since the `ListView` primarily handles `string` types for its items and sub-items, the sorting has to be managed through a custom approach. ### Solution 1: Usi...
42,554
[ { "from": "human", "value": "Is it possible to create an integer (or DataTime, etc) column in ListView? It is quite important, because I would like to properly sort the list according to this column.\nThe only way to add subItems to a ListViewItem I found are:\nlistviewitem.SubItems.Add(\"1\");\n\nI would l...
I have a table with a clustered primary key index on a uniqueidentifier column. I have a procedure that runs the following psuedo functions: begin transaction read from table 1 insert into table 2 update table 1 with pointer to table 2 record commit transaction This all works fine until the same procedure is executed ...
Deadlocks can occur in SQL Server when two or more transactions are waiting for each other to release locks on resources, which seems to be happening in your scenario. When you perform operations that involve inserting, updating, and reading from a table within a transaction, you may create a situation where two transa...
42,216
[ { "from": "human", "value": "I have a table with a clustered primary key index on a uniqueidentifier column. I have a procedure that runs the following psuedo functions:\nbegin transaction\nread from table 1\ninsert into table 2\nupdate table 1 with pointer to table 2 record\ncommit transaction\n\nThis all ...
There seem to be so many color wheel, color picker, and color matcher web apps out there, where you give one color and the they'll find a couple of other colors that will create a harmonic layout when being used in combination. However most of them focus on background colors only and any text printed on each background...
There are several web applications and tools that can help you choose font colors that are readable against a specified background color while ensuring an aesthetically pleasing combination. Here are a few options you might find useful: 1. **Contrast Checker by WebAIM**: This tool allows you to enter your background c...
45,437
[ { "from": "human", "value": "There seem to be so many color wheel, color picker, and color matcher web apps out there, where you give one color and the they'll find a couple of other colors that will create a harmonic layout when being used in combination. However most of them focus on background colors onl...
I'm a junior student and I had a course called The Design and Analysis of Algorithms. The course is cool but the instructor is not. I don't understand the brute force and how to count the number of operations and how to count the time complexity (worst, best, avg), I tried to search for it on the net but each time I en...
It sounds like you're having some trouble grasping the concepts of brute force algorithms and time complexity. Let’s break down these concepts in a way that doesn't get into the more complex territory of Big-O notation or divide and conquer just yet. ### 1. Brute Force Algorithms A brute force algorithm is a straight...
44,320
[ { "from": "human", "value": "I'm a junior student and I had a course called The Design and Analysis of Algorithms. The course is cool but the instructor is not. I don't understand the brute force and how to count the number of operations and how to count the time complexity (worst, best, avg), I tried to se...
How do you execute a JavaScript function without onclick like "Grippie" in a new post on SOF, like the <div class="grippie" style="margin-right: 59px;"/> on Stack Overflow when you post a question or answer? I get a nice CSS cursor which lets me know of the movable edge, but how is the JavaScript which resizes the fiel...
To achieve a similar effect to the "Grippie" functionality on Stack Overflow, you can create a draggable or resizable element using JavaScript and CSS. The way this generally works is that you set up an event listener for mouse events on the element, allowing the user to interact with it. Here's a simple implementatio...
43,538
[ { "from": "human", "value": "How do you execute a JavaScript function without onclick like \"Grippie\" in a new post on SOF, like the <div class=\"grippie\" style=\"margin-right: 59px;\"/> on Stack Overflow when you post a question or answer? I get a nice CSS cursor which lets me know of the movable edge, b...
I'm someone who writes code just for fun and haven't really delved into it in either an academic or professional setting, so stuff like these bitwise operators really escapes me. I was reading an article about JavaScript, which apparently supports bitwise operations. I keep seeing this operation mentioned in places, an...
Bitwise operators are powerful tools that allow you to manipulate data at the bit level in programming languages like JavaScript. Let's break down what bitwise operators are and provide some clear examples to help you understand them better. ### What are Bitwise Operators? Bitwise operators perform operations on the ...
38,929
[ { "from": "human", "value": "I'm someone who writes code just for fun and haven't really delved into it in either an academic or professional setting, so stuff like these bitwise operators really escapes me.\nI was reading an article about JavaScript, which apparently supports bitwise operations. I keep see...
I have a Java applet (an actual <APPLET>) which generates frequent log messages to System.out. If the Java Console is enabled in the user's browser, it will of course retain references to all of these strings and prevent them from being garbage collected. The problem is the number of log messages the console retains: t...
Unfortunately, there is no direct API provided in Java to limit the number of log messages or the size of logs retained by the Java Console for applets. The behavior of the Java Console, including how it manages log messages, is largely governed by the implementation of the Java Runtime Environment (JRE) and is not con...
44,762
[ { "from": "human", "value": "I have a Java applet (an actual <APPLET>) which generates frequent log messages to System.out. If the Java Console is enabled in the user's browser, it will of course retain references to all of these strings and prevent them from being garbage collected. The problem is the numb...
From what I understand, in TDD you have to write a failing test first, then write the code to make it pass, then refactor. But what if your code already accounts for the situation you want to test? For example, lets say I'm TDD'ing a sorting algorithm (this is just hypothetical). I might write unit tests for a couple o...
You've raised a very insightful question regarding the nuances of Test-Driven Development (TDD). The core principle of TDD is indeed to write a failing test before you write the minimum amount of code needed to pass that test. However, there are scenarios, like the one you've described, where the code already fulfills ...
47,491
[ { "from": "human", "value": "From what I understand, in TDD you have to write a failing test first, then write the code to make it pass, then refactor. But what if your code already accounts for the situation you want to test?\nFor example, lets say I'm TDD'ing a sorting algorithm (this is just hypothetical...
Given a class like this: class Foo { public: Foo(int); Foo(const Foo&); Foo& operator=(int); private: // ... }; Are these two lines exactly equivalent, or is there a subtle difference between them? Foo f(42); Foo f = 42; Edit: I confused matters by making the Foo constructor "explicit" in the ori...
The two lines you provided, `Foo f(42);` and `Foo f = 42;`, are not exactly equivalent in terms of how they interact with the C++ language rules, particularly with respect to copy initialization and direct initialization. 1. **Direct Initialization**: The line `Foo f(42);` is an example of direct initialization. In th...
46,072
[ { "from": "human", "value": "Given a class like this:\nclass Foo {\npublic:\n Foo(int);\n\n Foo(const Foo&);\n\n Foo& operator=(int);\n\nprivate:\n // ...\n};\n\nAre these two lines exactly equivalent, or is there a subtle difference between them?\nFoo f(42);\n\nFoo f = 42;\n\n\nEdit: I confused...
I am trying to make a gridview sortable which uses a stored procedure as a datasource, I would not want it to rerun the query each time to achieve this. How would I get it to work my current code is: protected override void OnPreRender(EventArgs e) { if (!IsPostBack) { SqlCommand cmd2 = new SqlCommand("SR_S...
To enable sorting in your GridView while preventing the stored procedure from being called on each sort event, you can load the data once and store it in the ViewState or a data structure that persists across postbacks. You can then handle sorting by leveraging the in-memory data rather than querying the database again...
42,256
[ { "from": "human", "value": "I am trying to make a gridview sortable which uses a stored procedure as a datasource, I would not want it to rerun the query each time to achieve this. How would I get it to work my current code is:\nprotected override void OnPreRender(EventArgs e)\n{\n if (!IsPostBack)\n ...
While looking at the syntax-case section in R6RS, I saw the keyword make-variable-transformer, described as an identifier macro. The example given is very minimal, and I am not groking why it is necessary, or what use-cases require it. Finding additional examples of its use is also proving difficult. Presumably it make...
The `make-variable-transformer` feature in R6RS Scheme is a mechanism that allows you to create identifier macros, which are a type of syntax transformer. This is particularly useful for constructing custom syntactic constructs that behave like variables but have specific transformations applied to them when they are e...
41,964
[ { "from": "human", "value": "While looking at the syntax-case section in R6RS, I saw the keyword make-variable-transformer, described as an identifier macro. The example given is very minimal, and I am not groking why it is necessary, or what use-cases require it. Finding additional examples of its use is a...
I have a page with a document.onkeydown event handler, and I'm loading it inside an iframe in another page. I have to click inside the iframe to get the content page to start "listening". Is there some way I can use JavaScript in the outer page to set the focus to the inner page so I don't have to click inside the ifr...
To enable event handlers on an iframe's content without requiring a click, you can programmatically focus on the iframe from the outer page using JavaScript. This can often trigger the event handlers in the inner document. Here's a general approach to achieve this: 1. Ensure that the iframe is accessible, meaning it ...
46,010
[ { "from": "human", "value": "I have a page with a document.onkeydown event handler, and I'm loading it inside an iframe in another page. I have to click inside the iframe to get the content page to start \"listening\". \nIs there some way I can use JavaScript in the outer page to set the focus to the inner ...
I'm looking for suggestions about how can I build an extensible WCF server (with dynamically loaded services), preferably using System.Addins or MEF. The server should host any WCF service (contained in DLL assemblies, loaded in runtime) that implements a minimal "plugin" API (StartService/StopService/GetStatus?/etc). ...
Building an extensible WCF server with dynamically loaded services is a great way to design a flexible architecture. Here are some suggestions to guide you through your design while addressing your objectives and points for discussion. ### Use of Isolated AppDomains 1. **Pros of Isolated AppDomains**: - **Isolation...
42,657
[ { "from": "human", "value": "I'm looking for suggestions about how can I build an extensible WCF server (with dynamically loaded services), preferably using System.Addins or MEF.\nThe server should host any WCF service (contained in DLL assemblies, loaded in runtime) that implements a minimal \"plugin\" API...
What is the best approach to play a sequence of flv video files in Flash (with actionscript)? My goal is to have the transitions occur as smoothly as possible. Currently i'm using the netStream class and capturing the onStatus events to play the next video when the current video has reached it's end duration. Althought...
To play a sequence of FLV video files in Flash using ActionScript while minimizing or eliminating the gap between videos, you can follow these optimized steps: 1. **Preload the Next Video**: Start loading the next video while the current video is playing. This will help ensure that the next video is ready to start imm...
40,447
[ { "from": "human", "value": "What is the best approach to play a sequence of flv video files in Flash (with actionscript)? My goal is to have the transitions occur as smoothly as possible.\nCurrently i'm using the netStream class and capturing the onStatus events to play the next video when the current vide...
I need to have a routine/function/stored proc/whatever to archive particular accounts from our 'active' table, to an inactive table. I can write this out as a group of queries, all executed in order by PHP one at a time, but I'm looking to offload most of the work to mysql because it's not necessary for PHP to be invol...
You can certainly achieve that using a stored procedure in MySQL, and it's a good way to encapsulate your logic in the database. A stored procedure can handle multiple operations as a single transaction, allowing you to rollback if any part of the process fails. Below is an example of how you can implement the `archive...
46,226
[ { "from": "human", "value": "I need to have a routine/function/stored proc/whatever to archive particular accounts from our 'active' table, to an inactive table.\nI can write this out as a group of queries, all executed in order by PHP one at a time, but I'm looking to offload most of the work to mysql beca...
I have a following xslt code : <xsl:template match="table_terms_and_abbr"> <informaltable frame='none' colsep='none' rowsep='none'> <tgroup cols='2' align='left'> <colspec colnum="1" colwidth='1*'/> <colspec colnum="2" colwidth='1*'/> <xsl:apply-templates/> </tgro...
To pass free text or static data to an XSLT template, you can use an `xsl:with-param` element with a string value. In your specific case, you want to create a `tblrow_hdr` template and call it from within your `table_terms_and_abbr` template while passing the static text data. Here is an example of how you can modify...
38,777
[ { "from": "human", "value": "I have a following xslt code :\n<xsl:template match=\"table_terms_and_abbr\">\n <informaltable frame='none' colsep='none' rowsep='none'>\n <tgroup cols='2' align='left'>\n <colspec colnum=\"1\" colwidth='1*'/>\n <colspec colnum=\"2\" colwidth='1*'...
Can I use javascript in a page to cause an event in a silverlight component to fire? If so, does anybody have some code samples?
Yes, you can use JavaScript to interact with a Silverlight component on a web page and trigger events. Silverlight provides a mechanism to communicate between JavaScript and the Silverlight runtime through a concept known as "Interop." Here’s a simple example to demonstrate how you can achieve this. Let's assume you ...
41,507
[ { "from": "human", "value": "Can I use javascript in a page to cause an event in a silverlight component to fire? If so, does anybody have some code samples?\n" }, { "from": "gpt", "value": "Yes, you can use JavaScript to interact with a Silverlight component on a web page and trigger events. S...
I have an assembly. Is there a way to detect which version of .NET was used to build that assembly?
Yes, you can determine the version of .NET that was used to build a given assembly by examining its metadata. Here are a few methods to do this: ### 1. Using ILDasm (IL Disassembler) ILDasm is a tool included with the .NET Framework SDK that allows you to inspect the contents of a .NET assembly. 1. Open a Command Pro...
45,980
[ { "from": "human", "value": "I have an assembly. Is there a way to detect which version of .NET was used to build that assembly?\n" }, { "from": "gpt", "value": "Yes, you can determine the version of .NET that was used to build a given assembly by examining its metadata. Here are a few methods t...
I am planning to use this to poll a database which can take close to 10-15 minutes or more, so should I be using timers for this.
Using timers for polling a database is a common approach, especially when the operation takes a significant amount of time, like 10-15 minutes. However, there are some considerations and alternative strategies you might want to explore: ### 1. **Using Timers for Polling:** - **Set Intervals:** You can set a timer t...
44,850
[ { "from": "human", "value": "I am planning to use this to poll a database which can take close to 10-15 minutes or more, so should I be using timers for this.\n" }, { "from": "gpt", "value": "Using timers for polling a database is a common approach, especially when the operation takes a signific...
I am looking to persistently display a game score in an iPhone app using cocos2d. Going off the code that cocos2d shows the FPS the app is running at: -(void) showFPS { frames++; accumDt += dt; if ( accumDt > 0.1) { frameRate = frames/accumDt; frames = 0; accumDt = 0; } N...
If your game score is flickering while trying to display it using Cocos2d, it's likely due to the way you are updating and drawing the label every frame. Flickering often occurs when you are redrawing the label without proper synchronization or when it is being refreshed too frequently. Here are a few tips to help you...
47,472
[ { "from": "human", "value": "I am looking to persistently display a game score in an iPhone app using cocos2d. Going off the code that cocos2d shows the FPS the app is running at:\n-(void) showFPS\n{\n frames++;\n accumDt += dt;\n\n if ( accumDt > 0.1) {\n frameRate = frames/accumDt;\n ...
I thought this code would work, but the regular expression doesn't ever match the \r\n. I have viewed the data I am reading in a hex editor and verified there really is a hex D and hex A pattern in the file. I have also tried the regular expressions /\xD\xA/m and /\x0D\x0A/m but they also didn't match. This is my code ...
It looks like you're trying to replace Windows-style line endings (`\r\n`, represented as `\x0D\x0A` in hexadecimal) with Unix-style line endings (`\n`) in Ruby. Your code seems almost correct, but there are a few points worth clarifying. ### What You Might Be Doing Wrong 1. **Regular Expression Syntax**: The express...
41,906
[ { "from": "human", "value": "I thought this code would work, but the regular expression doesn't ever match the \\r\\n. I have viewed the data I am reading in a hex editor and verified there really is a hex D and hex A pattern in the file.\nI have also tried the regular expressions /\\xD\\xA/m and /\\x0D\\x0...
Delphi has a $WARN compiler directive that allows one to selectively enable or disable specific warnings. The Delphi 2009 help file describes the syntax: {$WARN identifier ON|OFF} But it only lists the identifiers for 6 warnings. I'd like to have a complete list of all the warning identifiers. In particular, I want ...
You're correct that the Delphi compiler provides the ability to enable or disable specific warnings using the `$WARN` directive, and while certain identifiers are documented, the full list can often be a challenge to compile because it may not be exhaustively documented. For Delphi 2009, here are some common warning i...
48,043
[ { "from": "human", "value": "Delphi has a $WARN compiler directive that allows one to selectively enable or disable specific warnings. The Delphi 2009 help file describes the syntax:\n{$WARN identifier ON|OFF}\n\nBut it only lists the identifiers for 6 warnings.\nI'd like to have a complete list of all the...
I have a column array with the following values in my sheet: 11, 15, 5, 7, 2. I want to get a reference to the cell which contains the value 15. How would I go about doing this? Thanks
To get a reference to the cell that contains the value `15` in a column array in a spreadsheet (like Excel or Google Sheets), you can use the `MATCH` function combined with `INDEX`. Here's how you can do it: Assuming your values (11, 15, 5, 7, 2) are in cells A1 through A5, you can use the following formula: ```excel...
46,803
[ { "from": "human", "value": "I have a column array with the following values in my sheet: 11, 15, 5, 7, 2. I want to get a reference to the cell which contains the value 15. How would I go about doing this?\nThanks\n" }, { "from": "gpt", "value": "To get a reference to the cell that contains the...
I'm interested in assigning the tag name of the root element in an xml document to an xslt variable. For instance, if the document looked like (minus the DTD): <foo xmlns="http://....."> <bar>1</bar> </foo> and I wanted to assign the string 'foo' to an xslt variable. Is there a way to reference that? Thanks, Mat...
Yes, you can assign the tag name of the root element in an XML document to an XSLT variable using the `name()` function. The `name()` function can retrieve the name of a node, and you can use it on the root element. To do this while considering the namespace (as your XML includes a default namespace), you'll want to u...
45,307
[ { "from": "human", "value": "I'm interested in assigning the tag name of the root element in an xml document to an xslt variable. For instance, if the document looked like (minus the DTD):\n<foo xmlns=\"http://.....\">\n <bar>1</bar>\n</foo>\n\nand I wanted to assign the string 'foo' to an xslt variable...
A program that I work on assumes that the UUID generated by the Windows RPC API call UuidCreateSequential() contains the MAC address of the primary ethernet adapter. Is this assumption correct or should I use a different method to get the MAC address?
The assumption that the UUID generated by the Windows RPC API call `UuidCreateSequential()` contains the MAC address of the primary Ethernet adapter is not strictly correct. While `UuidCreateSequential()` generates a UUID that can incorporate the MAC address of the machine's network adapter, this behavior is not guaran...
46,299
[ { "from": "human", "value": "A program that I work on assumes that the UUID generated by the Windows RPC API call UuidCreateSequential() contains the MAC address of the primary ethernet adapter. Is this assumption correct or should I use a different method to get the MAC address?\n" }, { "from": "gp...
Everybody knows that you should close a connection immediately after you finish using it. Due to a flaw in my domain object model design, I've had to leave the connection open for the full page life cycle. Essentially, I have a Just In Time property which opens a connection on first call, and then on Page.Unload (..) ...
Keeping a database connection open for the entire page lifecycle is generally not a good practice, even if it may seem convenient for performance or simplicity. Here are several reasons why it is better to close database connections immediately after use: 1. **Resource Management**: Open connections consume resources ...
48,294
[ { "from": "human", "value": "Everybody knows that you should close a connection immediately after you finish using it.\nDue to a flaw in my domain object model design, I've had to leave the connection open for the full page life cycle. Essentially, I have a Just In Time property which opens a connection on...
Is there any way to set an execution path for the tested DLL so it can find resource folders when MbUnit copy files into a temporary folder without using Dependency Injection? Trying to put these extra files as content and set behaviour to copy did not work.
When working with test frameworks such as MbUnit (now part of Gallio), and you're dealing with DLLs that depend on external resources (like configuration files, images, etc.), you may encounter issues where those resources cannot be found when the DLL is executed in a temporary folder. Here are some strategies to addre...
46,869
[ { "from": "human", "value": "Is there any way to set an execution path for the tested DLL so it can find resource folders when MbUnit copy files into a temporary folder without using Dependency Injection?\nTrying to put these extra files as content and set behaviour to copy did not work.\n" }, { "fr...
In Office 2003 if I recall correctly you had a "record macro" option. In PowerPoint 2007, under View->Macros, you get a macro box. None of the options are "record". If you put in a name, you can select "create", but that takes you to the VB editor. If you edit the slide manually, it does not generate the VBA code. You ...
You are correct that Microsoft PowerPoint 2007 does not include a "Record Macro" feature like the one found in Excel and Word. In PowerPoint, if you want to create a macro, you have to manually write the VBA code in the Visual Basic for Applications (VBA) editor. There is no built-in functionality that allows you to re...
47,645
[ { "from": "human", "value": "In Office 2003 if I recall correctly you had a \"record macro\" option.\nIn PowerPoint 2007, under View->Macros, you get a macro box. None of the options are \"record\". If you put in a name, you can select \"create\", but that takes you to the VB editor. If you edit the slide m...
For Delphi IDE, Is there any tool/expert to know the name of the function where the cursor is, without scrolling the code editor?
In Delphi IDE, you can find out the name of the function or method where the cursor is located without scrolling through the code editor by using the **Code Navigation** features. Here are a few methods you can use: 1. **Status Bar**: In many versions of Delphi, when you place your cursor inside a method or function, ...
48,514
[ { "from": "human", "value": "For Delphi IDE, Is there any tool/expert to know the name of the function where the cursor is, without scrolling the code editor?\n" }, { "from": "gpt", "value": "In Delphi IDE, you can find out the name of the function or method where the cursor is located without s...
What is domain logic? The Wikipedia page for domain logic redirects to business logic. Are they the same thing, and, if not, how do they differ?
Domain logic and business logic are closely related concepts in software development, but they are not exactly the same. **Domain Logic**: - Domain logic refers specifically to the rules, processes, and logic that pertain to the specific domain or area of concern that the software addresses. This includes the key con...
47,542
[ { "from": "human", "value": "What is domain logic? The Wikipedia page for domain logic redirects to business logic. Are they the same thing, and, if not, how do they differ?\n" }, { "from": "gpt", "value": "Domain logic and business logic are closely related concepts in software development, b...
This is a continuation of my question about reading the superblock. Let's say I want to target the HFS+ file system in Mac OS X. How could I read sector 2 of the boot disk? As far as I know Unix only provides system calls to read from files, which are never stored at that location. Does this require either 1) the progr...
To read raw disk sectors such as sector 2 of a boot disk in macOS, you typically have a few options available without needing to run in kernel mode or writing in assembly. Here are some possible approaches: 1. **Using `dd` Command**: You can use the `dd` command in the Terminal to read a specific sector from the disk....
45,309
[ { "from": "human", "value": "This is a continuation of my question about reading the superblock.\nLet's say I want to target the HFS+ file system in Mac OS X. How could I read sector 2 of the boot disk? As far as I know Unix only provides system calls to read from files, which are never stored at that locat...
I currently have some code that pulls down a list of users in a group and then iterates through that group to determine if a given account exists, but it seems like there ought to be a more concise (and perhaps faster) way to accomplish this. This code (VB.NET) attempts to use the member property of the group object, b...
The issue you are encountering likely stems from the format of the `user.Path` property. In Active Directory, the `member` property of a group contains distinguished names (DNs) of the users, and you need to ensure that the DN of the user matches the format stored in the group's `member` property. Here are a few thing...
45,667
[ { "from": "human", "value": "I currently have some code that pulls down a list of users in a group and then iterates through that group to determine if a given account exists, but it seems like there ought to be a more concise (and perhaps faster) way to accomplish this.\nThis code (VB.NET) attempts to use ...
Is there a free API or some other way to determine what carrier a cell phone number is registered with? I'd like my application to broadcast text messages without them picking their carrier from a list. UPDATE: Interestingly, a coworker found the answer: http://developer.whitepages.com/ UPDATE2: Well the whitepages li...
Determining the carrier associated with a specific cell phone number can be challenging, especially with restrictions on APIs and licensing agreements. Here are some alternative approaches you can explore: 1. **Twilio Lookup API**: Twilio offers a Lookup API that can return carrier information for a given phone number...
47,478
[ { "from": "human", "value": "Is there a free API or some other way to determine what carrier a cell phone number is registered with?\nI'd like my application to broadcast text messages without them picking their carrier from a list.\nUPDATE:\nInterestingly, a coworker found the answer: http://developer.whit...
I have to change some connection strings in an incredibly old legacy application, and the programmers who made it thought it would be a great idea to plaster the entire app with connection strings all over the place. Visual Studio's "current project" search is incredible slow, and I don't trust Windows Search. So, what...
For your scenario on Windows 2003 Server, you might want to consider the following free, non-indexed text search tools: 1. **Agent Ransack**: This is a powerful file searching tool that allows you to search for files and text within files quickly. It provides a user-friendly interface and can search through subfolders...
44,371
[ { "from": "human", "value": "I have to change some connection strings in an incredibly old legacy application, and the programmers who made it thought it would be a great idea to plaster the entire app with connection strings all over the place.\nVisual Studio's \"current project\" search is incredible slow...
I am looking to build a Single-signon system for a couple web apps that used form based authentication. They way that I envision it is that my sso system would handle authentication against active directory pass the verification through to the desired web app when ever the used clicked a link through my sso portal. Wh...
Building a Single Sign-On (SSO) system that interfaces with Active Directory and provides authentication for multiple web applications involves several important components and considerations. Below is a high-level approach you might take: ### Key Components 1. **SSO Portal:** A centralized web application where user...
42,791
[ { "from": "human", "value": "I am looking to build a Single-signon system for a couple web apps that used form based authentication. \nThey way that I envision it is that my sso system would handle authentication against active directory pass the verification through to the desired web app when ever the use...
I'm embedding MSBuild directly into a more complex build tool. The relevant code looks roughly like this: // assume 'using Microsoft.Build.BuildEngine;' Engine e = Engine(); BuildPropertyGroup props = new BuildPropertyGroup(); props.SetProperty( "Configuration", Config.BuildConfig ); e.BuildProjectFile( projectFile, ne...
To cancel a build in MSBuild while it's running, you will need to utilize the `BuildEngine` and `BuildRequestData` classes provided in the MSBuild API. However, since you mentioned that you're embedding MSBuild directly using the older `Microsoft.Build.BuildEngine` namespace, it's important to understand that the API y...
45,596
[ { "from": "human", "value": "I'm embedding MSBuild directly into a more complex build tool. The relevant code looks roughly like this:\n// assume 'using Microsoft.Build.BuildEngine;'\nEngine e = Engine();\nBuildPropertyGroup props = new BuildPropertyGroup();\nprops.SetProperty( \"Configuration\", Config.Bui...
FxCops is something new to me, but as always I would like to get to know the new things.. From what I've read, FxCops is already included in VS2008. I guess it's the "Code Analysis" function. Whenever I try to run it though, it seems to start a rebuild and end in the "Finished Rebuilding" state. I checked the output wi...
Yes, FxCop (which stands for "Framework Code Analysis") is indeed integrated into Visual Studio 2008 as part of the Code Analysis feature. However, if you are experiencing a wall of text in the output window, it sounds like you might not be accessing the results in a more user-friendly manner. After you run Code Analy...
48,592
[ { "from": "human", "value": "FxCops is something new to me, but as always I would like to get to know the new things..\nFrom what I've read, FxCops is already included in VS2008. I guess it's the \"Code Analysis\" function. Whenever I try to run it though, it seems to start a rebuild and end in the \"Finish...
I'm trying to create a master detail view of a linq to sql relationship in wpf. The view will have two comboboxes. One for selecting the master item and another for selecting the detail item. I have achieved this using an ADO.Net Dataset containing two tables and a relationship between the tables. where the first comb...
To achieve master-detail binding using LINQ to SQL in WPF, you'll want to set up your data binding in such a way that when you select a master item (in this case, a company), the detail items (the associated contacts) will update automatically in the second ComboBox. Here’s how you can accomplish this: 1. **Define t...
44,254
[ { "from": "human", "value": "I'm trying to create a master detail view of a linq to sql relationship in wpf. The view will have two comboboxes. One for selecting the master item and another for selecting the detail item. \nI have achieved this using an ADO.Net Dataset containing two tables and a relationshi...
I am trying to create a test suite of some of the existing pages I have developed using fitnesse. Does the tool support to change or refactor the pages to sub-wikis to make a part of newly created test suite?
Yes, FitNesse supports the creation of sub-wikis, which can be a useful way to organize and refactor your test suite. Sub-wikis allow you to create a hierarchy of pages, making it easier to manage related test cases and maintain the structure of your test suite. Here’s how you can go about creating sub-wikis in FitNess...
45,918
[ { "from": "human", "value": "I am trying to create a test suite of some of the existing pages I have developed using fitnesse. Does the tool support to change or refactor the pages to sub-wikis to make a part of newly created test suite?\n" }, { "from": "gpt", "value": "Yes, FitNesse supports th...
I'm trying to learn bash string handling. How do I create a bash script which is equivalent to this Java code snippet? String symbols = "abcdefg12345_"; for (char i : symbols.toCharArray()) { for (char j : symbols.toCharArray()) { System.out.println(new StringBuffer().append(i).append(j)); } } The outp...
Certainly! You can achieve the equivalent behavior in Bash by using nested loops to iterate through the characters of the string. Below is a Bash script that does what your Java code snippet does, generating all permutations of length 2 from a given set of characters. Here’s the Bash script: ```bash #!/bin/bash # De...
47,977
[ { "from": "human", "value": "I'm trying to learn bash string handling.\nHow do I create a bash script which is equivalent to this Java code snippet?\nString symbols = \"abcdefg12345_\";\nfor (char i : symbols.toCharArray()) {\n for (char j : symbols.toCharArray()) {\n System.out.println(new String...
I've been using IntelliJ IDEA at the day job for Java development for a few weeks now. I'm really impressed with it and I'm looking to extend it for other programming languages that I tinker with, starting with Python. I found this plug-in, pythonid. I figured I would look for some input on the Stack before proceeding...
It's great to hear that you're enjoying IntelliJ IDEA for Java development! When it comes to extending it for Python development, the most widely recommended approach is to use the official **Python plugin** developed by JetBrains. This plugin is robust and integrates seamlessly with IntelliJ IDEA, providing features s...
48,033
[ { "from": "human", "value": "I've been using IntelliJ IDEA at the day job for Java development for a few weeks now. I'm really impressed with it and I'm looking to extend it for other programming languages that I tinker with, starting with Python. I found this plug-in, pythonid. I figured I would look for ...
I want to update/upgrade the standard Leopard install of Sqlite3 to >3.5 to use the new sqlite_xxx_v2 methods from a Cocoa project. I can't seem to find any information on how to do this. Does anyone have any tips or a site that outlines the update procedure. Also is 3.5+ supported on the iPhone. I understand it's emb...
To update SQLite on macOS Leopard (10.5) and ensure you have a version greater than 3.5, you can follow these steps: ### Steps to Update SQLite on macOS Leopard 1. **Download the SQLite Source Code**: - Go to the [SQLite download page](https://www.sqlite.org/download.html) and download the amalgamation source code...
46,103
[ { "from": "human", "value": "I want to update/upgrade the standard Leopard install of Sqlite3 to >3.5 to use the new sqlite_xxx_v2 methods from a Cocoa project.\nI can't seem to find any information on how to do this. Does anyone have any tips or a site that outlines the update procedure. \nAlso is 3.5+ sup...
Is it possible for a client to pass an RMI object as an argument to an EJB so that the EJB may callback the client?
In Java's Enterprise JavaBeans (EJB) architecture, it's generally not recommended or supported to pass RMI objects (or any client-side objects) directly to an EJB for several reasons: 1. **Serialization Issues**: EJBs operate in a distributed environment, and client objects may not be serializable or may not be availa...
47,906
[ { "from": "human", "value": "Is it possible for a client to pass an RMI object as an argument to an EJB so that the \nEJB may callback the client? \n" }, { "from": "gpt", "value": "In Java's Enterprise JavaBeans (EJB) architecture, it's generally not recommended or supported to pass RMI objects ...
I want to change background color of Datagrid header in Silverlight.
To change the background color of the DataGrid header in Silverlight, you can create a custom style for the DataGridColumnHeader. You need to define a style in your XAML and apply it to the DataGrid. Here's a step-by-step guide: ### Step 1: Define a Style for DataGridColumnHeader You can add a style in the resources ...
44,048
[ { "from": "human", "value": "I want to change background color of Datagrid header in Silverlight.\n" }, { "from": "gpt", "value": "To change the background color of the DataGrid header in Silverlight, you can create a custom style for the DataGridColumnHeader. You need to define a style in your ...
I just set up SSHd through Cygwin on a Windows XP Pro box overseas using a RAT and discluded the openssh package from the install. I ran the cywin shell (from c:\cywin) and ran Now, It's under a port I know is safe and fowarded properly, but I won't share it's number. It's not a common port, but it's under 40000. Firew...
Setting up an SSH server on a Windows XP box using Cygwin can be tricky, and there are several potential issues that might prevent external connections even if you believe everything is set up correctly. Here are some troubleshooting steps and considerations: 1. **Check SSHD Configuration**: Ensure that the SSH daemon...
42,322
[ { "from": "human", "value": "I just set up SSHd through Cygwin on a Windows XP Pro box overseas using a RAT and discluded the openssh package from the install.\nI ran the cywin shell (from c:\\cywin) and ran\nNow, It's under a port I know is safe and fowarded properly, but I won't share it's number. It's no...
Does anyone think it is possible to build a Google Docs style PDF document viewer, which will convert a document to a format that doesn't require Adobe Reader on the client machine? If so, any references to point to? Either a place that had done it, or an explanation of how to do it.
Yes, it is certainly possible to build a Google Docs-style PDF document viewer that does not require Adobe Reader on the client machine. Such a viewer would typically utilize web technologies like HTML5, JavaScript, and CSS to render PDF documents directly in the browser. ### Key Approaches 1. **PDF.js**: - **Des...
43,561
[ { "from": "human", "value": "Does anyone think it is possible to build a Google Docs style PDF document viewer, which will convert a document to a format that doesn't require Adobe Reader on the client machine?\nIf so, any references to point to? Either a place that had done it, or an explanation of how to...
I have created a windows service that uses Windows Messaging System. When I test the app from the debugger the Messages go through nicely but when I install it my messag … asked 14 mins ago vladimir 1tuga
It seems like your Windows service is successfully sending and receiving messages when run in debug mode, but you're encountering issues when it's installed and running as a service. This is a common challenge due to the differences in the execution context between a debugger and a Windows service environment. Here are...
47,396
[ { "from": "human", "value": "I have created a windows service that uses Windows Messaging System. When I test the app from the debugger the Messages go through nicely but when I install it my messag … asked 14 mins ago\nvladimir\n1tuga \n" }, { "from": "gpt", "value": "It seems like your Windows...
Is anyone familiar with a tool that generates code stubs with meaningful names from class and javadoc? The real question should've been "I have classes without debug information and a matching javadoc, but my IntelliJ IDEA 8.0.1 (please, no IDE wars) doesn't take into account the javadoc and shows me "void setLocation(...
In your situation, you're dealing with classes that lack debug information (like parameter names) and instead rely on Javadoc comments for context. Since IntelliJ IDEA 8.0.1 is relatively old, it may not have built-in support for extracting parameter names from Javadoc comments for method stubs. However, here are a few...
48,615
[ { "from": "human", "value": "Is anyone familiar with a tool that generates code stubs with meaningful names from class and javadoc?\nThe real question should've been \"I have classes without debug information and a matching javadoc, but my IntelliJ IDEA 8.0.1 (please, no IDE wars) doesn't take into account ...
Unlike C++, in C# you can't overload the assignment operator. I'm doing a custom Number class for arithmetic operations with very large numbers and I want it to have the look-and-feel of the built-in numerical types like int, decimal, etc. I've overloaded the arithmetic operators, but the assignment remains... Here's ...
In C#, you cannot directly overload the assignment operator (`=`) because assignment in C# is defined at the language level and not extensible by user code. However, you can achieve similar functionality to what you're looking for by implementing a copy constructor and a method for creating a copy of your custom `Numbe...
46,972
[ { "from": "human", "value": "Unlike C++, in C# you can't overload the assignment operator. \nI'm doing a custom Number class for arithmetic operations with very large numbers and I want it to have the look-and-feel of the built-in numerical types like int, decimal, etc. I've overloaded the arithmetic operat...
All of my methods are failing me in various ways. different lighting can mess it all up too. has anyone every trying to return a name given a rgb value? "red" "green" "blue" would be enough to satisfy my needs for today. i have unsafe byte processing of images from my web cam.
If you're looking to identify the closest color name based on RGB values, you can create a simple mapping between RGB values and color names. Here's a straightforward approach you can use in Python: 1. **Define a mapping of color names to their RGB values**. 2. **Calculate the Euclidean distance** between the provided...
45,204
[ { "from": "human", "value": "All of my methods are failing me in various ways.\ndifferent lighting can mess it all up too.\nhas anyone every trying to return a name given a rgb value? \"red\" \"green\" \"blue\" would be enough to satisfy my needs for today.\ni have unsafe byte processing of images from my w...
I want to make a prototype of a website. Is there any visio stencil which gives a hand drawn look to the prototype? I found one such template with few shapes, but these are not enough to easily create a prototype: http://www.visguy.com/2008/08/20/indexed-shapes-for-that-hand-drawn-look/
Creating a hand-drawn look for a website prototype can be a great way to convey ideas quickly and creatively. While the Visio stencil you mentioned provides a starting point, you might want to consider a few additional resources and tips to enhance your prototype: 1. **Additional Stencils:** - **Balsamiq Mockups:**...
47,316
[ { "from": "human", "value": "I want to make a prototype of a website. Is there any visio stencil which gives a hand drawn look to the prototype? I found one such template with few shapes, but these are not enough to easily create a prototype:\nhttp://www.visguy.com/2008/08/20/indexed-shapes-for-that-hand-dr...
Would someone please tell me specifically where can I download Oracle Directory Manager component? I know it's in one of the Oracle 10g discs but which one? Database, Client or Companion CD.
Oracle Directory Manager is part of the Oracle Identity Management suite and can be found on the Oracle 10g Companion CD. The Companion CD typically includes various tools and utilities related to Oracle products. To install Oracle Directory Manager, you would need to ensure that you have the correct environment and ...
49,213
[ { "from": "human", "value": "Would someone please tell me specifically where can I download Oracle Directory Manager component? I know it's in one of the Oracle 10g discs but which one? Database, Client or Companion CD.\n" }, { "from": "gpt", "value": "Oracle Directory Manager is part of the Ora...
I know you can use the <jsp:useBean> tag to instantiate objects within JSPs without resorting to scriptlet code. However I'd like to instantiate an Integer who value is the result of an EL expression, something like: <jsp:useBean id="total" class="java.lang.Integer"> <jsp:setProperty name="amount" value="${param1 +...
In JSP, you're correct that the `<jsp:useBean>` tag is designed to instantiate beans and set properties on them. However, as you've noted, the `Integer` class in Java does not have a setter method for its value because it is immutable. The `<jsp:setProperty>` tag expects a property that exists on the bean, which the `I...
44,147
[ { "from": "human", "value": "I know you can use the <jsp:useBean> tag to instantiate objects within JSPs without resorting to scriptlet code. However I'd like to instantiate an Integer who value is the result of an EL expression, something like:\n<jsp:useBean id=\"total\" class=\"java.lang.Integer\">\n <...
I am looking for a solid and easy to pick up .NET Web Application Framework for company-wide development use. I am considering DotNetNuke. Is it good ? What else can you recommend ?
DotNetNuke (DNN) is a popular open-source web content management system (CMS) and web application framework built on the .NET platform. It's known for its ease of use and extensibility, making it a solid choice for many organizations, especially for building intranets, portals, and other web applications that require c...
44,596
[ { "from": "human", "value": "I am looking for a solid and easy to pick up .NET Web Application Framework for company-wide development use. I am considering DotNetNuke. Is it good ? What else can you recommend ?\n" }, { "from": "gpt", "value": "DotNetNuke (DNN) is a popular open-source web conten...
Do programmers like to create deadlines? Im a web developer, and schedules/deadlines are all over the place in my field. But I've worked with some software engineers/programmers who hate deadlines, is there a way around that?
The relationship between programmers and deadlines can be complex and varies widely among individuals and teams. Here are some considerations regarding why some programmers might dislike deadlines and how you can work towards creating a more positive environment around them: ### Why Some Programmers Dislike Deadlines:...
47,603
[ { "from": "human", "value": "Do programmers like to create deadlines? Im a web developer, and schedules/deadlines are all over the place in my field. But I've worked with some software engineers/programmers who hate deadlines, is there a way around that?\n" }, { "from": "gpt", "value": "The rela...
If I try to use a closure on an event handler the compiler complains with : Incompatible types: "method pointer and regular procedure" which I understand.. but is there a way to use a clouser on method pointers? and how to define if can? eg : Button1.Onclick = procedure( sender : tobject ) begin ... end; Thanks!
In Delphi (which your example suggests you're using), closures provide a way to create anonymous methods that can capture variables from their surrounding context. However, when you assign an anonymous method to an event handler (such as `Button1.OnClick`), you need to ensure that the method pointer type is compatible ...
44,702
[ { "from": "human", "value": "If I try to use a closure on an event handler the compiler complains with :\nIncompatible types: \"method pointer and regular procedure\"\nwhich I understand.. but is there a way to use a clouser on method pointers? and how to define if can?\neg : \nButton1.Onclick = procedure( ...
I'm using WinRAR SFX module to create an installation, and use its presetup option to run some preliminary tests. Since wscript can only accept vbs file, and not the script itself, I first run "cmd /c echo {...script code...} > setup.vbs", and then I run "wscript setup.vbs". The run of the first cmd command opens a bri...
You can avoid opening a command prompt window when creating a VBScript file by using the Windows Script Host (WSH) directly through a script. Instead of using the `cmd` command to echo your script content into a file, you can write a small VBScript that does this for you. Here's how you can create a VBScript file wit...
47,997
[ { "from": "human", "value": "I'm using WinRAR SFX module to create an installation, and use its presetup option to run some preliminary tests.\nSince wscript can only accept vbs file, and not the script itself, I first run \"cmd /c echo {...script code...} > setup.vbs\", and then I run \"wscript setup.vbs\"...
At various times in my career I have encouraged staff I worked with and/or managed to track defects in artifacts of the development process other than source code (i.e. requirements, tests, design). Each time the request has been met with astonishment, confusion and resistance. It seems so obvious to me that I'm always...
Yes, many organizations have begun to recognize the value of tracking defects throughout the entire software development lifecycle, not just in the source code. This practice is often part of a broader quality assurance and continuous improvement strategy. Here are some common areas where defects are tracked beyond the...
46,779
[ { "from": "human", "value": "At various times in my career I have encouraged staff I worked with and/or managed to track defects in artifacts of the development process other than source code (i.e. requirements, tests, design). Each time the request has been met with astonishment, confusion and resistance. ...
Suppose I have an interval (a,b), and a number of subintervals {(ai,bi)}i whose union is all of (a,b). Is there an efficient way to choose a minimal-cardinality subset of these subintervals which still covers (a,b)?
Yes, you can solve the problem of choosing a minimal-cardinality subset of subintervals that covers the interval \( (a, b) \) by using a greedy algorithm, which is a common approach to tackle the interval covering problems. Here’s a step-by-step outline of the algorithm: 1. **Sort the Subintervals**: First, sort the l...
44,294
[ { "from": "human", "value": "Suppose I have an interval (a,b), and a number of subintervals {(ai,bi)}i whose union is all of (a,b). Is there an efficient way to choose a minimal-cardinality subset of these subintervals which still covers (a,b)?\n" }, { "from": "gpt", "value": "Yes, you can solv...
How do I extract a tar (or tar.gz, or tar.bz2) file in Java?
Extracting `.tar`, `.tar.gz`, or `.tar.bz2` files in Java can be done using the `java.util.zip` package for basic tar files and libraries like Apache Commons Compress for compressed archives like `.tar.gz` and `.tar.bz2`. Below, I provide examples for each case. ### 1. Extracting `.tar` files You can use the `java.ut...
40,374
[ { "from": "human", "value": "How do I extract a tar (or tar.gz, or tar.bz2) file in Java?\n" }, { "from": "gpt", "value": "Extracting `.tar`, `.tar.gz`, or `.tar.bz2` files in Java can be done using the `java.util.zip` package for basic tar files and libraries like Apache Commons Compress for co...
I still havent' figured out active directory, so I was hoping you guys could recommend some 3rd party components that would have all the built in methods done for me :) I usually build my own users table with permissions/role tables, but want to add active directory as an option so you can tap into users already setup ...
There are several third-party libraries and components available that can help you integrate Active Directory (AD) authentication in your .NET applications without having to build everything from scratch. Here are a few popular ones: 1. **Novell's LDAP Library**: - **Overview**: Although primarily an LDAP library, ...
43,037
[ { "from": "human", "value": "I still havent' figured out active directory, so I was hoping you guys could recommend some 3rd party components that would have all the built in methods done for me :)\nI usually build my own users table with permissions/role tables, but want to add active directory as an optio...
This is a follow-up to a previous question of mine. In the previous question, methods were explored to implement what was essentially the same test over an entire family of functions, ensuring testing did not stop at the first function that failed. My preferred solution used a metaclass to dynamically insert the tests ...
If you want to use `nose` to discover and run tests that are dynamically generated using a metaclass, you need to make sure that the dynamically created test methods are set up in such a way that `nose` recognizes them as valid test methods. By default, `nose` looks for methods that match the pattern of `test_*` in cla...
44,414
[ { "from": "human", "value": "This is a follow-up to a previous question of mine.\nIn the previous question, methods were explored to implement what was essentially the same test over an entire family of functions, ensuring testing did not stop at the first function that failed.\nMy preferred solution used a...
I've got no experience with this, so i suspect my logic is overly complicated, or perhaps not complete enough to do what I want. I have a basic tile based system, but want to move units over the terrain in a coninuous fashion. Right now they are "teleporting" from one tile to another. I already have a lot of the ga...
Decoupling movement from a tile-based system while still maintaining the underlying tile-based logic is a great approach to creating a more fluid and continuous movement experience for your units. Here’s a structured way to achieve this while considering your existing game logic: ### 1. Define Movement Vectors Instead...
43,656
[ { "from": "human", "value": "I've got no experience with this, so i suspect my logic is overly complicated, or perhaps not complete enough to do what I want. \nI have a basic tile based system, but want to move units over the terrain in a coninuous fashion. Right now they are \"teleporting\" from one til...
Can someone explain to me why I'm seeing the following behavior: mysql> show index from history_historyentry; +----------------------+------------+------------------------------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+ | Table | Non_unique ...
The behavior you are observing in your MySQL query explanations is primarily due to the nature of the data distribution in the `is_deleted` column and how MySQL's query optimizer determines the most efficient way to execute your queries based on the existing indexes. ### Breakdown of the Queries: 1. **Initial Queries...
44,767
[ { "from": "human", "value": "Can someone explain to me why I'm seeing the following behavior:\nmysql> show index from history_historyentry;\n+----------------------+------------+------------------------------+--------------+-------------+-----------+-------------+----------+--------+------+------------+----...
I am using a System.Random object which is instantiated with a fixed seed all thoughout the application. I am calling the NextDouble method and after some time passed I am getting 0.0 as result. Is there any remedy to this, has anyone else encountered this ? EDIT: I have one seed for the whole run which is set to 1000 ...
Using a `System.Random` object with a fixed seed will indeed result in deterministic sequences of random numbers. This means that every time you start your application, you will get the same sequence of numbers, which can be beneficial for debugging or testing but can also introduce issues in certain scenarios. When y...
40,569
[ { "from": "human", "value": "I am using a System.Random object which is instantiated with a fixed seed all thoughout the application. I am calling the NextDouble method and after some time passed I am getting 0.0 as result.\nIs there any remedy to this, has anyone else encountered this ?\nEDIT: I have one s...
I am building an Eclipse plug-in that provides a set of core features in the regular plug-in project. The optional features I am providing via fragment projects. But I need the fragments to register themselves with the main plug-in on start-up. I cannot have a Bundle-Activator in the fragment project. So I am wondering...
In Eclipse, fragments do not have a Bundle-Activator and therefore cannot have their own entry points like regular plug-ins. However, the approach you've used to register your fragments using the Eclipse extension point mechanism is indeed the recommended way to enable fragments to "register" themselves with the main p...
45,236
[ { "from": "human", "value": "I am building an Eclipse plug-in that provides a set of core features in the regular plug-in project. The optional features I am providing via fragment projects. But I need the fragments to register themselves with the main plug-in on start-up.\nI cannot have a Bundle-Activator ...
I am trying to create some HTML which shows me if my server is available from the internet, green light OK red light unavailable. This I can do for a remote site but not for my home, my router seems to prevent me from returning to home via my static IP address. I want to create some HTML so that I see how I look from m...
To monitor the availability of your server from a remote location (like your ISP), the JavaScript you've written will not work as intended because it is executed in the user's browser and will resolve using the local network settings. Instead, you can create a server-side script that checks the availability of your se...
45,922
[ { "from": "human", "value": "I am trying to create some HTML which shows me if my server is available from the internet, green light OK red light unavailable. This I can do for a remote site but not for my home, my router seems to prevent me from returning to home via my static IP address. I want to create ...
I have an application which tries to load some expected registry settings within its constructor. What is the most appropriate .NET Exception from the BCL to throw if these (essential, non-defaultable) registry settings cannot be loaded? For example: RegistryKey registryKey = Registry.LocalMachine.OpenSubkey("HKLM\Foo...
In this scenario, since the application is attempting to load essential configuration settings from the Windows Registry and those settings cannot be found, the most appropriate exception to throw would be `InvalidOperationException`. This exception is commonly used when the object is in an invalid state for the method...
45,726
[ { "from": "human", "value": "I have an application which tries to load some expected registry settings within its constructor.\nWhat is the most appropriate .NET Exception from the BCL to throw if these (essential, non-defaultable) registry settings cannot be loaded?\nFor example:\n RegistryKey registryKey ...
I have a MS SQL DB with various tables, and one field in particular is causing me grief. The Data type is set to varchar(100), however the field is limited to 60 characters. If I try to put any string with more than 60 characters into the field I get an exception, "String or binary data would be truncated". Although th...
It sounds like you were able to identify the source of the issue: the stored procedure triggered by an update operation on your original table was inserting data into another table with a column restricted to 60 characters. This can lead to the "String or binary data would be truncated" exception when trying to update ...
46,569
[ { "from": "human", "value": "I have a MS SQL DB with various tables, and one field in particular is causing me grief.\nThe Data type is set to varchar(100), however the field is limited to 60 characters.\nIf I try to put any string with more than 60 characters into the field I get an exception,\n\"String or...
Say that I have two models- Users and Accounts. Each account can have at most n users associated with it, and a user can only be associated with one account. It would seem natural to say that User belongs_to :account and Account has_many :users However, I'm not clear on the best practice when it comes to limiting ...
You're correct in noting that enforcing a limit on the number of associated records in a `has_many` relationship can be a bit tricky in Rails, especially when you're considering different ways that associations can be created. Here are some best practices to achieve your goal of limiting the number of `User` associati...
44,951
[ { "from": "human", "value": "Say that I have two models- Users and Accounts. Each account can have at most n users associated with it, and a user can only be associated with one account. \nIt would seem natural to say that User \nbelongs_to :account\n\nand Account \nhas_many :users\n\nHowever, I'm not clear...
A few months ago, I have programmed an ASP.NET GridView with a custom "Delete" LinkButton and Client-Side JavaScript Confirmation according to this msdn article: http://msdn.microsoft.com/en-us/library/bb428868.aspx (published in April 2007) or e.g. Javascript before asp:ButtonField click The code looks like this: <Ite...
The behavior you're experiencing with the confirmation dialog in Internet Explorer (IE) is indeed perplexing, especially since it works on some machines but not others with the same version of IE. Here are several potential causes and solutions you might consider: ### 1. **JavaScript Errors:** - Check for any JavaS...
46,725
[ { "from": "human", "value": "A few months ago, I have programmed an ASP.NET GridView with a custom \"Delete\" LinkButton and Client-Side JavaScript Confirmation according to this msdn article:\nhttp://msdn.microsoft.com/en-us/library/bb428868.aspx (published in April 2007)\nor e.g. Javascript before asp:But...
I am using Dojo 1.2 to implement some functionality on my customer's webpage. One of the widgets I use is the dijit.layout.TabContainer, which inherits StackContainer. The StackContainer subscribes on keyboard events and creates a few hotkeys, like arrow left to move one tab to the left and so on. Now to the question: ...
In Dojo 1.2, there isn't a direct configuration option in the `dijit.layout.TabContainer` or `StackContainer` to disable the default keyboard navigation features. However, you can achieve the desired functionality without modifying the Dojo core by overriding the keyboard event handlers in your `TabContainer` instance....
47,340
[ { "from": "human", "value": "I am using Dojo 1.2 to implement some functionality on my customer's webpage. One of the widgets I use is the dijit.layout.TabContainer, which inherits StackContainer. The StackContainer subscribes on keyboard events and creates a few hotkeys, like arrow left to move one tab to ...
Suppose I have service layer doing hibernate and DB stuff. Silverlight and windows clients need to get service layer through some kind of remote service. ASP.NET would benefit if could get it directly (on the same machine, same process, class instantiation). Is it a good idea to use spring or other tool to "get" your s...
Using a Dependency Injection (DI) container like Spring (or other similar tools) to manage your service layer and facilitate interaction between different clients (like Silverlight, Windows clients, and ASP.NET) is generally a good idea for several reasons: ### 1. **Decoupling and Flexibility**: - By using a DI con...
46,206
[ { "from": "human", "value": "Suppose I have service layer doing hibernate and DB stuff.\nSilverlight and windows clients need to get service layer through some kind of remote service.\nASP.NET would benefit if could get it directly (on the same machine, same process, class instantiation).\nIs it a good idea...
I have this: If String.IsNullOrEmpty(editTransactionRow.pay_id.ToString()) = False Then stTransactionPaymentID = editTransactionRow.pay_id 'Check for null value End If Now, when editTransactionRow.pay_id is Null Visual Basic throws an exception. Is there something wrong with this code?
Yes, the issue arises from the way you are checking for `Null` and how you're trying to use `ToString()` on `editTransactionRow.pay_id`. In Visual Basic, calling `ToString()` on a `null` or `DBNull` object will throw an exception. To safely check if `editTransactionRow.pay_id` is `Nothing` or `DBNull`, you should chan...
49,805
[ { "from": "human", "value": "I have this:\nIf String.IsNullOrEmpty(editTransactionRow.pay_id.ToString()) = False Then\n stTransactionPaymentID = editTransactionRow.pay_id 'Check for null value\nEnd If\n\nNow, when editTransactionRow.pay_id is Null Visual Basic throws an exception. Is there something wron...
is there any way to make IE6 understand double classes, say I have a class MenuButton with a color class and possibly a clicked class; like : .LeftContent a.MenuButton {..general rules..} .LeftContent a.MenuButton.Orange {..sets background-image..} .LeftContent a.MenuButton.Clicked {...hum ta dum...} Now, IE6 unde...
Internet Explorer 6 has some known issues with CSS, particularly with the way it handles multiple class names. Unfortunately, IE6 does not fully support the CSS selector specificity you would expect when dealing with multiple classes. Here are a few potential workarounds you can consider: 1. **Use Separate Class Nam...
48,143
[ { "from": "human", "value": "is there any way to make IE6 understand double classes,\nsay I have a class MenuButton with a color class and possibly a clicked class;\nlike :\n.LeftContent a.MenuButton {..general rules..} \n.LeftContent a.MenuButton.Orange {..sets background-image..} \n.LeftContent a.MenuBu...
H guys, I've got this wiki formatting algorithm which I am using at Stacked to create HTML out of "wiki syntax" and I am not really sure if the current one I am using is good enough, optimal or contains bugs since I am not really a "Regex Guru". Here is what I am currently using; // Body is wiki content... string tmp =...
Your regex logic has the right idea for converting wiki syntax to HTML, but there are definitely some areas where it could be improved for efficiency, correctness, and maintainability. I'll provide some suggestions, as well as highlight potential issues with the current implementation. ### Key Observations and Recomme...
43,032
[ { "from": "human", "value": "H guys, I've got this wiki formatting algorithm which I am using at Stacked to create HTML out of \"wiki syntax\" and I am not really sure if the current one I am using is good enough, optimal or contains bugs since I am not really a \"Regex Guru\". Here is what I am currently u...
I'm using re.findall() to extract some version numbers from an HTML file: >>> import re >>> text = "<table><td><a href=\"url\">Test0.2.1.zip</a></td><td>Test0.2.1</td></table> Test0.2.1" >>> re.findall("Test([\.0-9]*)", text) ['0.2.1.', '0.2.1', '0.2.1'] but I would like to only get the ones that do not end in a dot. ...
To achieve your goal of extracting version numbers that do not end with a dot, you can adjust your regex pattern to use a negative lookahead. This way, you can ensure that the version number is not immediately followed by a dot. Here's the updated regex pattern: ```python import re text = "<table><td><a href=\"url\...
47,314
[ { "from": "human", "value": "I'm using re.findall() to extract some version numbers from an HTML file:\n>>> import re\n>>> text = \"<table><td><a href=\\\"url\\\">Test0.2.1.zip</a></td><td>Test0.2.1</td></table> Test0.2.1\"\n>>> re.findall(\"Test([\\.0-9]*)\", text)\n['0.2.1.', '0.2.1', '0.2.1']\n\nbut I wo...
How can I verify a Google authentication access token? I need to somehow query Google and ask: Is [given access token] valid for the [example@example.com] Google account? Short version It's clear how an access token supplied through the Google Authentication Api :: OAuth Authentication for Web Applications can be used ...
To verify a Google authentication access token and check if it is valid for a specific Google account (such as `example@example.com`), you can use the tokeninfo endpoint provided by Google. This allows you to validate the access token and retrieve information associated with it. Here's how you can do this: 1. **Use t...
44,149
[ { "from": "human", "value": "How can I verify a Google authentication access token?\nI need to somehow query Google and ask: Is [given access token] valid for the [example@example.com] Google account?\nShort version\nIt's clear how an access token supplied through the Google Authentication Api :: OAuth Auth...
How do you implement the search capabilities of Lucene.net in asp.net? If possible, please include links or example code.
Implementing search capabilities using Lucene.NET in an ASP.NET application involves several steps, including indexing your data and providing a search interface for querying that data. Below, I'll provide a simple example and explain the necessary steps. ### Steps to Implement Lucene.NET in ASP.NET 1. **Install Luce...
41,019
[ { "from": "human", "value": "How do you implement the search capabilities of Lucene.net in asp.net? If possible, please include links or example code.\n" }, { "from": "gpt", "value": "Implementing search capabilities using Lucene.NET in an ASP.NET application involves several steps, including in...
I need a simple window with three input boxes and three labels (login name, password, and server node) and a button to execute the script. I do not want any third party programs that need to be installed on Windows. If it can be installed on Cygwin that would be great.
You can create a simple graphical user interface (GUI) using Python's built-in `tkinter` module, which is included with most Python installations on Windows. This approach does not require any third-party software and can be run from Cygwin if Python is installed. Here's how you can create a simple window with three i...
44,191
[ { "from": "human", "value": "I need a simple window with three input boxes and three labels (login name, password, and server node) and a button to execute the script. I do not want any third party programs that need to be installed on Windows. If it can be installed on Cygwin that would be great.\n" }, ...
Im trying to get a completly data copy from a gridview, itryed clone(), tryed cast DataView from DataSouce, but always get nulls or cant get the data, please exists a way to copy data from gridview, modified it and then reload it? or modifyng directly some rows in the gridview? thanks in advance!
To achieve a complete copy of the data from a GridView in a Windows Forms or ASP.NET environment, you typically need to work with the underlying data source that the GridView is bound to. Here are several approaches you can take depending on your context: ### 1. Working with DataTable If your GridView is bound to a `...
44,645
[ { "from": "human", "value": "Im trying to get a completly data copy from a gridview, itryed clone(), tryed cast DataView from DataSouce, but always get nulls or cant get the data, please exists a way to copy data from gridview, modified it and then reload it? or modifyng directly some rows in the gridview? ...
1st post on stackoverflow, hope to have great feedback :) I'm currently trying to load balance our web site. We have set up a 2 cluster NLB on windows server 2003 with IIS 6. While testing the setup, I found that sometimes, our session is lost. A day and a half later, here's the result: Yes, our machine.config both ha...
Welcome to Stack Overflow, JF! It's great to see you reaching out for help with your issue. Let's see if we can troubleshoot the session loss in your NLB setup. From your description, it appears that you have taken significant steps to ensure that both your servers in the NLB cluster are configured correctly. However,...
46,025
[ { "from": "human", "value": "1st post on stackoverflow, hope to have great feedback :)\nI'm currently trying to load balance our web site. We have set up a 2 cluster NLB on windows server 2003 with IIS 6.\nWhile testing the setup, I found that sometimes, our session is lost. A day and a half later, here's t...
We create tables in runtime. They have the same schema layout as tables that exist in our DBML but with an alternate name. We want to set the table names in runtime in our use of Linq to Sql. Using wrapper classes on the Metadata as outlined in https://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=4233721&SiteID=1 wor...
To achieve dynamic table naming with LINQ to SQL while still utilizing the existing schema layout defined in your DBML, you will need to extend the way LINQ to SQL handles metadata. Here are a couple of steps and considerations to allow for querying with alternate table names. ### 1. Create a Custom DataContext You c...
44,910
[ { "from": "human", "value": "We create tables in runtime. They have the same schema layout as tables that exist in our DBML but with an alternate name. We want to set the table names in runtime in our use of Linq to Sql.\nUsing wrapper classes on the Metadata as outlined in https://forums.microsoft.com/MSDN...
How can I implement ActiveX Document on C#/.NET? (ActiveX Document can draw itself in IE) Update: I need a solution for drawing my own document type in IE windows (like MS Word or MS Excel draw its documents in IE).
Implementing an ActiveX Document in C#/.NET to be rendered in Internet Explorer (IE) can be quite complex. ActiveX Documents are a feature associated primarily with older technologies and are more commonly linked with Visual Basic and unmanaged C/C++ applications. However, if you still want to pursue this route, here a...
41,195
[ { "from": "human", "value": "How can I implement ActiveX Document on C#/.NET? (ActiveX Document can draw itself in IE)\nUpdate: I need a solution for drawing my own document type in IE windows (like MS Word or MS Excel draw its documents in IE). \n" }, { "from": "gpt", "value": "Implementing an ...
As part of a VBA program, I have to set the background colors of certain cells to green, yellow or red, based on their values (basically a health monitor where green is okay, yellow is borderline and red is dangerous). I know how to set the values of those cells, but how do I set the background color.
In VBA (Visual Basic for Applications), you can set the background color of cells using the `Interior.Color` property. The following example demonstrates how you can change the background color of cells based on their values to represent different health status: green for okay, yellow for borderline, and red for danger...
45,310
[ { "from": "human", "value": "As part of a VBA program, I have to set the background colors of certain cells to green, yellow or red, based on their values (basically a health monitor where green is okay, yellow is borderline and red is dangerous).\nI know how to set the values of those cells, but how do I s...
In Eclipse I can set all kinds of preferences for coding style. I'd like to be able to enforce these as an ant task to make the build break. Can anyone give me an example of how to enforce eclipse coding styles in an Ant task? (I KNOW about PMD, checkstyle etc - none of these EXACTLY match the eclipse preferences for ...
To enforce Eclipse coding styles in an Ant build, you can leverage the Eclipse Code Formatter. The Eclipse IDE provides a way to export your coding style preferences into a configuration file that can be used outside of the IDE. Here’s a step-by-step guide on how to set this up: ### Step 1: Export Eclipse Code Format...
44,077
[ { "from": "human", "value": "In Eclipse I can set all kinds of preferences for coding style. I'd like to be able to enforce these as an ant task to make the build break. \nCan anyone give me an example of how to enforce eclipse coding styles in an Ant task?\n(I KNOW about PMD, checkstyle etc - none of these...
What is the syntax to concatenate text into a binding expression for an asp.net webpage (aspx). For example if I had a hyperlink that was being bound like this: <asp:HyperLink id="lnkID" NavigateUrl='<%# Bind("Link") %>' Target="_blank" Text="View" runat="server"/> How do you change, say, the ...
In ASP.NET Web Forms, when you are using data binding expressions within server controls (like `<asp:HyperLink>`), you cannot use C# operators or methods directly within the binding expression syntax. Instead, you need to use the `Eval` method to retrieve the data and concatenate it properly. Here's how you can concat...
47,540
[ { "from": "human", "value": "What is the syntax to concatenate text into a binding expression for an asp.net webpage (aspx).\nFor example if I had a hyperlink that was being bound like this:\n<asp:HyperLink id=\"lnkID\" NavigateUrl='<%# Bind(\"Link\") %>' Target=\"_blank\" \n Text=\"V...