instruction
stringlengths
14
27.6k
completion
stringlengths
3
38.3k
__original_row_idx
int64
0
50k
conversations
listlengths
2
2
ArrayList <String> list = new ArrayList(); list.add("behold"); list.add("bend"); list.add("bet"); list.add("bear"); list.add("beat"); list.add("become"); list.add("begin"); There is a way to search for the regexp bea.* and get the indexes like in ArrayList.indexOf ? EDIT: returning the items is fine but I need somet...
To search for regular expressions in an `ArrayList<String>` efficiently, you can use a combination of `Pattern` and `Matcher` from the `java.util.regex` package. However, keep in mind that the underlying data structure of `ArrayList` does not support indexed-based searches like more complex data structures (e.g., a `Tr...
40,568
[ { "from": "human", "value": "ArrayList <String> list = new ArrayList(); \nlist.add(\"behold\");\nlist.add(\"bend\");\nlist.add(\"bet\");\nlist.add(\"bear\");\nlist.add(\"beat\");\nlist.add(\"become\");\nlist.add(\"begin\"); \n\nThere is a way to search for the regexp bea.* and get the indexes like in ArrayL...
When I try using a Name="id" and\or x:name="id" I get a compiler error: The Type 'MyName' was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been built. When I don't have this specified my control runs just fine. Any suggestions?
The error you're encountering suggests that there is a conflict or issue with naming in your XAML or code-behind. Using the names "id" or "ID" can sometimes cause conflicts, especially in certain frameworks or with specific naming conventions. Here are some steps you can take to troubleshoot and resolve this issue: 1....
43,051
[ { "from": "human", "value": "When I try using a Name=\"id\" and\\or x:name=\"id\" I get a compiler error:\nThe Type 'MyName' was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been built.\n\nWhen I don't have this specified my control runs just fine....
I know that you cannot return anonymous types from methods but I am wondering how the Select extension method returns an anonymous type. Is it just a compiler trick? Edit Suppose L is a List. How does this work? L.Select(s => new { Name = s }) The return type is IEnumerable<'a> where 'a = new {String Name}
You're correct that you cannot directly return anonymous types from methods in C# because anonymous types don't have a name that can be used as a return type. However, when using the `Select` extension method (from LINQ) with a lambda expression that creates an anonymous type, the compiler manages the type through a fe...
41,805
[ { "from": "human", "value": "I know that you cannot return anonymous types from methods but I am wondering how the Select extension method returns an anonymous type. Is it just a compiler trick?\nEdit\nSuppose L is a List. How does this work?\nL.Select(s => new { Name = s })\n\nThe return type is IEnumerabl...
When and why would somebody do the following: doSomething( (MyClass) null ); Have you ever done this? Could you please share your experience?
The expression `doSomething((MyClass) null);` might seem a bit unusual at first glance, but there are specific situations in which someone might use this pattern in Java (or similar languages). Here's an explanation of when and why someone might do this: ### When to Use This Pattern 1. **Method Overloading**: This is...
41,307
[ { "from": "human", "value": "When and why would somebody do the following:\ndoSomething( (MyClass) null );\n\nHave you ever done this? Could you please share your experience?\n" }, { "from": "gpt", "value": "The expression `doSomething((MyClass) null);` might seem a bit unusual at first glance, ...
I have a QVariant object within a QTreeWidgetItem, how can I cast it to my own object?
To cast a `QVariant` object stored in a `QTreeWidgetItem` to your own object, you can use `qvariant_cast`. The `QVariant` class provides a mechanism for type-safe type conversions, allowing you to extract your custom type from the `QVariant`. Here’s a step-by-step guide: 1. **Ensure your object type is registered wit...
42,510
[ { "from": "human", "value": "I have a QVariant object within a QTreeWidgetItem, how can I cast it to my own object? \n" }, { "from": "gpt", "value": "To cast a `QVariant` object stored in a `QTreeWidgetItem` to your own object, you can use `qvariant_cast`. The `QVariant` class provides a mechani...
How do I trigger a delay, let's say I want to call a method (once) in 3 seconds from now, and how do I cancel that call if I need to?
To trigger a method call after a delay and also provide a way to cancel that call, you can use various approaches depending on the programming language and environment you are using. Below, I'll provide examples in JavaScript, Python, and Java: ### JavaScript In JavaScript, you can use the `setTimeout` function to sc...
42,118
[ { "from": "human", "value": "How do I trigger a delay, let's say I want to call a method (once) in 3 seconds from now, and how do I cancel that call if I need to?\n" }, { "from": "gpt", "value": "To trigger a method call after a delay and also provide a way to cancel that call, you can use vario...
I wrote this function that's supposed to do StringPadRight("Hello", 10, "0") -> "Hello00000". char *StringPadRight(char *string, int padded_len, char *pad) { int len = (int) strlen(string); if (len >= padded_len) { return string; } int i; for (i = 0; i < padded_len - len; i++) { strc...
The function you've implemented has some issues that can cause unexpected side effects, particularly because you're using `strcat` on the input string, which may lead to buffer overflows or modify the contents of the `string` variable in ways you didn't intend. Here are the main problems: 1. **Buffer Overflow**: If ...
40,830
[ { "from": "human", "value": "I wrote this function that's supposed to do StringPadRight(\"Hello\", 10, \"0\") -> \"Hello00000\".\nchar *StringPadRight(char *string, int padded_len, char *pad) {\n int len = (int) strlen(string);\n if (len >= padded_len) {\n return string;\n }\n int i;\n ...
I cannot get the internet explorer web developer tool bar to work with a pop-up, it won't render at the bottom of the pop-up. Any suggestions?
When working with Internet Explorer and its Developer Tools, you may encounter issues where the Developer Tool Bar does not render properly in a pop-up window. Here are some suggestions that might help you troubleshoot and resolve this issue: 1. **Open Developer Tools Before the Pop-Up**: Open the Developer Tools befo...
39,589
[ { "from": "human", "value": "I cannot get the internet explorer web developer tool bar to work with a pop-up, it won't render at the bottom of the pop-up. Any suggestions? \n" }, { "from": "gpt", "value": "When working with Internet Explorer and its Developer Tools, you may encounter issues wh...
The title pretty much says it all. Some caveats are: I need to be able to do it in C# It needs to be able to be done from a remote server (ie, running on one server, checking IIS on another) Needs to be close to real-time (within 1 second) Can use WMI calls I've tried watching the log file, but it turns out that isn'...
To monitor IIS requests in near real-time from a remote server using C#, you can utilize the `PerformanceCounter` class, as you've mentioned in your edit. Here's a brief guide on how to implement this in C#. ### Prerequisites 1. Ensure that your application has the necessary permissions to access performance counters ...
41,483
[ { "from": "human", "value": "The title pretty much says it all. Some caveats are:\n\nI need to be able to do it in C#\nIt needs to be able to be done from a remote server (ie, running on one server, checking IIS on another)\nNeeds to be close to real-time (within 1 second)\nCan use WMI calls\n\nI've tried w...
Is it possible through a plugin - activeX, Java or Flex to write a brower plugin that is able to detect an read a data stream from a USB device channel. I have done some research but have not found an answer. http://support.microsoft.com/kb/832678 http://www.vsj.co.uk/articles/display.asp?id=600 Detect USB drive and hi...
Creating a browser plugin that can detect and read data streams from USB devices is a complex task and is generally limited by security and architectural constraints inherent in modern web browsers. ### General Considerations 1. **Security Restrictions**: Browsers are designed to protect users' systems and data. Acce...
42,022
[ { "from": "human", "value": "Is it possible through a plugin - activeX, Java or Flex to write a brower plugin that is able to detect an read a data stream from a USB device channel.\nI have done some research but have not found an answer.\nhttp://support.microsoft.com/kb/832678\nhttp://www.vsj.co.uk/article...
I have one large access database that I need to normalize into five tables and a lookup table. I understand the theory behind normalization and have already sketched out the look of the tables but I am lost on how to transform my table to get the database normalized. The table analyzers doesn't offer the the breakdown ...
Normalizing a database can seem daunting, but breaking it down into steps will make it manageable. Here’s a general guide on how to normalize your large Access database into the five tables and a lookup table that you've designed. This process usually involves identifying the entities in your database, their attributes...
39,016
[ { "from": "human", "value": "I have one large access database that I need to normalize into five tables and a lookup table. I understand the theory behind normalization and have already sketched out the look of the tables but I am lost on how to transform my table to get the database normalized. The table a...
Check it out: this little .NET Console Program yields interesting results...notice how I'm converting a float to an integer in two different ways: using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace CastVsConvert { class Program { static void Main(string[] ar...
The behavior you're observing in your .NET Console Program is due to the way floating-point arithmetic works and how the two methods (`(int)` cast and `Convert.ToInt32()`) handle rounding. Here's a breakdown of the relevant sections of your code: 1. **Calculating `percentage`:** ```csharp percentage = maxWidth ...
41,099
[ { "from": "human", "value": "Check it out: this little .NET Console Program yields interesting results...notice how I'm converting a float to an integer in two different ways:\nusing System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\n\nnamespace CastVsConvert\n{\n class P...
I have written a few modules of code in Access vba. Each code runs for various purpose and performs various actions on the database. I am not too much experinced in vba. I am planning to build an 'interface' or a 'form' so that a user can select which operation he wants to perfgorm and based on that that particular cod...
Creating a user interface in Microsoft Access to run different VBA operations is a great way to make your database more user-friendly. Below are some general steps and resources that will help you build such an interface, as well as tutorials that you can refer to. ### Steps to Create a User Interface in Access 1. **...
40,294
[ { "from": "human", "value": "I have written a few modules of code in Access vba. Each code runs for various purpose and performs various actions on the database.\nI am not too much experinced in vba. I am planning to build an 'interface' or a 'form' so that a user can select which operation he wants to perf...
someone has an idea how can I do that ? thanks
Sure! I’d be happy to help. Could you provide a bit more detail about what you’re trying to do? The more information you give, the better I can assist you!
45,819
[ { "from": "human", "value": "someone has an idea how can I do that ?\nthanks\n" }, { "from": "gpt", "value": "Sure! I’d be happy to help. Could you provide a bit more detail about what you’re trying to do? The more information you give, the better I can assist you!" } ]
What books would you guys recommend if one has been a java developer for years and is now trying to take the c#/asp.net route?
Transitioning from Java to C# and ASP.NET can be an exciting journey, and there are several resources that can help you make that shift smoothly. Here are some book recommendations: ### C# Books 1. **"C# in a Nutshell" by Joseph Albahari and Ben Albahari** - This book serves as both a comprehensive guide and a qui...
41,268
[ { "from": "human", "value": "What books would you guys recommend if one has been a java developer for years and is now trying to take the c#/asp.net route?\n" }, { "from": "gpt", "value": "Transitioning from Java to C# and ASP.NET can be an exciting journey, and there are several resources that ...
I can't seem to get a scrollbar to work in an inner stack/flow. Does anyone know how to?
In order to implement a scrollbar in an inner Stack or Flow layout, you typically need to use a `ScrollView` or a similar component that allows for scrolling behavior. Here’s how you can achieve this in various frameworks and languages. Below are examples for common scenarios using different frameworks: ### For Flutte...
37,915
[ { "from": "human", "value": "I can't seem to get a scrollbar to work in an inner stack/flow. Does anyone know how to?\n" }, { "from": "gpt", "value": "In order to implement a scrollbar in an inner Stack or Flow layout, you typically need to use a `ScrollView` or a similar component that allows ...
How do I create the default for a generic in VB? in C# I can call: T variable = default(T); How do I do this in VB? If this just returns null (C#) or nothing (vb) then what happens to value types? Is there a way to specify for a custom type what the default value is? For instance what if I want the default value to b...
In Visual Basic (VB.NET), you can create a default value for a generic type using the `Activator.CreateInstance` method. This is the equivalent of `default(T)` in C#. For reference types, this will result in `Nothing`, while for value types, it will create an instance with the default value for that type. Here's how y...
43,021
[ { "from": "human", "value": "How do I create the default for a generic in VB? in C# I can call:\nT variable = default(T);\n\n\nHow do I do this in VB?\nIf this just returns null (C#) or nothing (vb) then what happens to value types?\nIs there a way to specify for a custom type what the default value is? For...
I'm creating a rather "dirty" business connector of my own here, and I'm having trouble finding those "custom fields" that have been created. They show up in AX - but in the SQL-database, they are not mentioned at all... I have a hunch that all custom fields are stored somewhere else in the database, so that the origi...
In Microsoft Dynamics AX, custom fields are typically not added directly to the SQL Server database tables in a way that modifies the base schema. Instead, they are handled in a more flexible way using the following methods: 1. **AOT (Application Object Tree)**: Custom fields created in AX are usually stored within th...
41,894
[ { "from": "human", "value": "I'm creating a rather \"dirty\" business connector of my own here, and I'm having trouble finding those \"custom fields\" that have been created. \nThey show up in AX - but in the SQL-database, they are not mentioned at all... I have a hunch that all custom fields are stored som...
Has anyone tried using these new VS2008 MFC classes yet? I can't seem to find any examples anywhere. Even the VS2008 samples(1) don't mention these classes. (They use CToolTip.) (1) Update: My mistake. I had downloaded the non-SP1 samples. I see that the SP1 samples have samples specifically for the 2008 Feature Pack, ...
Using the new tooltip classes introduced in the Visual Studio 2008 Feature Pack can indeed be tricky, especially when trying to integrate them into a standard MFC application that utilizes the document/view architecture. You're right that the new classes, like `CTooltipManager`, provide new features and a more modern a...
37,017
[ { "from": "human", "value": "Has anyone tried using these new VS2008 MFC classes yet? I can't seem to find any examples anywhere. Even the VS2008 samples(1) don't mention these classes. (They use CToolTip.)\n(1) Update: My mistake. I had downloaded the non-SP1 samples. I see that the SP1 samples have sample...
I tried to precompile my ASP.NET MVC application and deploy it to an IIS6 box (with wildcard mapping), however I am getting an error with rendering partial views (user controls). Its working fine on my dev machine before precompiling. The error is: Server Error in '/' Application. The partial view 'ListGrid' could...
The issue you're facing with partial views (user controls) after precompiling your ASP.NET MVC application is common and can be attributed to a few possible misconfigurations. Let's troubleshoot the problem step-by-step. ### Steps to Resolve the Issue 1. **Precompilation Settings**: Ensure that you have correctly con...
40,619
[ { "from": "human", "value": "I tried to precompile my ASP.NET MVC application and deploy it to an IIS6 box (with wildcard mapping), however I am getting an error with rendering partial views (user controls). Its working fine on my dev machine before precompiling.\nThe error is:\n\nServer Error in '/' Appli...
I am dealing with Zend_Form right now and I am having a difficult time figuring out how to: Use custom images for form buttons and, Insert text and links in specific places (in my case I want to put a "forgot your password?" link before the submit button). I've read through the manual but am not seeing anything about...
Using `Zend_Form`, customizing form buttons with images and adding additional text or links can be done with a bit of customization. Here's how you can achieve both of your requirements. ### 1. Using Custom Images for Form Buttons To use custom images for your form buttons, you can make use of the `Zend_Form_Element_...
38,854
[ { "from": "human", "value": "I am dealing with Zend_Form right now and I am having a difficult time figuring out how to:\n\nUse custom images for form buttons and,\nInsert text and links in specific places (in my case I want to put a \"forgot your password?\" link before the submit button).\n\nI've read thr...
A remote site is supplying a data structure in a js file. I can include this file in my page to access the data and display it in my page. <head> <script type="text/javascript" src="http://www.example.co.uk/includes/js/data.js"></script> </head> Does anyone know how I use PHP to take this data and store in it a da...
To use PHP to fetch data from a JavaScript file and store it in a database, you will need to follow these steps: 1. **Ensure the JavaScript file returns data in a usable format**: The JavaScript file should contain an object or array that you can easily convert to JSON format. For example, the JavaScript file may look...
40,668
[ { "from": "human", "value": "A remote site is supplying a data structure in a js file.\nI can include this file in my page to access the data and display it in my page.\n<head>\n <script type=\"text/javascript\" src=\"http://www.example.co.uk/includes/js/data.js\"></script>\n</head>\n\nDoes anyone know h...
I'm trying to connect to an MDF. I've even gone to the lengths of re-installing sql server express entirely (it is now the only flavor of SQL installed on my box, where previously I had 05 dev and express). I've verified that the paths are all correct, and thus far my google-fu hasn't helped. The Full exception messa...
The error message you're encountering indicates a problem with SQL Server User Instances. This feature allows each user to run their own instance of SQL Server Express, but it can sometimes lead to complications during the configuration or connection process. Here are several troubleshooting steps you can take to resol...
38,721
[ { "from": "human", "value": "I'm trying to connect to an MDF. I've even gone to the lengths of re-installing sql server express entirely (it is now the only flavor of SQL installed on my box, where previously I had 05 dev and express). I've verified that the paths are all correct, and thus far my google-f...
Some of the platforms that I develop on, don't have profiling tools. I am looking for suggestions/techniques that you have personally used to help you identify hotspots, without the use of a profiler. The target language is C++. I am interested in what you have personally used.
While I don't have personal experiences, I can suggest several techniques and methods that are commonly used by developers in situations where profiling tools are not available for C++. Here are some practical approaches to help you identify performance hotspots: ### 1. **Manual Instrumentation** - **Timing Section...
38,320
[ { "from": "human", "value": "Some of the platforms that I develop on, don't have profiling tools. I am looking for suggestions/techniques that you have personally used to help you identify hotspots, without the use of a profiler.\nThe target language is C++.\nI am interested in what you have personally use...
I have a web page that uses a frameset. Due to scripting and object dependencies, I need to load the frames in a specific order. I have used this example as a template: The JavaScript Source: Navigation: Frames Load Order This loads an empty page in place of the page I need to load last, then replaces it with the corre...
Handling frames in a way that ensures they load in a specific order while also providing a seamless browsing experience with the back button can be tricky. Unfortunately, due to how frames and the back button interact, there isn't a straightforward solution. However, we can implement a workaround that should meet your ...
40,461
[ { "from": "human", "value": "I have a web page that uses a frameset.\nDue to scripting and object dependencies, I need to load the frames in a specific order.\nI have used this example as a template:\nThe JavaScript Source: Navigation: Frames Load Order\nThis loads an empty page in place of the page I need ...
Is it possible to avoid list property tags when serializing? //[Serializable()] - removed, unnecessary public class Foo { protected List<FooBar> fooBars = new List<FooBar>(); public virtual List<FooBar> FooBars { get { return fooBars; } set { fooBars = value; } } } // [Serializable()] -...
To achieve the desired XML serialization output without the enclosing `<FooBars>` tag, you can implement a custom serialization approach using the `IXmlSerializable` interface. This allows you to control the way the `Foo` class is serialized to XML, including how the `FooBar` objects are represented. Here’s an example...
36,767
[ { "from": "human", "value": "Is it possible to avoid list property tags when serializing?\n//[Serializable()] - removed, unnecessary\npublic class Foo\n{\n protected List<FooBar> fooBars = new List<FooBar>();\n public virtual List<FooBar> FooBars\n {\n get { return fooBars; }\n set { ...
On a website, everything is tagged with keywords assigned by the staff (it's not a community driven site, due to its nature). I am able to determine which tags a user is most active in (or, what tags they view the most). However, I'm not sure how to choose the list. A few options present themselves, but they don't seem...
To effectively identify the most interesting tags for a user and recommend content based on their activity, you need a method that balances simplicity, relevance, and user engagement. Here are some considerations for each option you presented, along with a recommended approach: ### 1. Take the top n (or m < n if they ...
39,632
[ { "from": "human", "value": "On a website, everything is tagged with keywords assigned by the staff (it's not a community driven site, due to its nature). I am able to determine which tags a user is most active in (or, what tags they view the most). However, I'm not sure how to choose the list. A few option...
I am trying to use a RS-232 serial port on my PC with javax.comm class. I am newby on that API, so first of all I go through the documentation and I find out that the first thing you should do is "list" all the ports from the class CommPortListener and pick up one of them. That worked just fine! Problem is, now, that m...
It sounds like you're trying to work with serial ports in Java, and you've run into some issues with the `javax.comm` (Java Communication API) and port availability. Here are some suggestions to help you move forward: ### 1. Use RXTX Library Since `javax.comm` is quite outdated and not well-maintained, a better appro...
40,561
[ { "from": "human", "value": "I am trying to use a RS-232 serial port on my PC with javax.comm class. I am newby on that API, so first of all I go through the documentation and I find out that the first thing you should do is \"list\" all the ports from the class CommPortListener and pick up one of them.\nTh...
Delphi object inspector doesn't show TFrame descendants's additional properties by design. People tend to suggest using a known trick which is commonly used for showing TForm descendant's properties on the Object inspector. The trick is: registering custom module for TForm descendants to Delphi IDE via design time pack...
In Delphi 2007, managing custom properties for `TFrame` descendants while preserving their design-time behaviors can be challenging, as you've encountered. Registering a `TFrame` descendant as a custom module can cause it to lose its intrinsic behavior, including the ability to respond to events or correctly manage chi...
40,350
[ { "from": "human", "value": "Delphi object inspector doesn't show TFrame descendants's additional properties by design.\nPeople tend to suggest using a known trick which is commonly used for showing TForm descendant's properties on the Object inspector. The trick is: registering custom module for TForm desc...
When you login to Stackoverflow you see a button with the openID logo between the text input field and the submit button. When you click this button you get a dropdown with the main openID providers. This is an integrated 3rd party service called 'ID selector' which has been deprecated in favour of it's successor RPX (...
It sounds like you want to translate the user interface of the RPX (RPX Now) service you're using for OpenID login on Stack Overflow to German. While the service may not provide built-in support for multiple languages, there are a few potential approaches you could consider: 1. **Browser Extensions**: You could use br...
42,323
[ { "from": "human", "value": "When you login to Stackoverflow you see a button with the openID logo between the text input field and the submit button.\nWhen you click this button you get a dropdown with the main openID providers. This is an integrated 3rd party service called 'ID selector' which has been de...
I've declared the following bean in my Spring config <bean id="templateCacheClearingTask" class="org.springframework.scheduling.timer.ScheduledTimerTask"> <property name="delay" value="5000" /> <property name="period" value="5000" /> <property name="timerTask"> <bean class="org.springframework.sche...
Hi Don, It looks like you're attempting to use a `ScheduledTimerTask` and a `MethodInvokingTimerTaskFactoryBean` to schedule a method to run periodically. However, there are a few potential issues and considerations you might want to address to ensure this is working correctly. 1. **Ensure Task Scheduling is Enabled*...
41,371
[ { "from": "human", "value": "I've declared the following bean in my Spring config\n<bean id=\"templateCacheClearingTask\" class=\"org.springframework.scheduling.timer.ScheduledTimerTask\">\n <property name=\"delay\" value=\"5000\" />\n <property name=\"period\" value=\"5000\" />\n\n <property name=...
I have a *.MDB database file, and I am wondering if it is possible or recommended to work against it using LINQ in C#. I am also wondering what some simple examples would look like. I don't know a lot about LINQ, but my requirements for this task are pretty simple (I believe). The user will be passing me a file path to...
Yes, it is possible to work with an MDB (Microsoft Access Database) file using LINQ in C#. However, LINQ itself doesn't directly interact with databases; rather, it typically operates with collections in memory. To use LINQ with an MDB file, you can use the Entity Framework or LINQ to SQL, which can be configured to wo...
39,567
[ { "from": "human", "value": "I have a *.MDB database file, and I am wondering if it is possible or recommended to work against it using LINQ in C#. I am also wondering what some simple examples would look like.\nI don't know a lot about LINQ, but my requirements for this task are pretty simple (I believe). ...
Is there any good way to convert strings like "xlSum", "xlAverage", and "xlCount" into the value they have under Microsoft.Office.Interop.Excel.XlConsolidationFunction? I guess reflection would be slow (if its possible). There are about 10 of these constant values. I was trying to avoid a large switch statement if poss...
To convert string representations of constants like "xlSum", "xlAverage", and "xlCount" into their corresponding values from the `Microsoft.Office.Interop.Excel.XlConsolidationFunction` enumeration, you can use a dictionary to map the string names to their respective enumeration values. This approach is efficient and a...
40,769
[ { "from": "human", "value": "Is there any good way to convert strings like \"xlSum\", \"xlAverage\", and \"xlCount\" into the value they have under Microsoft.Office.Interop.Excel.XlConsolidationFunction?\nI guess reflection would be slow (if its possible). There are about 10 of these constant values. I was ...
I have an Xcode project with the following group structure: ProjectName/ Classes/ class1.h class1.m class2.h class2.m ... XMLDocs/ doc1.xml doc2.xml ... Resources/ Info.plist MainMenu.xib ... and so on and so forth. I'd...
Yes, you can organize your Xcode project in a way that reflects your desired folder structure on disk without manually creating folders and repointing references. Here's how you can do it, and I will also provide a method for maintaining the folder structure automatically when adding new files. ### Step 1: Organize Yo...
40,000
[ { "from": "human", "value": "I have an Xcode project with the following group structure:\nProjectName/\n Classes/\n class1.h\n class1.m\n class2.h\n class2.m\n ...\n XMLDocs/\n doc1.xml\n doc2.xml\n ...\n Resources/\n Info.plist\n ...
In C# how do I still show the headers of a gridview, even with the data source is empty. I am not auto generating the columns as they are all predefined. Currently what I am doing is the following. Get a DataTable back from a stored procedure, then set the DataSource of the gridview, and then call DataBind(). This wo...
In .NET 4.0 and later, you can use the `GridView` control's property `ShowHeaderWhenEmpty` to ensure that the headers are displayed even when there are no data rows. This property is set to `false` by default, which is why you're seeing a blank area instead of the headers when the data source is empty. Here's how you ...
43,210
[ { "from": "human", "value": "In C# how do I still show the headers of a gridview, even with the data source is empty. \nI am not auto generating the columns as they are all predefined. \nCurrently what I am doing is the following.\nGet a DataTable back from a stored procedure, then set the DataSource of the...
I've got a DataTable containing a sitemap hierarchy with the following columns: ItemId ParentId Name Url I need to generate a set of nested lists in HTML (left the anchor elements out for clarity): <ul> <li>Item 1</li> <li>Item 2</li> <ul> <li>Sub Item 1</li> <li class="current">Sub Item 2</li> </ul> ...
To generate a nested list in HTML based on a sitemap hierarchy from a DataTable, we can follow a structured approach. The idea is to start from the 'current' node (identified by a specific condition, like a class or property) and then trace back up to the root node, collecting the necessary data to build the HTML struc...
38,244
[ { "from": "human", "value": "I've got a DataTable containing a sitemap hierarchy with the following columns:\n\nItemId\nParentId\nName\nUrl\n\nI need to generate a set of nested lists in HTML (left the anchor elements out for clarity):\n<ul>\n<li>Item 1</li>\n<li>Item 2</li>\n <ul>\n <li>Sub Item 1</l...
I would like to have a single DatagramSocket to listen for both unicast and broadcast messages. Is this possible?
Yes, it is possible to use a single `DatagramSocket` to listen for both unicast and broadcast messages in Java. Here's how it generally works: 1. **Creating the DatagramSocket**: You can create a `DatagramSocket` bound to a specific port on your local machine. This socket will listen for incoming datagrams (both unica...
41,945
[ { "from": "human", "value": "I would like to have a single DatagramSocket to listen for both unicast and broadcast messages. Is this possible?\n" }, { "from": "gpt", "value": "Yes, it is possible to use a single `DatagramSocket` to listen for both unicast and broadcast messages in Java. Here's ...
I saw this signature on the ListView class: public ListView..::.ListViewItemCollection Items { get; } When I saw that, "What?!" I searched "dot dot colon colon dot" and "..::." on Google with no result.
The notation you're seeing with `..:::` in `public ListView..::.ListViewItemCollection Items { get; }` appears to be a result of a formatting issue or a display error, likely due to the way the code or documentation is rendered. In C#, the correct way to reference a nested class or member is using a single period for ...
44,087
[ { "from": "human", "value": "I saw this signature on the ListView class:\npublic ListView..::.ListViewItemCollection Items { get; }\n\nWhen I saw that, \"What?!\"\nI searched \"dot dot colon colon dot\" and \"..::.\" on Google with no result.\n\n" }, { "from": "gpt", "value": "The notation you'r...
I'm using HttpClient to execute a PostMethod against a remote servlet and for some reason a lot of my connections are hanging open and hogging up all of my server's connections. Here's more info about the architecture GWT client calls into a GWT Service GWT service instantiates a HttpClient, creates a PostMethod and ha...
It sounds like you're encountering a connection leakage issue when using `HttpClient` in your GWT service implementation. There are several things to check and improve in your code to ensure that connections are properly managed and released. Here are some suggestions: ### 1. Ensure Proper Connection Release Make sur...
39,239
[ { "from": "human", "value": "I'm using HttpClient to execute a PostMethod against a remote servlet and for some reason a lot of my connections are hanging open and hogging up all of my server's connections.\nHere's more info about the architecture\nGWT client calls into a GWT Service\nGWT service instantiat...
At my company most inventory tracking is done via an ASP.NET web application. The application is poorly conceived, poorly designed, poorly implemented, and somewhat of a hassle for a user to work with. These are things that are my opinion though and management has its own thoughts on the matter. Such luxuries as the ...
Running a web application in fullscreen mode and hiding browser UI elements can create a unique user experience, but it also comes with significant drawbacks and challenges. Here are some key points to consider when discussing the implications of such an approach: ### Advantages: 1. **Focused User Experience**: Hidin...
41,782
[ { "from": "human", "value": "At my company most inventory tracking is done via an ASP.NET web application. The application is poorly conceived, poorly designed, poorly implemented, and somewhat of a hassle for a user to work with. These are things that are my opinion though and management has its own thou...
Entity Framework has created the required partial classes. I can add these partial classes to the Data Sources window and the properties display as expected. However, if I extend any of the classes in a separate source file these properties do not appear in the Data Sources window even after a build and refresh. All pr...
It sounds like you've encountered a common issue when working with Entity Framework (EF) and partial classes, especially when using an Entity Data Model (EDM) designer in Visual Studio. Here are some potential solutions and troubleshooting steps to ensure that your partial classes and their properties appear correctly ...
37,043
[ { "from": "human", "value": "Entity Framework has created the required partial classes. I can add these partial classes to the Data Sources window and the properties display as expected. However, if I extend any of the classes in a separate source file these properties do not appear in the Data Sources wind...
There are a number of great Javascript libraries\frameworks out there (jQuery, Prototype, MooTools, etc.), but they all seem to focus on DOM interaction and AJAX functionality. I haven't found any that focus on extending the built-in data types (String, Date, Number, etc.). And by "Extending" I mean methods to solve ty...
Yes, there are several JavaScript libraries and utility libraries that focus on extending built-in data types like String, Array, Number, and Date, providing additional methods to simplify common programming tasks. Here are a few noteworthy libraries that you might find useful: 1. **Lodash**: - Lodash is a powerful...
38,046
[ { "from": "human", "value": "There are a number of great Javascript libraries\\frameworks out there (jQuery, Prototype, MooTools, etc.), but they all seem to focus on DOM interaction and AJAX functionality. I haven't found any that focus on extending the built-in data types (String, Date, Number, etc.). And...
I'm writing my first app with ASP.NET MVP (attempting Supervisory Controller) and Unit Testing (better late than never!), and I've run into a bit of a dilemma. I've written 3 User Controls, all tested and Interfaced up, Presenters in tow. Now I have come to a Page which takes these three User Controls and encountered...
You're encountering a common challenge when working with the MVP (Model-View-Presenter) pattern, especially when integrating multiple user controls on a single page. It can be tricky to manage communication between these controls and maintain good design principles like the Law of Demeter. Here are some strategies you...
40,267
[ { "from": "human", "value": "I'm writing my first app with ASP.NET MVP (attempting Supervisory Controller) and Unit Testing (better late than never!), and I've run into a bit of a dilemma. I've written 3 User Controls, all tested and Interfaced up, Presenters in tow. Now I have come to a Page which takes ...
I have a user control that I'm building. It's purpose is to display the status of a class to the user. Obviously, this does not matter, and will slow things down when the control runs in the IDE, as it does as soon as you add it to a form. One way to work around this would be to have the control created and added to ...
Yes, you can implement a flag in your user control to determine whether it is being used in the designer or at runtime. In Windows Forms, you can check if the control is in design mode by overriding the `OnHandleCreated` method and using the `DesignMode` property. Here's a simple approach to do that: 1. Create a bool...
42,192
[ { "from": "human", "value": "I have a user control that I'm building. It's purpose is to display the status of a class to the user. Obviously, this does not matter, and will slow things down when the control runs in the IDE, as it does as soon as you add it to a form.\nOne way to work around this would be...
I would like to have the choice in a variable_load function (as used to load variables from menu arguments) to circumvent the remainder of the page rendering process and give the user a "page not found." I could use a drupal_goto() but I would prefer not to redirect the user and change the url in their browser. Is this...
In Drupal, if you want to give a "page not found" response without redirecting the user, you can set the appropriate HTTP status code and render a "page not found" message without changing the URL in their browser. Here's how you can do this: 1. **Set the HTTP Status Code**: Use the `drupal_set_header()` function to s...
40,450
[ { "from": "human", "value": "I would like to have the choice in a variable_load function (as used to load variables from menu arguments) to circumvent the remainder of the page rendering process and give the user a \"page not found.\"\nI could use a drupal_goto() but I would prefer not to redirect the user ...
I am building a slideshow with a few hundred images and would like to build a nice loading bar, so the idea was to preload the images using JavaScript, then initialize the rest of the UI afterwords. Preloading the images is not a problem, but getting the browser to update the status as things load is. I've tried a few ...
The issue you're facing with the browser not updating the UI during image preloading is related to how JavaScript and the browser's rendering engine interact. While the code you have works for preloading images, updates to the DOM (like changing the loading status) may not immediately reflect because the browser batche...
41,848
[ { "from": "human", "value": "I am building a slideshow with a few hundred images and would like to build a nice loading bar, so the idea was to preload the images using JavaScript, then initialize the rest of the UI afterwords.\nPreloading the images is not a problem, but getting the browser to update the s...
I have a Java application and I would like to make it extensible. To create an extension, developers within our company will write a Java class that implements a certain interface. They may also wish to write associated helper classes. I would like to load these extensions into the application without an outage. I w...
You're on the right track in terms of designing an extensible Java application. The approach you're considering—a plugin architecture with strict boundaries on what extensions can do—is a common pattern in software design. Here are some thoughts and suggestions on how to implement this in a structured way: ### 1. Defi...
37,740
[ { "from": "human", "value": "I have a Java application and I would like to make it extensible. To create an extension, developers within our company will write a Java class that implements a certain interface. They may also wish to write associated helper classes. I would like to load these extensions in...
I've used a standard image replacement technique for one of my links, (the nested span technique) but as the image is round & transparent at the edges, the underlying text link is popping through. Heres my screenshot that explains what I mean. http://dl.getdropbox.com/u/240752/peepo.gif Whats the best way to hide this ...
To address the issue of the underlying text link showing through the transparent edges of your image while adhering to best practices, you can consider a few alternative techniques to effectively hide the text without resorting to `display: none` or setting the font size to zero. ### Suggested Solutions: 1. **Use `te...
38,031
[ { "from": "human", "value": "I've used a standard image replacement technique for one of my links, (the nested span technique) but as the image is round & transparent at the edges, the underlying text link is popping through.\nHeres my screenshot that explains what I mean.\nhttp://dl.getdropbox.com/u/240752...
I've not gone into much research here, but the intuitive thing is not working: private void SerachButton1_Click(object sender, EventArgs e) { String serchTerm = searchTerm1.Text; String text = usualTextBox.Text; Int32 index = text.IndexOf(serchTerm); if (index >= 0) { usualTextBox.Select(index, ...
The behavior you are experiencing with both `TextBox` and `RichTextBox` is expected due to how selections work in these controls. Let's address your issues one by one: ### Issue 1: Selection Not Visible in `TextBox` In a standard `TextBox`, when you call the `Select` method, it highlights the specified text. However, ...
40,915
[ { "from": "human", "value": "I've not gone into much research here, but the intuitive thing is not working:\nprivate void SerachButton1_Click(object sender, EventArgs e)\n{\n String serchTerm = searchTerm1.Text;\n String text = usualTextBox.Text;\n\n\n Int32 index = text.IndexOf(serchTerm);\n\n if (...
I am using Html.CheckBox(). The resulting HTML is: <input id="IsMultiGraph" name="IsMultiGraph" value="true" type="checkbox"> <input name="IsMultiGraph" value="false" type="hidden"> On the server I have an Action which is accepting the form post information and using a custom IModelBinder to bind the form results to ...
The behavior you're experiencing is a well-known quirk of how checkboxes are handled in HTML forms. When a checkbox is checked, it submits its value (in this case, `true`). However, when it is unchecked, the hidden input with the value `false` is submitted instead. When the checkbox is checked again, you receive both v...
40,956
[ { "from": "human", "value": "I am using Html.CheckBox(). The resulting HTML is:\n<input id=\"IsMultiGraph\" name=\"IsMultiGraph\" value=\"true\" type=\"checkbox\">\n<input name=\"IsMultiGraph\" value=\"false\" type=\"hidden\">\n\nOn the server I have an Action which is accepting the form post information a...
Is it possible to transform the format of a date value that is passed to the query? I am trying to create a report that interfaces with a SAP back-end, but the query uses a different format for date objects. I need to take the selected date and reformat it to "yyyy.mm.dd" (including the quotes). Is this possible? I can...
Yes, you can transform the format of a date value that is passed to a query in order to match the required format of "yyyy.mm.dd". The specific approach to do this will depend on the database system or the programming language you are using to construct the query. Below are a few general strategies based on common scen...
41,053
[ { "from": "human", "value": "Is it possible to transform the format of a date value that is passed to the query? I am trying to create a report that interfaces with a SAP back-end, but the query uses a different format for date objects. I need to take the selected date and reformat it to \"yyyy.mm.dd\" (inc...
I have a function that exports a table to CSV and in the query I set which fields will export. Here is the query: SELECT lname, fname, email, address1, address2, city, state, zip, venue_id, dtelephone, etelephone, tshirt FROM volunteers_2009 The field venue_id is the the id of the venue which is referred to in anothe...
To include the venue name in your CSV output instead of just the `venue_id`, you'll need to perform a SQL `JOIN` between the `volunteers_2009` table and the `venues` table. This way, you can retrieve the `venue_name` along with the other fields you are exporting. Here's how you can modify your SQL query: ```sql SELEC...
43,072
[ { "from": "human", "value": "I have a function that exports a table to CSV and in the query I set which fields will export.\nHere is the query:\nSELECT lname, fname, email, address1, address2, city, \nstate, zip, venue_id, dtelephone, etelephone, tshirt FROM volunteers_2009\n\nThe field venue_id is the the ...
When I was at university, I took a subject in raytracing (graphics synthesis) and we got a chance to write a 3D ray tracer in C++. That was heaps of fun, except I long ago lost my code in the great hard drive crash of '04'....many files were lost... Is there a RayTracer I can play with in C# that isn't written in one l...
Yes, there are several ray tracing projects in C# that are designed with proper object-oriented principles, making them suitable for learning and extension. Below are a few recommendations you can explore: ### 1. **RayTracer Challenge** This is a well-known ray tracing project based on the book "The Ray Tracer Challen...
36,147
[ { "from": "human", "value": "When I was at university, I took a subject in raytracing (graphics synthesis) and we got a chance to write a 3D ray tracer in C++. That was heaps of fun, except I long ago lost my code in the great hard drive crash of '04'....many files were lost...\nIs there a RayTracer I can p...
Having a relative path, how do I turn it into an absolute one from the location where the elisp file that I'm loading is. That is, I have an elisp file that I'm loading, it has an relative path and I need an absolute one.
In Emacs Lisp, you can convert a relative path to an absolute path based on the location of the currently loaded Elisp file using the `expand-file-name` function in conjunction with `load-file` or `load`. Here's how you can do this: 1. Use the `load-file` function to load your Elisp file. 2. Use the `file-name-direc...
43,137
[ { "from": "human", "value": "Having a relative path, how do I turn it into an absolute one from the location where the elisp file that I'm loading is. That is, I have an elisp file that I'm loading, it has an relative path and I need an absolute one.\n" }, { "from": "gpt", "value": "In Emacs Lis...
I need to schedule several different pages on several different sites to be run at certain times, usually once a night. Is there any software out there to do this? it would be nice if it called the page and then recorded the response and whether the called page was successful run or not. I was using Helm on a differ...
Yes, there are several options available for scheduling tasks, including HTTP requests, on a Windows Server 2008 machine. Below are a few tools that you might find helpful for your use case: ### 1. **Windows Task Scheduler** Windows Task Scheduler is a built-in tool that allows you to schedule scripts and programs to ...
42,324
[ { "from": "human", "value": "I need to schedule several different pages on several different sites to be run at certain times, usually once a night. Is there any software out there to do this? it would be nice if it called the page and then recorded the response and whether the called page was successful ...
Does anybody have any experience with different fonts for OCR? I am generating an ID then trying to scan it with tesseract. At the moment I am just T&E'n different fonts, but this seems pretty inefficient. I've tried the OCR* family of fonts, and various others such as Arial and Georgia. The tesseract tends to get conf...
When it comes to optimizing text for Optical Character Recognition (OCR) with Tesseract, several factors come into play, including font choice. While there isn't a specific font "designed" exclusively for Tesseract, some fonts are generally better suited for OCR tasks due to their clarity, simplicity, and character dis...
42,234
[ { "from": "human", "value": "Does anybody have any experience with different fonts for OCR? I am generating an ID then trying to scan it with tesseract. At the moment I am just T&E'n different fonts, but this seems pretty inefficient. I've tried the OCR* family of fonts, and various others such as Arial and...
I have a process x that I want to check for leaks with valgrind. The problem is that x is run by y, and y in turn is run by z. I can't run x standalone because y and z setup the environment for x, such as environment variables, command line switches, files needed by x etc. Is there any way I can tell valgrind to r...
To use Valgrind effectively in your scenario, you have a few options. Below are answers to your questions regarding running Valgrind on the entire process tree, reporting specific processes, and attaching to already-running processes. ### 1. Running Valgrind on `z` and following forks: Valgrind can be used to trace ch...
42,080
[ { "from": "human", "value": "I have a process x that I want to check for leaks with valgrind. The problem is that x is run by y, and y in turn is run by z. I can't run x standalone because y and z setup the environment for x, such as environment variables, command line switches, files needed by x etc. \n...
Can you disable an ASP validation on an event click before it posts back and performs the validation? This is for ASP with C#. I would like to load some details into a bunch of text-boxes with field validators on them. However I need to disable the validation of these text-boxes in order to actually fill them, as the v...
In ASP.NET Web Forms, validation controls such as `RequiredFieldValidator`, `RegularExpressionValidator`, and others are designed to prevent the form from being submitted if validation fails. When you load data into controls on a postback, the validators will run before your code executes, which can lead to unwanted va...
39,365
[ { "from": "human", "value": "Can you disable an ASP validation on an event click before it posts back and performs the validation? This is for ASP with C#.\nI would like to load some details into a bunch of text-boxes with field validators on them. However I need to disable the validation of these text-boxe...
I am writing a form in Word 2003 to collect multiple responses to a single question. I have a macro on a button press which duplicates the various input fields (drop-down boxes, radio buttons etc.) ready for a new response. However, I need to change the text of the radio buttons, and set the OnChange event on a combobo...
To manipulate the properties of controls in Word, especially when working with ActiveX controls (like the ComboBox and OptionButton from the Control Toolbox), you need to set the properties after you create them. Here’s how you can adjust your macro code to change the text of the radio buttons and set the OnChange even...
36,750
[ { "from": "human", "value": "I am writing a form in Word 2003 to collect multiple responses to a single question. I have a macro on a button press which duplicates the various input fields (drop-down boxes, radio buttons etc.) ready for a new response.\nHowever, I need to change the text of the radio button...
I've rewritten my family web site using JavaScript (JQuery) making Ajax calls to PHP on the back end. It's your standard "bunch of image thumbnails and one main image, and when you click on a thumbnail image the main image changes" kind of thing. Everything is working as expected when using Firefox, but on IE, when I c...
It sounds like you are encountering an issue with event handling in Internet Explorer (IE). Based on your description, it seems like an event might be firing twice or an additional event is being triggered inadvertently. Here are some potential reasons for the behavior you're seeing, along with suggestions on how to f...
41,010
[ { "from": "human", "value": "I've rewritten my family web site using JavaScript (JQuery) making Ajax calls to PHP on the back end. It's your standard \"bunch of image thumbnails and one main image, and when you click on a thumbnail image the main image changes\" kind of thing. Everything is working as expec...
I recently bought the new Plesk software and im unsure on how to re-brand the site to our company logos and themes. Does anyone know the steps to changes these settings or a manual that would answer my questions? Regards, Oliver James
Hello Oliver, Rebranding your Plesk installation with your company’s logos and themes is a great way to personalize your hosting environment. Here are the steps to help you customize Plesk: ### 1. **Access Your Plesk Panel** Log in to your Plesk control panel as an administrator. ### 2. **Customize Branding Setting...
39,171
[ { "from": "human", "value": "I recently bought the new Plesk software and im unsure on how to re-brand the site to our company logos and themes.\nDoes anyone know the steps to changes these settings or a manual that would answer my questions?\nRegards,\n Oliver James\n" }, { "from": "gpt", ...
I have recently started learning F#, and this is the first time I've ever used WinForms. Here is my code. #light open System open System.Windows.Forms let form = let temp = new Form() let ms = new MenuStrip() let file = new ToolStripDropDownButton("File") ignore(ms.Items.Add(file)) ignore(file.DropD...
You're on the right track with your F# WinForms application! To get a handle on the `DropDownItems` of your `ToolStripDropDownButton`, you can store a reference to the `ToolStripMenuItem` that you create when adding the item. This will allow you to access the `DropDownItems` and set up any event handlers you may need. ...
42,785
[ { "from": "human", "value": "I have recently started learning F#, and this is the first time I've ever used WinForms. Here is my code.\n#light\nopen System\nopen System.Windows.Forms\nlet form =\n let temp = new Form()\n let ms = new MenuStrip()\n let file = new ToolStripDropDownButton(\"File\")\n ...
I have a C# application that is a client to a web service. One of my requirements is to allow capturing the SOAP that I send, so that if there is a problem, I can either fix the bug, or demonstrate that the problem is in the service I am calling. My WebReference proxy service class derives from System.Web.Services.Pro...
Yes, you can capture and log the SOAP messages that your C# application sends to the web service by using a couple of different techniques without requiring a packet sniffer like Wireshark. Here are two main approaches you can take: ### 1. Use a Custom SoapExtension You can create a custom `SoapExtension` that allows...
40,205
[ { "from": "human", "value": "I have a C# application that is a client to a web service. One of my requirements is to allow capturing the SOAP that I send, so that if there is a problem, I can either fix the bug, or demonstrate that the problem is in the service I am calling.\nMy WebReference proxy service ...
I am writing a photo gallery/sharing website and want to (1) write EXIF data to the JPEGs stored on server, and (2) strip that EXIF data prior to writing to the output stream for display. Is anyone aware of a dotNet library -- preferably open source -- that allows the editing (the key here is that I need to write/erase...
For working with EXIF data in .NET, particularly for writing or erasing EXIF data in JPEG files, you can consider the following open-source libraries: ### 1. **MetadataExtractor** - **Description**: While primarily a library for reading EXIF data, you can pair it with other libraries for writing capabilities. It’s ver...
40,120
[ { "from": "human", "value": "I am writing a photo gallery/sharing website and want to (1) write EXIF data to the JPEGs stored on server, and (2) strip that EXIF data prior to writing to the output stream for display.\nIs anyone aware of a dotNet library -- preferably open source -- that allows the editing (...
I'm having trouble finding an open-source IDE with support for Git. Are there any that you could point me to or recommend?
Certainly! Here are some popular open-source IDEs that have built-in support for Git: 1. **Visual Studio Code**: - While primarily a code editor, Visual Studio Code (VSCode) is highly extensible and supports Git out of the box. You can manage repositories, commits, branches, and more directly from the interface. Th...
42,487
[ { "from": "human", "value": "I'm having trouble finding an open-source IDE with support for Git. Are there any that you could point me to or recommend?\n" }, { "from": "gpt", "value": "Certainly! Here are some popular open-source IDEs that have built-in support for Git:\n\n1. **Visual Studio Cod...
How do you calculate the angle between two normals in glsl? I am trying to add the fresnel effect to the outer edges of an object (combining that effect with phong shading), and I think that the angle is the only thing I am missing. Fragment Shader: varying vec3 N; varying vec3 v; void main(void) { v = vec3(gl_Model...
To calculate the angle between two normals in GLSL, you can use the dot product of the two normalized vectors. The dot product gives you a value that can be used to find the angle between the two vectors through the `acos` function. Here's how you can compute the angle between the light direction and the normal vector...
40,112
[ { "from": "human", "value": "How do you calculate the angle between two normals in glsl? I am trying to add the fresnel effect to the outer edges of an object (combining that effect with phong shading), and I think that the angle is the only thing I am missing.\nFragment Shader:\nvarying vec3 N;\nvarying ve...
How do I raise an event from a user control that was created dynamically? Here's the code that I'm trying where Bind is a public EventHandler protected indDemographics IndDemographics; protected UserControl uc; override protected void OnInit(EventArgs e) { uc = (UserControl)LoadControl("indDemographics.ascx"); ...
To raise an event from a dynamically created user control, you need to ensure that you are correctly casting the loaded control to the appropriate type. In your example, it seems like you are trying to cast `uc` to `IndDemographics` but it appears you're doing it at the wrong place or not at all. Here's a complete code...
40,732
[ { "from": "human", "value": "How do I raise an event from a user control that was created dynamically?\nHere's the code that I'm trying where Bind is a public EventHandler\nprotected indDemographics IndDemographics;\nprotected UserControl uc;\noverride protected void OnInit(EventArgs e)\n{\n uc = (UserCo...
I've been trying to deal with some delimited text files that have non standard delimiters (not comma/quote or tab delimited). The delimiters are random ASCII characters that don't show up often between the delimiters. After searching around, I've seem to have only found no solutions in .NET will suit my needs and the...
Parsing custom delimited text files can indeed be a challenging task, especially when dealing with non-standard delimiters and large files. However, writing a custom parser may be necessary when existing libraries do not cater to your specific needs. Here’s a breakdown of a possible approach to create a robust parser w...
40,788
[ { "from": "human", "value": "I've been trying to deal with some delimited text files that have non standard delimiters (not comma/quote or tab delimited). The delimiters are random ASCII characters that don't show up often between the delimiters. After searching around, I've seem to have only found no sol...
In the iPhone SDK I don't see the same SCDynamicStore used on Mac OS X to get the SSID name that your wireless network is currently connected to isn't available. Is there a way to get the SSID name that the iPhone is currently connected to? I see some apps do it (Easy Wi-Fi for AT&T for one) but I can't find how it'...
As of my last knowledge update in October 2023, Apple has certain restrictions and guidelines regarding accessing network information, including the SSID of the Wi-Fi network on iOS devices. The SSID can be accessed through the `NetworkExtension` framework or using the `NEHotspotNetwork` class in conjunction with `NEHo...
40,308
[ { "from": "human", "value": "In the iPhone SDK I don't see the same SCDynamicStore used on Mac OS X to get the SSID name that your wireless network is currently connected to isn't available. \nIs there a way to get the SSID name that the iPhone is currently connected to? \nI see some apps do it (Easy Wi-Fi...
I'm working on a quick project to monitor/process data. Essentially that's just monitors, schedules and processors. The monitor checks for data (ftp, local, imap, pop, etc) using a schedule and sends new data to a processor. They all have interfaces. I'm trying to find a sane way to use config to configure what schedul...
In a project like yours where you're dealing with various components that need to be configured dynamically (monitors, schedules, processors), it's essential to strike a balance between flexibility and simplicity in your configuration approach. Both methods you've mentioned (constructor parameters with XML config and a...
38,155
[ { "from": "human", "value": "I'm working on a quick project to monitor/process data. Essentially that's just monitors, schedules and processors. The monitor checks for data (ftp, local, imap, pop, etc) using a schedule and sends new data to a processor. They all have interfaces.\nI'm trying to find a sane w...
If the AllowReorder column of a listview is set to true, how do I get a string list of the columnheader texts based on their displayindex at runtime? listview.Columns only returns columns in the original order.
To get the column header texts of a ListView in the order based on their `DisplayIndex` at runtime, you can use LINQ to order the columns by their `DisplayIndex` property. Here's a sample code snippet that demonstrates how to achieve this: ```csharp using System; using System.Collections.Generic; using System.Linq; us...
43,174
[ { "from": "human", "value": "If the AllowReorder column of a listview is set to true, how do I get a string list of the columnheader texts based on their displayindex at runtime? listview.Columns only returns columns in the original order.\n" }, { "from": "gpt", "value": "To get the column heade...
I'm wondering if there is a better/inbuilt way, other than using a byte buffer and looping, to read from one stream and write it to another (in .NET). Generally this is done to apply a transform to a stream and move it on. In this instance, what I am loading a file, putting it through a deflate stream and writing it ou...
Yes, starting with .NET 4.0, the `Stream` class includes the `CopyTo` method, which allows you to easily copy bytes from one stream to another without having to manually manage a buffer. This makes the code cleaner and more efficient. Here's how you can modify your code to use the `CopyTo` method along with `DeflateSt...
42,030
[ { "from": "human", "value": "I'm wondering if there is a better/inbuilt way, other than using a byte buffer and looping, to read from one stream and write it to another (in .NET). Generally this is done to apply a transform to a stream and move it on.\nIn this instance, what I am loading a file, putting it ...
I wonder if the UNIX domain socket connections with postgresql are faster then tcp connections from localhost in high concurrency rate and if it does, by how much?
In general, UNIX domain sockets can provide better performance than TCP connections when communicating with a PostgreSQL database on the same host. This performance difference can become more pronounced under high concurrency due to several factors: 1. **Protocol Overhead**: UNIX domain sockets use a simpler protocol ...
41,643
[ { "from": "human", "value": "I wonder if the UNIX domain socket connections with postgresql are faster then tcp connections from localhost in high concurrency rate and if it does, by how much?\n" }, { "from": "gpt", "value": "In general, UNIX domain sockets can provide better performance than TC...
Is there any way to throw errors or warnings in a KornShell (ksh) script to prevent the use of unset variables? Let's assume I have a temporary folder that I want to remove. TEMP_FILES_DIR='/app/myapp/tmp' rm -Rf $TEMP_FILE_DIR #notice the misspelling How to prevent this kind of mistakes before they actually happen? ...
In KornShell (ksh), you can enable strict error handling features to prevent the use of unset variables and catch potential mistakes before they lead to runtime errors. Specifically, you can use the `set -u` option, which treats an attempt to use an unset variable as an error, and will cause the script to terminate wit...
42,956
[ { "from": "human", "value": "Is there any way to throw errors or warnings in a KornShell (ksh) script to prevent the use of unset variables? \nLet's assume I have a temporary folder that I want to remove.\nTEMP_FILES_DIR='/app/myapp/tmp'\nrm -Rf $TEMP_FILE_DIR #notice the misspelling\n\nHow to prevent this ...
I have a user control that has several buttons. On page_load, I want to run a method unless a specific button was pressed. When I check the sender on page_load inside the user control, I just get the name of the user control and not the button itself. Is there a way that I can determine what button was pressed on page_...
In ASP.NET Web Forms, the `Page_Load` event does not provide you direct information about which control (e.g., button) was clicked because the `Page_Load` event runs before the event handlers of controls like buttons. When a button is clicked, the page is posted back, and the `Page_Load` method executes before the spec...
42,527
[ { "from": "human", "value": "I have a user control that has several buttons.\nOn page_load, I want to run a method unless a specific button was pressed.\nWhen I check the sender on page_load inside the user control, I just get the name of the user control and not the button itself.\nIs there a way that I ca...
I export my settings in Visual Studio and if I ever move to a new machine or have problems, I use those backed up settings to restore Visual Studio to the way I like it. It also allows me to maintain a consistent development environment between the various machines that I use. This works great for keybindings, syntax h...
The issue you're experiencing with Visual Studio toolbars and command bar customizations can be frustrating, especially when you’ve invested a lot of time in customizing them. Here are some potential solutions to help you back up and restore your toolbar customizations effectively: ### 1. Exporting Command Bar Customi...
38,344
[ { "from": "human", "value": "I export my settings in Visual Studio and if I ever move to a new machine or have problems, I use those backed up settings to restore Visual Studio to the way I like it. It also allows me to maintain a consistent development environment between the various machines that I use.\n...
How do I install a specific package, like derbytools, with Maven without specifying it as a dependency of project?
To install a specific Maven package (like `derbytools`) without specifying it as a dependency in your project's `pom.xml`, you can use the `mvn install:install-file` command. This command allows you to manually install a jar file into your local Maven repository. Here’s how you can do it: 1. **Download the JAR file**...
43,093
[ { "from": "human", "value": "How do I install a specific package, like derbytools, with Maven without specifying it as a dependency of project?\n" }, { "from": "gpt", "value": "To install a specific Maven package (like `derbytools`) without specifying it as a dependency in your project's `pom.xm...
In the standard PrintDialog there are four values associated with a selected printer: Status, Type, Where, and Comment. If I know a printer's name, how can I get these values in C# 2.0?
To retrieve the printer status, type, location (where), and comment information for a specific printer in C# 2.0, you can use the `System.Drawing.Printing` namespace along with the Windows Management Instrumentation (WMI) to access detailed printer properties. Here's how you can do this: 1. Use the `PrinterSettings` ...
42,473
[ { "from": "human", "value": "In the standard PrintDialog there are four values associated with a selected printer: Status, Type, Where, and Comment.\nIf I know a printer's name, how can I get these values in C# 2.0?\n" }, { "from": "gpt", "value": "To retrieve the printer status, type, location ...
I am about to start a web project and have been working almost exclusively with a LAMP stack for the past 5 years. I would like to build something larger and more scalable and hence have been looking into Java EE. The division of logic between JSP and EJB seems ideal for what I want to do. Can anyone recommend resour...
It's great to hear that you're looking to expand your skills and explore Java EE for larger and more scalable web applications. Java EE (now known as Jakarta EE) is a robust framework that supports enterprise-level applications with features like scalability, security, and transaction management. ### Resources for Get...
38,071
[ { "from": "human", "value": "I am about to start a web project and have been working almost exclusively with a LAMP stack for the past 5 years. I would like to build something larger and more scalable and hence have been looking into Java EE. The division of logic between JSP and EJB seems ideal for what ...
I would like to know the procedure to adopt to parse and obtain text content from Microsoft word (.doc and .docx) documents . programming language used should be plain "C" (should be gcc). Are there any libraries that already do this job, extension : can i use the same procedure to parse text from Microsoft power point...
Parsing Microsoft Word (`.doc` and `.docx`) documents in plain C can be challenging because these formats are complex and not designed to be easily parsed without a library. Fortunately, there are libraries available that can help with this task. ### Libraries to Consider 1. **libreoffice** or **LibreOffice SDK**: Wh...
37,844
[ { "from": "human", "value": "I would like to know the procedure to adopt to parse and obtain text content from Microsoft word (.doc and .docx) documents . programming language used should be plain \"C\" (should be gcc).\nAre there any libraries that already do this job,\nextension : can i use the same proce...
I've got a question about references between projects in a solution. Most of my previous applications have just had one or two projects in the Solution, but this time I want to divide the application further. I'm starting a new Solution in Visual Studio 2008 now, and have created several underlying projects to divide ...
When structuring a solution with multiple projects in Visual Studio (or any development environment), it's important to organize your projects in a way that minimizes dependencies and enhances maintainability. Here are some guidelines and patterns you can follow to avoid circular dependencies and improve the overall ar...
36,331
[ { "from": "human", "value": "I've got a question about references between projects in a solution. Most of my previous applications have just had one or two projects in the Solution, but this time I want to divide the application further. \nI'm starting a new Solution in Visual Studio 2008 now, and have crea...
The more I think about how I use computers, the more I become convinced that 'workflow' is the key factor in terms of productivity, and the way I should go about designing interactions. I'm thinking of workflow as the way we approach and manage data, information and knowledge as it relates to a task. I'm starting out ...
Designing a web application with a focus on user workflow is a great approach to enhancing productivity and ensuring that the application meets the needs of its users. Here are some design tips and concepts to consider as you develop your web applications: ### 1. User-Centered Design - **User Research**: Start by u...
38,902
[ { "from": "human", "value": "The more I think about how I use computers, the more I become convinced that 'workflow' is the key factor in terms of productivity, and the way I should go about designing interactions. I'm thinking of workflow as the way we approach and manage data, information and knowledge a...
I am trying to use the range property of the jQuery slider so that the slider control displays two handles from which the user can select a price range for real estate. The code I have is: $("#price").slider({ range: true, minValue: 0, maxValue: 2000000, change: function(e, ui) { var range = (Math.round(ui.rang...
It looks like there are a couple of issues in your current jQuery slider implementation. To set up a range slider correctly using jQuery UI's slider, you'll want to specify the properties `min`, `max`, and also correctly handle the values of the two handles. Here's how you can set it up properly: 1. Use `min` and `ma...
41,826
[ { "from": "human", "value": "I am trying to use the range property of the jQuery slider so that the slider control displays two handles from which the user can select a price range for real estate. The code I have is:\n$(\"#price\").slider({ range: true, minValue: 0, maxValue: 2000000,\n change:\n functio...
I am looking for a query that will work on Sharepoint 2003 to show me all the documents created/touched by a given userID. I have found tables with the documents (Docs) and tables for users (UserInfo, UserData) but the relationship between seems a bit odd - there are 99,000 records in our userdata table, and 12,000 rec...
In SharePoint 2003, the schema can be quite complex due to how SharePoint stores user and document information. Given your query to fetch documents created or modified by a specific user, you've already made good progress. To get the documents created/touched by a given user, you can leverage the `Docs`, `UserInfo`, ...
38,000
[ { "from": "human", "value": "I am looking for a query that will work on Sharepoint 2003 to show me all the documents created/touched by a given userID.\nI have found tables with the documents (Docs) and tables for users (UserInfo, UserData)\nbut the relationship between seems a bit odd - there are 99,000 re...
Does anyone know if it's possible to not use the navigation properties feature of the entity framework for tables linked with a foreign key? for example, if my client table has an AddressId, I want that AddressId in my model, I don't want it to have a .Address property. But I have thus far been unable to figure out ho...
Yes, it is definitely possible to configure your entity models in Entity Framework (EF) so that they don't include navigation properties for foreign keys. You can achieve this by using the Fluent API or data annotations to explicitly configure your entity models. Here's how you can do it: ### Using Fluent API In you...
42,908
[ { "from": "human", "value": "Does anyone know if it's possible to not use the navigation properties feature of the entity framework for tables linked with a foreign key?\nfor example, if my client table has an AddressId, I want that AddressId in my model, I don't want it to have a .Address property. But I ...
What does the "class" part of a template statement do? Example: template <class T> class Something { public: Something(const T &something); } And what else can go there? I usually only see "class".
In C++, the `template <class T>` part of a template declaration defines a template parameter. This allows you to create generic classes or functions that can operate with any data type. In your example: ```cpp template <class T> class Something { public: Something(const T &something); } ``` The `class T` ...
43,720
[ { "from": "human", "value": "What does the \"class\" part of a template statement do?\nExample:\ntemplate <class T>\nclass Something\n{\n public:\n Something(const T &something);\n}\n\nAnd what else can go there? I usually only see \"class\".\n" }, { "from": "gpt", "value": "In C++, t...
Why does the following have the effect it does - it prints a terminal full of random characters and then exits leaving a command prompt that produces garbage when you type in it. (I tried it because I thought it would produce a seg fault). #include <stdio.h> int main(){ char* s = "lololololololol"; while(1){ ...
The behavior you're observing in your C program can be attributed to a couple of key concepts in C programming: string manipulation, memory access, and undefined behavior. Here's a breakdown of what's happening in your program: 1. **Pointer Manipulation**: - You start with a pointer `s` initialized to point to a ...
40,979
[ { "from": "human", "value": "Why does the following have the effect it does - it prints a terminal full of random characters and then exits leaving a command prompt that produces garbage when you type in it. (I tried it because I thought it would produce a seg fault).\n\n#include <stdio.h>\n\nint main(){\n ...
In Flash when you set text in a TextField object with the htmlText property, changing the alpha value no longer works. Is there a way around that?
In Flash, when you set the `htmlText` property of a `TextField` object, the alpha transparency of the text can indeed be affected, as the HTML text rendering can override some properties, including alpha. Unfortunately, there is no direct way to set the alpha property of the text when using `htmlText`. However, you ca...
41,882
[ { "from": "human", "value": "In Flash when you set text in a TextField object with the htmlText property, changing the alpha value no longer works. Is there a way around that?\n" }, { "from": "gpt", "value": "In Flash, when you set the `htmlText` property of a `TextField` object, the alpha tra...
I'm looking at building a Rails application which will have some pretty large tables with upwards of 500 million rows. To keep things snappy I'm currently looking into how a large table can be split to more manageable chunks. I see that as of MySQL 5.1 there is a partitioning option and that's a possible option but ...
When dealing with very large tables in a Rails application, partitioning can indeed be a useful strategy. However, you mentioned some concerns regarding MySQL's built-in partitioning. If the primary key needs to include the partitioning column and you want to split the table based on values written, here are several al...
38,963
[ { "from": "human", "value": "I'm looking at building a Rails application which will have some pretty\nlarge tables with upwards of 500 million rows. To keep things snappy\nI'm currently looking into how a large table can be split to more\nmanageable chunks. I see that as of MySQL 5.1 there is a partition...
If I'm using Long uuid = UUID.randomUUID().getMostSignificantBits() how likely is it to get a collision. It cuts off the least significant bits, so there is a possibility that you run into a collision, right?
Using `UUID.randomUUID().getMostSignificantBits()` to generate a `long` value does indeed increase the possibility of collisions because you are only using the most significant bits of the UUID, effectively discarding the least significant bits. Let's break this down: 1. **UUID Structure**: A UUID (Universally Unique ...
42,985
[ { "from": "human", "value": "If I'm using Long uuid = UUID.randomUUID().getMostSignificantBits() how likely is it to get a collision. It cuts off the least significant bits, so there is a possibility that you run into a collision, right?\n" }, { "from": "gpt", "value": "Using `UUID.randomUUID()....
I've got what I think is a simple question. I've seen examples both ways. The question is - "why can't I place my annotations on the field?". Let me give you an example.... @Entity @Table(name="widget") public class Widget { private Integer id; @Id @GeneratedValue(strategy=GenerationType.AUTO) public Integer ge...
Your confusion about where to place the Hibernate annotations (on fields vs. getters) is common, and both methods are valid. However, the behavior you're observing likely doesn't stem from the placement of the annotations itself, but rather how the Hibernate session is being managed in your code. Let's break down you...
38,453
[ { "from": "human", "value": "I've got what I think is a simple question. I've seen examples both ways. The question is - \"why can't I place my annotations on the field?\". Let me give you an example....\n@Entity\n@Table(name=\"widget\")\npublic class Widget {\n private Integer id;\n\n @Id\n @GeneratedVa...
I have spent lot of time doing research on VIM. I am Windows guy since last 6 yrs and was using VS. Now started working on Linux. I want to make VIM as close as possible to VS. I want features like Project Navigation Files in Different Tabs Search in Project AutoCompletion I have found plugins for the above requiremen...
Certainly! Configuring Vim to mimic some of the features and conveniences of an IDE like Visual Studio can greatly enhance your productivity on Linux. Below is a sample `.vimrc` file that incorporates the plugins you mentioned, while also focusing on your requirements like buffer management and avoiding clutter. ### S...
38,122
[ { "from": "human", "value": "I have spent lot of time doing research on VIM. I am Windows guy since last 6 yrs and was using VS.\nNow started working on Linux. I want to make VIM as close as possible to VS.\nI want features like\nProject Navigation\nFiles in Different Tabs\nSearch in Project\nAutoCompletio...
Has anyone had good experiences of talking direct to RPG programs running on a V5R4 iSeries machine from Java? If so, what are the recommendations of the community, and what pitfalls should I try to avoid? From the various pieces of literature and spike solutions I have attempted it looks as though we can use ProgramCa...
Integrating Java applications with RPG programs on an IBM i (formerly known as AS/400 or iSeries) can be done through several methods, and each has its strengths and weaknesses. Here are some recommendations and pitfalls based on community experiences: ### Recommended Approaches 1. **Program Call Beans (PCML/xPCML):*...
28,419
[ { "from": "human", "value": "Has anyone had good experiences of talking direct to RPG programs running on a V5R4 iSeries machine from Java? If so, what are the recommendations of the community, and what pitfalls should I try to avoid?\nFrom the various pieces of literature and spike solutions I have attempt...
In SQL, How we make a check to filter all row which contain a column data is null or empty ? For examile Select Name,Age from MEMBERS We need a check Name should not equal to null or empty.
To filter rows in SQL where a specific column (in your case, `Name`) is neither `NULL` nor an empty string, you can use the `WHERE` clause with appropriate conditions. Here’s how you can do it: ```sql SELECT Name, Age FROM MEMBERS WHERE Name IS NOT NULL AND Name <> ''; ``` ### Explanation: - `Name IS NOT NULL`: Thi...
42,681
[ { "from": "human", "value": "In SQL, How we make a check to filter all row which contain a column data is null or empty ?\nFor examile \nSelect Name,Age from MEMBERS\n\nWe need a check Name should not equal to null or empty.\n" }, { "from": "gpt", "value": "To filter rows in SQL where a specifi...
how can i import data from an oracle database to a mysql database by using CTL file (generate with Toad for oracle)? Thank in advance Andrea
Importing data from an Oracle database to a MySQL database using a CTL file generated by Toad for Oracle involves several steps. The CTL file (Control file) is typically used for loading data into Oracle databases using SQL*Loader, but in this case, we will convert the data format to a format that MySQL can understand,...
38,363
[ { "from": "human", "value": "how can i import data from an oracle database to a mysql database by using CTL file (generate with Toad for oracle)? \nThank in advance \nAndrea\n" }, { "from": "gpt", "value": "Importing data from an Oracle database to a MySQL database using a CTL file generated by ...
I need to implement a browser based component (most likely java applet since it needs to be cross-browser) that will allow us to digitally sign and verify data in the XadES format. What options are available and what is the best solution?
While the idea of using a Java applet for browser-based functionality might have been viable in the past, it’s important to note that support for Java applets has been phased out in most modern browsers due to security concerns. As such, relying on Java applets is not a viable solution for new implementations. Instead...
38,539
[ { "from": "human", "value": "I need to implement a browser based component (most likely java applet since it needs to be cross-browser) that will allow us to digitally sign and verify data in the XadES format. What options are available and what is the best solution?\n" }, { "from": "gpt", "valu...
I get the following error while building OpenCV on OS X 10.5 (intel): ld: warning in .libs/_cv_la-_cv.o, file is not of required architecture ld: warning in .libs/_cv_la-error.o, file is not of required architecture ld: warning in .libs/_cv_la-pyhelpers.o, file is not of required architecture ld: warning in .libs/_cv_l...
The error you are encountering during the OpenCV build process on macOS 10.5 appears to be related to architecture mismatches and undefined symbols, particularly with the Python configuration. Here are some steps you can take to resolve this issue: 1. **Check Architecture Compatibility:** Ensure that you are buildi...
41,220
[ { "from": "human", "value": "I get the following error while building OpenCV on OS X 10.5 (intel):\nld: warning in .libs/_cv_la-_cv.o, file is not of required architecture\nld: warning in .libs/_cv_la-error.o, file is not of required architecture\nld: warning in .libs/_cv_la-pyhelpers.o, file is not of requ...
I realize you can't get the target entity in the Attribute itself, but what about in an associated Permission object when using a CodeAccessSecurityAttribute? The Permission object gets called at runtime so it seems there should be a way but I'm at a loss. public sealed class MySecurityAttribute : CodeAccessSecurityAt...
In the context of .NET Code Access Security (CAS), when you define a custom security attribute (like `MySecurityAttribute` in your example), it doesn't provide a built-in way to retrieve the target method or type that it is decorating directly within the `CreatePermission` method or the permission object itself. The `C...
40,530
[ { "from": "human", "value": "I realize you can't get the target entity in the Attribute itself, but what about in an associated Permission object when using a CodeAccessSecurityAttribute? The Permission object gets called at runtime so it seems there should be a way but I'm at a loss.\npublic sealed class ...
I've created a user control (in vb.net code) that contains two dock panels, one for header content (called HeaderDockPanel) and one for other content (called RootDockPanel). The dockPanels are depedency properties of the user control. These dependency properties are declared as follows: Public Shared ReadOnly RootDockP...
To allow the contents of your `DockPanel` properties (`HeaderDockPanel` and `RootDockPanel`) within your `MyUserControl` to be edited in XAML, you need to make a few adjustments. The main issue you are encountering is that the `HeaderDockPanel` and `RootDockPanel` are declared as dependency properties, but you are tryi...
39,728
[ { "from": "human", "value": "I've created a user control (in vb.net code) that contains two dock panels, one for header content (called HeaderDockPanel) and one for other content (called RootDockPanel). The dockPanels are depedency properties of the user control.\nThese dependency properties are declared as...
Session transcript: > type lookma.c int main() { printf("%s", "no stdio.h"); } > cl lookma.c Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 14.00.50727.762 for 80x86 Copyright (C) Microsoft Corporation. All rights reserved. lookma.c Microsoft (R) Incremental Linker Version 8.00.50727.762 Copyright (C) Micr...
It appears that you attempted to compile and run a simple C program without including the `stdio.h` header file. Here’s a breakdown of the session transcript: 1. **Code**: You wrote a C program in a file called `lookma.c`: ```c int main() { printf("%s", "no stdio.h"); } ``` In this code, you're try...
42,191
[ { "from": "human", "value": "Session transcript:\n> type lookma.c\nint main() {\n printf(\"%s\", \"no stdio.h\");\n}\n\n> cl lookma.c\nMicrosoft (R) 32-bit C/C++ Optimizing Compiler Version 14.00.50727.762 for 80x86\nCopyright (C) Microsoft Corporation. All rights reserved.\n\nlookma.c\nMicrosoft (R) Incr...