instruction
stringlengths
14
27.6k
completion
stringlengths
3
38.3k
__original_row_idx
int64
0
50k
conversations
listlengths
2
2
I'm looking for something like WWW SQL Designer for UML Modeling.
If you're looking for tools similar to WWW SQL Designer but focused on UML modeling, there are several options available that can help you create UML diagrams online or through desktop applications. Here are some popular UML modeling tools you might find useful: 1. **Lucidchart**: This is a web-based diagramming tool ...
41,201
[ { "from": "human", "value": "I'm looking for something like WWW SQL Designer for UML Modeling.\n" }, { "from": "gpt", "value": "If you're looking for tools similar to WWW SQL Designer but focused on UML modeling, there are several options available that can help you create UML diagrams online or...
I'm looking for a syntax highlighter cum code formatter for my blog on BlogSpot. I've tried several today, but the all want to include <style> tags, or reference a stylesheet. I'm looking for one that is ideal for segments of code, and includes styling inline. Any suggestions?
If you're looking for a syntax highlighter and code formatter that works well with BlogSpot and prefers inline styles without external stylesheets, you can consider the following options: ### 1. **Prism.js** Prism.js is a lightweight, extensible syntax highlighter. It can be modified to include styles inline. Although...
38,944
[ { "from": "human", "value": "I'm looking for a syntax highlighter cum code formatter for my blog on BlogSpot. I've tried several today, but the all want to include <style> tags, or reference a stylesheet. I'm looking for one that is ideal for segments of code, and includes styling inline. Any suggestions?...
Some of you may recognize this as Project Euler's problem number 11. The one with the grid. I'm trying to replicate the grid in a large multidimensional array, But it's giving me a syntax error and i'm not sure why grid = [ [ 08, 02, 22, 97, 38, 15, 00, 40, 00, 75, 04, 05, 07, 78, 52, 12, 50, 77, 91, 08 ], [ 49, 49, 9...
The issue you are encountering is due to the way you are specifying the numbers in your multidimensional array (list in Python). In Python, leading zeros in integer literals are not allowed. When you use a leading zero (like `08`, `02`, etc.), Python interprets it as an octal number (base 8), which is invalid in this c...
40,606
[ { "from": "human", "value": "Some of you may recognize this as Project Euler's problem number 11. The one with the grid.\nI'm trying to replicate the grid in a large multidimensional array, But it's giving me a syntax error and i'm not sure why\ngrid = [ \n[ 08, 02, 22, 97, 38, 15, 00, 40, 00, 75, 04, 05, 0...
Anyone know what the C# "M" syntax means? var1 = Math.Ceiling(hours / (40.00M * 4.3M));
In C#, the `M` suffix is used to denote a `decimal` literal. When you write `40.00M` or `4.3M`, you are explicitly indicating that these values should be treated as `decimal` types rather than the default `double` type. Using `decimal` is important in scenarios where precision is crucial, such as financial calculation...
42,713
[ { "from": "human", "value": "Anyone know what the C# \"M\" syntax means?\nvar1 = Math.Ceiling(hours / (40.00M * 4.3M));\n\n" }, { "from": "gpt", "value": "In C#, the `M` suffix is used to denote a `decimal` literal. When you write `40.00M` or `4.3M`, you are explicitly indicating that these valu...
To put it simple, I've written a JSE Swing app that needs to talk to a GWT server I've written earlier. I absolutely love the way GWT does remoting between it's javascript and server sides and wish I could utilize this mechanism. Has anyone managed to use GWT-RPC this way? Should I just go Restlet instead?
Using GWT-RPC for communication between a Java Swing application and a GWT server is not a common approach, primarily because GWT-RPC is designed for communication between JavaScript running in the browser and a GWT server. It relies heavily on GWT's client-side code generation and serialization mechanisms, which do no...
41,327
[ { "from": "human", "value": "To put it simple, I've written a JSE Swing app that needs to talk to a GWT server I've written earlier.\nI absolutely love the way GWT does remoting between it's javascript and server sides and wish I could utilize this mechanism.\nHas anyone managed to use GWT-RPC this way? Sho...
I have a table User which has an identity column UserID, now what is the correct Linq to Entity line of code that would return me the max UserID? I've tried: using (MyDBEntities db = new MyDBEntities()) { var User = db.Users.Last(); // or var User = db.Users.Max(); return user.UserID; } but Last and M...
To retrieve the maximum `UserID` from the `User` table using LINQ to Entities, you should use the `Max` method and specify the property you want to find the maximum value for. In your case, it would be `UserID`. Here is how you can do that: ```csharp using (MyDBEntities db = new MyDBEntities()) { var maxUserId = d...
41,706
[ { "from": "human", "value": "I have a table User which has an identity column UserID, now what is the correct Linq to Entity line of code that would return me the max UserID?\nI've tried:\nusing (MyDBEntities db = new MyDBEntities())\n{\n var User = db.Users.Last();\n // or\n var User = db.Users.Ma...
If I have a folder structure set up like this: ~/Projects emacs package1 package1-helpers package2 package2-helpers package2-more-helpers package3 package3-helpers How do I add these folders: ~/Projects/emacs ~/Projects/emacs/package1 ~/Proje...
You can automate the addition of these directories to your Emacs `load-path` by using a loop in your `.emacs` file. Here's how you can do it: ```elisp ;; Define the base path (let ((base-path "~/Projects/emacs")) ;; Add the base path to the load-path (add-to-list 'load-path base-path) ;; List of packages (d...
43,100
[ { "from": "human", "value": "If I have a folder structure set up like this:\n~/Projects\n emacs\n package1\n package1-helpers\n package2\n package2-helpers\n package2-more-helpers\n package3\n package3-helpers\n\nHow do I add these folders:...
i am trying to do something with the PIL Image library in django, but i experience some problems. I do like this: import Image And then I do like this images = map(Image.open, glob.glob(os.path.join(dirpath, '*.thumb.jpg'))) But when i try to run this i get an error and it leeds me to think that its not imported co...
The issue you're encountering is likely due to the way you are importing the `Image` module from the Python Imaging Library (PIL). The `Image` module should be imported from `PIL`, not directly. Here is how you can properly import and use it in your Django application: 1. Make sure you have the Pillow library installe...
41,579
[ { "from": "human", "value": "i am trying to do something with the PIL Image library in django, but i experience some problems.\nI do like this:\n\nimport Image\n\nAnd then I do like this\n\nimages = map(Image.open, glob.glob(os.path.join(dirpath, '*.thumb.jpg')))\n\nBut when i try to run this i get an error...
I've been using the following snippet in developements for years. Now all of a sudden I get a DB Error: no such field warning $process = "process"; $create = $connection->query ( "INSERT INTO summery (process) VALUES($process)" ); if (DB::isError($create)) die($create->getMessage($create)); but it's fine if I use ...
The issue you're experiencing stems from the fact that you're directly inserting the variable `$process` into your SQL query without properly quoting it when it is a string. In SQL, string values need to be enclosed in single quotes (`'`). When you are using a variable in your query, you need to ensure that it is pro...
41,069
[ { "from": "human", "value": "I've been using the following snippet in developements for years. Now all of a sudden I get a DB Error: no such field warning\n$process = \"process\";\n$create = $connection->query\n(\n \"INSERT INTO summery (process) VALUES($process)\"\n);\nif (DB::isError($create)) die($cre...
Like any other hard disk, virtual hard discs (*.vhd) will suffer from fragmentation. So to keep good performance i guess i have to defrag first the virtual hard disc from within the virtual machine and also the (physical) hard disc the .vhd is stored on. First, are these assumption correct? And second, is there a way ...
Your assumptions regarding defragmentation of virtual hard disks (VHDs) and the physical hard disks they reside on are generally correct. Here’s a detailed explanation: ### 1. Defragmentation of VHDs and Physical Disks - **Virtual Hard Disks (VHDs)**: Just like physical hard disks, VHDs can become fragmented over time...
38,812
[ { "from": "human", "value": "Like any other hard disk, virtual hard discs (*.vhd) will suffer from fragmentation. \nSo to keep good performance i guess i have to defrag first the virtual hard disc from within the virtual machine and also the (physical) hard disc the .vhd is stored on.\nFirst, are these assu...
These days I keep most of my development notes and documentations in Google Docs. There are time that I'd like to download everything. How is this possible on a Mac and Linux computers, without doing each one individually? Google used to have the ability to download all spreadsheets. However, I can no longer find t...
If you want to download all your Google Docs documents at once, you can use Google Takeout to export your files in a variety of formats, including those compatible with Open Office. Here’s how to do it on both Mac and Linux: ### Using Google Takeout 1. **Access Google Takeout**: - Go to [Google Takeout](https://ta...
36,815
[ { "from": "human", "value": "These days I keep most of my development notes and documentations in Google Docs. There are time that I'd like to download everything. How is this possible on a Mac and Linux computers, without doing each one individually? Google used to have the ability to download all sprea...
I have a table with four columns: PartNumber, ValvePartNumber, ActuatorPartNumber, Price I want to find the number of distinct prices for each combination of ValvePartNumber and ActuatorPartNumber. This is using SQL Server 2005
To find the number of distinct prices for each combination of `ValvePartNumber` and `ActuatorPartNumber`, you can use a SQL query that groups the data by those two columns and then counts the distinct prices. Here's how you can write the query: ```sql SELECT ValvePartNumber, ActuatorPartNumber, COUNT(DI...
41,888
[ { "from": "human", "value": "I have a table with four columns:\nPartNumber, ValvePartNumber, ActuatorPartNumber, Price\nI want to find the number of distinct prices for each combination of ValvePartNumber and ActuatorPartNumber.\nThis is using SQL Server 2005\n" }, { "from": "gpt", "value": "To ...
Like this: const void * test = sqlite3_column_blob(stat, 1); Can I delete or delete[] test?
In C and C++, the `sqlite3_column_blob` function returns a pointer to a blob of data stored in an SQLite database. This pointer points to data that is managed by SQLite, not dynamically allocated by your code. Therefore, you should **not** call `delete` or `delete[]` on the pointer returned by `sqlite3_column_blob`. U...
41,907
[ { "from": "human", "value": "Like this: const void * test = sqlite3_column_blob(stat, 1);\nCan I delete or delete[] test?\n" }, { "from": "gpt", "value": "In C and C++, the `sqlite3_column_blob` function returns a pointer to a blob of data stored in an SQLite database. This pointer points to dat...
I am getting a " Thread was being aborted " Exception in an ASP.NET page.I am not at all using any Response.Redirect/Server.Transfer method.Can any one help me to solve this ?
The "Thread was being aborted" exception in an ASP.NET application is commonly encountered, and while it's often associated with `Response.Redirect` or `Server.Transfer`, there are several other reasons this exception may occur. Here are a few potential causes and solutions to help you troubleshoot and resolve this iss...
38,729
[ { "from": "human", "value": "I am getting a \" Thread was being aborted \" Exception in an ASP.NET page.I am not at all using any Response.Redirect/Server.Transfer method.Can any one help me to solve this ?\n" }, { "from": "gpt", "value": "The \"Thread was being aborted\" exception in an ASP.NE...
I have a site with the following robots.txt in the root: User-agent: * Disabled: / User-agent: Googlebot Disabled: / User-agent: Googlebot-Image Disallow: / And pages within this site are getting scanned by Googlebots all day long. Is there something wrong with my file or with Google?
Yes, there are several issues with your `robots.txt` file. Let's break it down: 1. **Incorrect Directive**: The term "Disabled" is not a valid directive in `robots.txt`. The correct directive is `Disallow`. You should replace "Disabled" with "Disallow" for the rules to be effective. 2. **Disallow All Crawlers**: Your...
41,522
[ { "from": "human", "value": "I have a site with the following robots.txt in the root:\nUser-agent: *\nDisabled: /\n\nUser-agent: Googlebot \nDisabled: /\n\nUser-agent: Googlebot-Image\nDisallow: /\n\nAnd pages within this site are getting scanned by Googlebots all day long. Is there something wrong with my...
How do you for a specific look and feel on NetBeans 6.5? I mean by passing flags to the netbeans script (on Ubuntu) or by modifying the netbeans script or by some setup.
To customize the look and feel of NetBeans 6.5 on Ubuntu, you can set Java's system properties by modifying the NetBeans startup script or by passing flags when launching the IDE. ### Method 1: Modifying the NetBeans Startup Script 1. **Locate the NetBeans Installation Directory**: Navigate to the directory where ...
38,675
[ { "from": "human", "value": "How do you for a specific look and feel on NetBeans 6.5? I mean by passing flags to the netbeans script (on Ubuntu) or by modifying the netbeans script or by some setup.\n" }, { "from": "gpt", "value": "To customize the look and feel of NetBeans 6.5 on Ubuntu, you ca...
Here are the points that seem vague to me : "High-Fan in" : have a high number of classes that use a given class; good use of utility classes at the lower levels. "Low fan-out" : don't use too much other classes in a given class. Does that mean you can't even have a given class use several small utility class ?
The concepts of "high fan-in" and "low fan-out" come from software design principles, particularly in the context of class and module dependencies in object-oriented programming. Let's break down these terms and how they relate to your question about using several small utility classes. ### High Fan-In - **Definition*...
39,770
[ { "from": "human", "value": "Here are the points that seem vague to me :\n\"High-Fan in\" : have a high number of classes that use a given class; good use of utility classes at the lower levels.\n\"Low fan-out\" : don't use too much other classes in a given class.\nDoes that mean you can't even have a given...
I want to execute a php-script from php that will use different constants and different versions of classes that are already defined. Is there a sandbox php_module where i could just: sandbox('script.php'); // run in a new php environment instead of include('script.php'); // run in the same environment Or is proc_op...
To execute a PHP script in a separate environment with its own constants and classes, you can use the `proc_open()` function, which allows you to run a new PHP process. However, there are also alternatives you might consider depending on your requirements and setup. ### 1. Using `proc_open()` This is a common method ...
39,890
[ { "from": "human", "value": "I want to execute a php-script from php that will use different constants and different versions of classes that are already defined.\nIs there a sandbox php_module where i could just:\nsandbox('script.php'); // run in a new php environment\n\ninstead of \ninclude('script.php');...
What is a strongly typed dataset? (.net)
In .NET, a **strongly typed dataset** is a special type of data structure that provides a more robust way to handle and manipulate data in a type-safe manner. It is generated from a database schema and includes specific types for each data column in a dataset, as opposed to a loosely typed dataset where all data is han...
39,368
[ { "from": "human", "value": "What is a strongly typed dataset? (.net)\n" }, { "from": "gpt", "value": "In .NET, a **strongly typed dataset** is a special type of data structure that provides a more robust way to handle and manipulate data in a type-safe manner. It is generated from a database sc...
I have some code which ignores a specific exception. try { foreach (FileInfo fi in di.GetFiles()) { collection.Add(fi.Name); } foreach (DirectoryInfo d in di.GetDirectories()) { populateItems(collection, d); } } catch (UnauthorizedAccessException ex) { //ignore and move onto...
Yes, when you catch an exception but don't use it, the compiler will generate a warning for the unused variable. To suppress this warning, you can use an underscore (`_`) as the variable name to indicate that you're intentionally ignoring the exception. This is a convention in many programming languages, including C#. ...
43,371
[ { "from": "human", "value": "I have some code which ignores a specific exception. \ntry\n{\n foreach (FileInfo fi in di.GetFiles())\n {\n collection.Add(fi.Name);\n }\n foreach (DirectoryInfo d in di.GetDirectories())\n {\n populateItems(collection, d);\n }\n}\ncatch (Unauth...
I'm new to using LINQ to Entities (or Entity Framework whatever they're calling it) and I'm writing a lot of code like this: var item = (from InventoryItem item in db.Inventory where item.ID == id select item).First<InventoryItem>(); and then calling methods on that object like this: var type =...
Yes, you are correct that calling methods like `.Load()` or accessing navigation properties directly can result in additional queries being executed against the database. This behavior is known as "lazy loading," which means that related entities are only retrieved when they are specifically accessed. To avoid multipl...
41,903
[ { "from": "human", "value": "I'm new to using LINQ to Entities (or Entity Framework whatever they're calling it) and I'm writing a lot of code like this:\nvar item = (from InventoryItem item in db.Inventory\n where item.ID == id\n select item).First<InventoryItem>();\n\nand then callin...
I get this error when I do the make: relocation R_X86_64_32 against `vtable for Torch::MemoryDataSet' can not be used when making a shared object; recompile with -fPIC It says that I should recompile with the -fPIC option. I did that, adding the -fPIC option to CFLAGS and CXXFLAGS, but I still get the same error. Is...
The error you're encountering indicates that the code is being compiled in a way that doesn't support position-independent code (PIC), which is necessary for creating shared libraries on 64-bit architectures. Here's how you can address this issue: 1. **Ensure `-fPIC` is Applied Correctly**: Make sure that `-fPIC` is i...
39,837
[ { "from": "human", "value": "I get this error when I do the make:\nrelocation R_X86_64_32 against `vtable for Torch::MemoryDataSet' can not be used \nwhen making a shared object; recompile with -fPIC\n\nIt says that I should recompile with the -fPIC option. I did that, adding \nthe -fPIC option to CFLAGS an...
I have a header <h1>My Header</h1> It has a height of 150px and a font-size of say 1.3em; How can I make the header text vertically centered with CSS. I would rather not wrap it in a container DIV (wrapping divs really defeat the whole CSS idea).
You can vertically center the text within the `<h1>` header without using a wrapper `<div>` by utilizing CSS Flexbox. Here’s how you can do it: ```html <h1 class="centered-header">My Header</h1> ``` ```css .centered-header { height: 150px; /* Set the height of the header */ font-size: 1.3em; /* ...
41,955
[ { "from": "human", "value": "I have a header \n<h1>My Header</h1>\n\nIt has a height of 150px and a font-size of say 1.3em;\nHow can I make the header text vertically centered with CSS.\nI would rather not wrap it in a container DIV (wrapping divs really defeat the whole CSS idea).\n" }, { "from": "...
If a "WITH NOLOCK" query hint is used on a View in SQL Server, does it propagate that hint to the view definition itself, even if NOLOCK is NOT used for the raw tables in the View definition? The reason to need this is that sometimes the support staff wants to do huge time-consuming queries but would rather not force t...
In SQL Server, using the `WITH (NOLOCK)` hint on a query that selects from a view does not propagate this hint to the underlying tables defined within that view. Instead, it applies only to the query that directly uses the view. When you write a query like this: ```sql SELECT * FROM YourView WITH (NOLOCK); ``` The ...
42,450
[ { "from": "human", "value": "If a \"WITH NOLOCK\" query hint is used on a View in SQL Server, does it propagate that hint to the view definition itself, even if NOLOCK is NOT used for the raw tables in the View definition? The reason to need this is that sometimes the support staff wants to do huge time-con...
I have a T-Mobile G1 and I'm going to download the developer SDK and see if I can create a few simple apps for my phone. If you've done similar development, please answer below and tell me about your experience. Please share any links you found especially useful.
The T-Mobile G1, which was the first device to run the Android operating system, is a great starting point for developing simple apps, especially if you're interested in the early days of Android development. Here are some insights based on experiences from developers who have worked on similar projects: ### Getting S...
38,952
[ { "from": "human", "value": "I have a T-Mobile G1 and I'm going to download the developer SDK and see if I can create a few simple apps for my phone. If you've done similar development, please answer below and tell me about your experience. Please share any links you found especially useful.\n" }, { ...
I just wanted to pause in an F# console application, so I wrote: Console.ReadKey() But this gives the warning: This expression should have type 'unit', but has type 'ConsoleKeyInfo'. What can I do to fix this?
The warning you're encountering in your F# console application is because the `Console.ReadKey()` method returns a `ConsoleKeyInfo` type, which is not used in your context. In F#, the `unit` type is similar to `void` in C#—it indicates that a function doesn't return a meaningful value. To resolve this warning, you can ...
41,080
[ { "from": "human", "value": "I just wanted to pause in an F# console application, so I wrote:\nConsole.ReadKey()\nBut this gives the warning: This expression should have type 'unit', but has type 'ConsoleKeyInfo'.\nWhat can I do to fix this?\n" }, { "from": "gpt", "value": "The warning you're en...
I would like to know the complexity in Big O notation of the STL multiset, map and hash map classes when: inserting entries accessing entries retrieving entries comparing entries
In C++, the Standard Template Library (STL) provides different associative container classes such as `std::multiset`, `std::map`, and `std::unordered_map` (commonly referred to as a hash map). The complexities for these classes in Big O notation for various operations are as follows: ### 1. `std::multiset` - **Inserti...
36,503
[ { "from": "human", "value": "I would like to know the complexity in Big O notation of the STL multiset, map and hash map classes when:\n\ninserting entries\naccessing entries\nretrieving entries\ncomparing entries\n\n" }, { "from": "gpt", "value": "In C++, the Standard Template Library (STL) pro...
I'm passing a url through google translate and in my location bar on Fire fox, the url looks as it should: http://72.14.235.104/translate_c?hl=en&langpair=en|ru&sl=ru&tl=ru&u=http://something.something/something/.....orig_term%3Dмалярии I want to grab the orig_term and apply its value other places on my page as it load...
The issue you are experiencing with the `orig_term` being encoded and appearing as garbled text (i.e., `малÑÑии`) in Firefox is likely due to differences in character encoding handling between browsers. ### Possible Solutions 1. **Decode the URI component**: When you extract the `orig_term` from the URL, you sh...
40,135
[ { "from": "human", "value": "I'm passing a url through google translate and in my location bar on Fire fox, the url looks as it should:\nhttp://72.14.235.104/translate_c?hl=en&langpair=en|ru&sl=ru&tl=ru&u=http://something.something/something/.....orig_term%3Dмалярии\nI want to grab the orig_term and apply i...
I'm attempting to eliminate leading any leading zeroes in my date when I run the get-date cmdlet by trying: $filedate = get-date -uformat "%m-%d-%Y" $filedate = $filedate.ToString().Replace("0", "") this returns "01-04-2008" I want to the output to be "1-4-2008" any ideas on another way of doing this? thanks in adva...
If you're looking to eliminate leading zeros from a date string in PowerShell, you can achieve this without using a replace function that removes all zeroes indiscriminately. Instead, you can format the date directly while retrieving it to avoid leading zeros. Here's how you can do it: ```powershell $filedate = (Get-D...
42,476
[ { "from": "human", "value": "I'm attempting to eliminate leading any leading zeroes in my date when I run the get-date cmdlet by trying: \n$filedate = get-date -uformat \"%m-%d-%Y\" \n$filedate = $filedate.ToString().Replace(\"0\", \"\")\n\nthis returns \"01-04-2008\"\nI want to the output to be \"1-4-2008\...
Welcome I am extending some application written with Sprint and JSF. My work is partly writing xml config files. After some changes I got reports from library generators. Can I access with Eclipse debugger attached jars and fount what method throws error (and why) ?
Yes, you can use the Eclipse debugger to investigate issues in your Java application, even if the error occurs in external libraries (like JARs). Here’s how you can set this up and debug effectively: ### Step-by-Step Debugging with Eclipse 1. **Ensure Source Attachment**: - First, if you want to step through the c...
39,766
[ { "from": "human", "value": "Welcome\nI am extending some application written with Sprint and JSF. My work is partly writing xml config files. After some changes I got reports from library generators.\nCan I access with Eclipse debugger attached jars and fount what method throws error (and why) ? \n" }, ...
How would I assign a variable within scriplet code in JSP <%> and then use struts logic tags to do stuff based on the value of the variable assigned in the scriplet code block? I have tried using struts:logic equal and greaterthan to no avail.... Many Thanks,
To assign a variable in JSP using a scriptlet and then use Struts logic tags based on that variable, you'll need to be careful about how you handle scope and ensure that the variable is accessible in the Struts logic tags. Here’s a step-by-step guide on how to do this: 1. **Assigning a Variable in JSP Scriptlet**: Yo...
36,365
[ { "from": "human", "value": "How would I assign a variable within scriplet code in JSP <%> and then use struts logic tags to do stuff based on the value of the variable assigned in the scriplet code block?\nI have tried using struts:logic equal and greaterthan to no avail....\nMany Thanks,\n" }, { ...
Is there a way to change the color of the background for a MDIParent windows in MFC (2005)? I have tried intercepting ON_WM_CTLCOLOR AND ON_WM_ERASEBKGND but neither work. OnEraseBkgnd does work, but then it gets overwritten by the standard WM_CTL color. Cheers
Changing the background color of an MDI parent window in an MFC application can be a bit tricky, especially since MDI interfaces often manage their child windows and the default system behavior for drawing can interfere with your customizations. However, you can still achieve the desired effect by following these steps...
22,328
[ { "from": "human", "value": "Is there a way to change the color of the background for a MDIParent windows in MFC (2005)?\nI have tried intercepting ON_WM_CTLCOLOR AND ON_WM_ERASEBKGND but neither work. OnEraseBkgnd does work, but then it gets overwritten by the standard WM_CTL color.\nCheers\n" }, { ...
I have a project that is based on the Navigation Based Application template. In the AppDelegate are the methods -applicationDidFinishLoading: and -applicationWillTerminate:. In those methods, I am loading and saving the application data, and storing it in an instance variable (it is actually an object-graph). When the...
In order to pass your application data (the object graph you created in `-applicationDidFinishLaunching:`) to your `RootViewController`, you can use the following approach: 1. **Create a property in `RootViewController`:** First, add a property to your `RootViewController` class to hold a reference to the object graph...
40,563
[ { "from": "human", "value": "I have a project that is based on the Navigation Based Application template.\nIn the AppDelegate are the methods -applicationDidFinishLoading: and -applicationWillTerminate:. In those methods, I am loading and saving the application data, and storing it in an instance variable ...
(define (repeated f n) if (= n 0) f ((compose repeated f) (lambda (x) (- n 1)))) I wrote this function, but how would I express this more clearly, using simple recursion with repeated? I'm sorry, I forgot to define my compose function. (define (compose f g) (lambda (x) (f (g x)))) And the function takes as i...
It looks like you're trying to define a function that applies a function `f` repeatedly `n` times. The original implementation you provided has some issues with syntax and recursion that can be confusing. Here's a clearer version of the `repeated` function using simple recursion: ```scheme (define (repeated f n) (if...
39,768
[ { "from": "human", "value": "(define (repeated f n)\n if (= n 0)\n f\n ((compose repeated f) (lambda (x) (- n 1))))\n\nI wrote this function, but how would I express this more clearly, using simple recursion with repeated?\nI'm sorry, I forgot to define my compose function.\n(define (compose f g) (lam...
How do I get the difference in days between 2 dates in SQLite? I have already tried something like this: SELECT Date('now') - DateCreated FROM Payment It returns 0 every time.
In SQLite, you can get the difference in days between two dates using the `julianday()` function, which calculates the Julian day number for a given date. The difference in days can be obtained by subtracting the Julian day values. Here’s how you can do it: ```sql SELECT julianday('now') - julianday(DateCreated) AS d...
40,353
[ { "from": "human", "value": "How do I get the difference in days between 2 dates in SQLite? I have already tried something like this:\nSELECT Date('now') - DateCreated FROM Payment\n\nIt returns 0 every time.\n" }, { "from": "gpt", "value": "In SQLite, you can get the difference in days between ...
Today my colleagues and me have a discussion about the usage of the final keyword in Java to improve the garbage collection. For example, if you write a method like: public Double doCalc(final Double value) { final Double maxWeight = 1000.0; final Double totalWeight = maxWeight * value; return totalWeight; }...
The use of the `final` keyword in Java is often misunderstood in the context of garbage collection. To clarify, declaring variables as `final` does not directly improve garbage collection or impact how memory is managed. ### What `final` Does: 1. **Immutability**: When you declare a variable as `final`, it means that ...
40,272
[ { "from": "human", "value": "Today my colleagues and me have a discussion about the usage of the final keyword in Java to improve the garbage collection.\nFor example, if you write a method like:\npublic Double doCalc(final Double value)\n{\n final Double maxWeight = 1000.0;\n final Double totalWeight =...
I want to retrieve a list of the files that has been added or deleted from our Subversion repository over, for example, the last month. I'd prefer to have the file names, and not just a count. Is this possible from the Subversion command line, or would I need to use a script to trawl the log?
Yes, you can retrieve a list of files that have been added or deleted in a Subversion (SVN) repository over a specific time frame using the command line. You can do this by utilizing the `svn log` command combined with `svn diff` or `svn status` to filter for changes. ### Using `svn log` You can use `svn log` with th...
39,017
[ { "from": "human", "value": "I want to retrieve a list of the files that has been added or deleted from our Subversion repository over, for example, the last month.\nI'd prefer to have the file names, and not just a count.\nIs this possible from the Subversion command line, or would I need to use a script t...
We are considering moving the win32 build of our cross-platform C++ application from MS Visual Studio 2003 to MS Visual Studio 2005. (Yes, very forward-looking of us ;) Should we expect to many code changes to get it compiling and working?
Moving a project from MS Visual Studio 2003 to MS Visual Studio 2005 should generally be a manageable process, but there are some changes and considerations to keep in mind: 1. **Project Files:** Visual Studio 2005 uses a different project file format (.vcproj instead of .dsp/.dsw). When you open your Visual Studio 20...
41,328
[ { "from": "human", "value": "We are considering moving the win32 build of our cross-platform C++ application from MS Visual Studio 2003 to MS Visual Studio 2005. (Yes, very forward-looking of us ;)\nShould we expect to many code changes to get it compiling and working?\n" }, { "from": "gpt", "v...
I'm using DRb within a Rails application to offload an expensive task outside the Rails process. Before initializing the client stub with DRbObject.new it is necessary to initialize the DRb service with DRb.start_service. Doing this in model or controller appears to leave threads in an uncertain state. When I exit mong...
To manage the initialization of `DRb` service in a Rails application without causing issues related to double-initialization, you can implement a check to see if the DRb service is already started before calling `DRb.start_service`. Here’s a way to handle it: 1. **Singleton Initialization Check**: You can use a simp...
40,233
[ { "from": "human", "value": "I'm using DRb within a Rails application to offload an expensive task outside the Rails process. Before initializing the client stub with DRbObject.new it is necessary to initialize the DRb service with DRb.start_service.\nDoing this in model or controller appears to leave threa...
I'm reviewing some code for a friend and say that he was using a return statement inside of a try-finally block. Does the code in the Finally section still fire even though the rest of the try block doesn't? Example: public bool someMethod() { try { return true; throw new Exception("test"); // doesn't seem...
Yes, in C#, code in the `finally` block will always execute after the `try` block completes, regardless of whether the `try` block completes normally, exits due to a `return` statement, or throws an exception. In your example, when the `return true;` statement is executed, the `try` block will not complete immediately...
41,978
[ { "from": "human", "value": "I'm reviewing some code for a friend and say that he was using a return statement inside of a try-finally block. Does the code in the Finally section still fire even though the rest of the try block doesn't?\nExample:\npublic bool someMethod()\n{\n try\n {\n return true;\n...
Is there a better way of getting this result? This function fails if num has more digits than digits, and I feel like it should be in the library somewhere (like Integer.toString(x,"%3d") or something) static String intToString(int num, int digits) { StringBuffer s = new StringBuffer(digits); int zeroes = digit...
Yes, your current implementation of the `intToString` function can be improved in several ways. Here's a revised version that handles cases where the `num` has more digits than the specified `digits` and is more efficient. You can achieve this by using `String.format` or `StringBuilder`, and these approaches are more r...
40,747
[ { "from": "human", "value": "Is there a better way of getting this result? This function fails if num has more digits than digits, and I feel like it should be in the library somewhere (like Integer.toString(x,\"%3d\") or something)\nstatic String intToString(int num, int digits) {\n StringBuffer s = new...
I'm trying to add HyperLinkColumns dynamically to my GridView. I have the following code: HyperLinkColumn objHC = new HyperLinkColumn(); objHC.DataNavigateUrlField = "title"; objHC.DataTextField = "Link text"; objHC.DataNavigateUrlFormatString = "id, title"; objHC.DataTextFormatString = "{2}"; GridView1.Columns.Add(ob...
To dynamically add a `HyperLinkColumn` to a `GridView` in ASP.NET, you need to set the `DataNavigateUrlFields` and `DataNavigateUrlFormatString` properties correctly, as well as the `DataTextField`. Your code snippet has some issues that need to be corrected. Here’s a corrected version of how you can do this: ```csha...
39,267
[ { "from": "human", "value": "I'm trying to add HyperLinkColumns dynamically to my GridView. I have the following code:\nHyperLinkColumn objHC = new HyperLinkColumn();\nobjHC.DataNavigateUrlField = \"title\";\nobjHC.DataTextField = \"Link text\";\nobjHC.DataNavigateUrlFormatString = \"id, title\";\nobjHC.Dat...
Suppose there´s a template function in C++ that does some useful work but also outputs a sequence of values via an output iterator. Now suppose that the sequence of values sometimes is interesting, but at others is not useful. Is there a ready-to-use iterator class in the STL that can be instantiated and passed to the ...
Yes, in the C++ Standard Library, you can use the `std::ostream_iterator` in combination with a `std::stringstream` to effectively ignore values. However, if you want a more straightforward approach to drop values without needing any output stream, you can create a custom null output iterator that simply ignores any as...
40,176
[ { "from": "human", "value": "Suppose there´s a template function in C++ that does some useful work but also outputs a sequence of values via an output iterator. Now suppose that the sequence of values sometimes is interesting, but at others is not useful. Is there a ready-to-use iterator class in the STL th...
I'm working on a C++ prettyprinter and would like to show the results of the prettyprinter by comparing code before and after running it. Does anyone know where I can find some ugly C++ code to run through the prettypretty? Ideally the code would come from some open source software.
There are several sources where you can find poorly formatted or "ugly" C++ code that you can use to test your prettyprinter. Here are some suggestions: 1. **GitHub Repositories**: Many open-source projects have code that is not consistently formatted. You can search for repositories that are tagged with C++ or are kn...
39,100
[ { "from": "human", "value": "I'm working on a C++ prettyprinter and would like to show the results of the prettyprinter by comparing code before and after running it. Does anyone know where I can find some ugly C++ code to run through the prettypretty? Ideally the code would come from some open source sof...
What is copyright licence type to select in order to make the code free for the public in all possible ways. Is "The MIT License" the best option?
The MIT License is indeed a popular choice for open-source projects and is often seen as a permissive license. It allows users to use, modify, distribute, and sublicense the code freely, which aligns well with your goal of making the code free for the public in all possible ways. Here are some key features of the MIT L...
41,417
[ { "from": "human", "value": "What is copyright licence type to select in order to make the code free for the public in all possible ways.\nIs \"The MIT License\" the best option?\n" }, { "from": "gpt", "value": "The MIT License is indeed a popular choice for open-source projects and is often see...
It's been out for almost five years. It's got tens of millions of users I suspect several businesses rely on it. How is it still "beta"? At what point will it no longer be beta? When it completely owns the e-mail market?
It sounds like you're referring to a software or service that has been in "beta" for a significant amount of time, which can be puzzling. The term "beta" often implies that a product is still being tested and may not be fully polished or feature-complete. However, many companies choose to keep a product in beta for an ...
42,018
[ { "from": "human", "value": "\nIt's been out for almost five years.\nIt's got tens of millions of users\nI suspect several businesses rely on it.\n\nHow is it still \"beta\"? At what point will it no longer be beta? When it completely owns the e-mail market?\n" }, { "from": "gpt", "value": "It...
I have got a table in MS Access 2007 with 4 fields. Labour Cost Labour Hours Vat Total How do I multiply 'Labour Hours' by 'Labour Cost' add the 'VAT' and display the answer in 'Total' Where would I put any formulas?, in a form or query or table ?
In MS Access, you typically use a **query** to perform calculations like multiplying and adding fields. While you can also use formulas in forms to display calculated values, the best practice for calculations like this is to do them in a query first. Here are the steps you can follow to create a query that calculates...
39,067
[ { "from": "human", "value": "I have got a table in MS Access 2007 with 4 fields.\n\nLabour Cost\nLabour Hours\nVat\nTotal\n\nHow do I multiply 'Labour Hours' by 'Labour Cost' add the 'VAT' and display the answer in 'Total'\nWhere would I put any formulas?, in a form or query or table ?\n" }, { "from...
bCrypt's javadoc has this code for how to encrypt a password: String pw_hash = BCrypt.hashpw(plain_password, BCrypt.gensalt()); To check whether a plaintext password matches one that has been hashed previously, use the checkpw method: if (BCrypt.checkpw(candidate_password, stored_hash)) System.out.println("It mat...
In the context of the BCrypt library, the code snippets you provided do indeed imply that a new salt is generated each time you hash a password, but this does not mean that the salt is discarded in a way that it is unusable for future verification. Here's how it works: 1. **Generating the Salt:** When you call `BCryp...
42,965
[ { "from": "human", "value": "bCrypt's javadoc has this code for how to encrypt a password:\nString pw_hash = BCrypt.hashpw(plain_password, BCrypt.gensalt()); \n\nTo check whether a plaintext password matches one that has been hashed previously, use the checkpw method:\nif (BCrypt.checkpw(candidate_password,...
Yeah, sounds silly but I'm a designers and the site I'm working on is not working in CSSEdit. Which is bad for me, very bad. The site has a massive JS/Ajax client and works in all browsers, IE, Firefox and Safari that uses the same browser engine as CSSEdit! Since MacRabbit has no customer service (they don't really an...
I understand that dealing with development tools can be frustrating, especially when they don't behave as expected. Here are some tips that may help you troubleshoot the issue with CSSEdit and your site: 1. **Check Compatibility**: Ensure that you are using a version of CSSEdit that is compatible with the web technolo...
40,886
[ { "from": "human", "value": "Yeah, sounds silly but I'm a designers and the site I'm working on is not working in CSSEdit. Which is bad for me, very bad. The site has a massive JS/Ajax client and works in all browsers, IE, Firefox and Safari that uses the same browser engine as CSSEdit!\nSince MacRabbit has...
In RoR,how to validate a Chinese or a Japanese word for a posting form with utf8 code. In GBK code, it uses [\u4e00-\u9fa5]+ to validate Chinese words. In Php, it uses /^[\x{4e00}-\x{9fa5}]+$/u for utf-8 pages.
To validate Chinese or Japanese characters in a Ruby on Rails application using regular expressions, you can utilize the `validates_format_of` method in your model along with a regular expression that matches the desired character ranges. ### Validation for Chinese Characters For Chinese characters, you can use a reg...
38,043
[ { "from": "human", "value": "In RoR,how to validate a Chinese or a Japanese word for a posting form with utf8 code.\nIn GBK code, it uses [\\u4e00-\\u9fa5]+ to validate Chinese words.\nIn Php, it uses /^[\\x{4e00}-\\x{9fa5}]+$/u for utf-8 pages.\n" }, { "from": "gpt", "value": "To validate Chine...
I have a small program that is installed in a custom folder in the program files, but when I tried to read or write to files that are needed to operate, the program raises an Access Denied Exeption. How can I elevte the program, with the user's permission of course.
To allow your program to run with elevated privileges (admin rights) on Windows, you need to modify the program's manifest file. Here are the steps you can follow: ### Step 1: Create or Modify the Manifest File If your application is developed in C# or C++, you'll typically have a manifest file associated with it. If...
39,536
[ { "from": "human", "value": "I have a small program that is installed in a custom folder in the program files, but when I tried to read or write to files that are needed to operate, the program raises an Access Denied Exeption. How can I elevte the program, with the user's permission of course.\n" }, { ...
I am trying to get a MethodInfo object for the method: Any<TSource>(IEnumerable<TSource>, Func<TSource, Boolean>) The problem I'm having is working out how you specify the type parameter for the Func<TSource, Boolean> bit... MethodInfo method = typeof(Enumerable).GetMethod("Any", new[] { typeof(Func<what goes here?, ...
To get a `MethodInfo` object for the `Any<TSource>(IEnumerable<TSource>, Func<TSource, Boolean>)` method from the `Enumerable` class, you need to specify the type parameters correctly. The method has a generic type parameter `TSource`, and you can achieve this using reflection. Here's how you can do it: 1. You need t...
39,633
[ { "from": "human", "value": "I am trying to get a MethodInfo object for the method:\nAny<TSource>(IEnumerable<TSource>, Func<TSource, Boolean>)\n\nThe problem I'm having is working out how you specify the type parameter for the Func<TSource, Boolean> bit... \nMethodInfo method = typeof(Enumerable).GetMethod...
I want ajax application to process a simple form with textinput and submit button only , and without validation , i want to add this with a php script . I ask this because i don't know how to program with ajax or javascript .
Creating a simple AJAX application to process a form using JavaScript (with jQuery for simplicity) and PHP is quite straightforward. Below is an example of how you can achieve this. ### Step 1: Create the HTML Form Create an HTML file called `index.html` with a simple form that includes a text input and a submit butt...
38,449
[ { "from": "human", "value": "I want ajax application to process a simple form with textinput and submit button only , and without validation , i want to add this with a php script .\nI ask this because i don't know how to program with ajax or javascript .\n" }, { "from": "gpt", "value": "Creatin...
I have an XSD file that is encoded in UTF-8, and any text editor I run it through doesn't show any character at the beginning of the file, but when I pull it up in Visual Studio's debugger, I clearly see an empty box in front of the file. I also get the error: Data at the root level is invalid. Line 1, position 1. ...
The issue you're encountering likely stems from the presence of a byte order mark (BOM) or some form of hidden or invalid character at the start of your XSD file. Even though common text editors don't show this character, some editors or tools, like Visual Studio, can display or interpret it, which might result in the ...
39,070
[ { "from": "human", "value": "I have an XSD file that is encoded in UTF-8, and any text editor I run it through doesn't show any character at the beginning of the file, but when I pull it up in Visual Studio's debugger, I clearly see an empty box in front of the file. \n\nI also get the error: \nData at the...
So, let's say I want to write a class that operates on different kinds of numbers, but I don't a priori know what kind of numbers (i.e. ints, doubles, etc.) I will be operating on. I would like to use generics to create a general class for this scenario. Something like: Adder<Double> adder = new Adder<Double>(); add...
In Java, generics are a way to specify a type parameter that can be used in classes, interfaces, and methods. However, when using generics, you cannot directly instantiate a generic type (i.e., you can't create an instance of `T` where `T` is a generic type). To solve your problem, you can define your `Adder` class t...
38,715
[ { "from": "human", "value": "So, let's say I want to write a class that operates on different kinds of numbers, but I don't a priori know what kind of numbers (i.e. ints, doubles, etc.) I will be operating on.\nI would like to use generics to create a general class for this scenario. Something like:\n Adde...
I'd like to automate importing cert(s) on a Windows CE device. Pushing the certs down to the devices is not a problem, but once they are there I cannot determine how to import them without using the UI. (I'm currently using Avalanche Mobility Center)
Automating the import of certificates on Windows CE devices can be a bit tricky since the built-in methods for doing so are not as straightforward as on more modern operating systems. However, you can achieve this using a combination of scripting and registry modification, depending on the specifics of your Windows CE ...
38,029
[ { "from": "human", "value": "I'd like to automate importing cert(s) on a Windows CE device. Pushing the certs down to the devices is not a problem, but once they are there I cannot determine how to import them without using the UI.\n(I'm currently using Avalanche Mobility Center)\n" }, { "from": "g...
I'm astonished that the Apache Commons Collections project still hasn't got around to making their library generics-aware. I really like the features provided by this library, but the lack of support for generics is a big turn-off. There is a Lavalabs fork of Commons Collections which does support generics, which seems...
Hi Don, The concerns you raised about Apache Commons Collections and its lack of generics support are well-known among developers who have used the library. As you mentioned, the Lavalabs fork does provide generics support while aiming to maintain backward compatibility. However, transitioning to this fork can sometim...
42,082
[ { "from": "human", "value": "I'm astonished that the Apache Commons Collections project still hasn't got around to making their library generics-aware. I really like the features provided by this library, but the lack of support for generics is a big turn-off. There is a Lavalabs fork of Commons Collections...
Is there a way to set/change the keyboard input language in Java (eg from English to German)? Example Use Case: Script to be used for playback is recorded (typed in) on a German keyboard. The automated playback is done on a English keyboard...fails if keyboard is not set to German automatically before script is run.
In Java, there isn't a built-in API that directly allows you to change the keyboard input language (like switching between English and German) at the system level. However, you can achieve this in several ways depending on the operating system you're using (Windows, Linux, macOS) and the context in which your Java appl...
38,448
[ { "from": "human", "value": "Is there a way to set/change the keyboard input language in Java (eg from English to German)? \nExample Use Case: Script to be used for playback is recorded (typed in) on a German keyboard. The automated playback is done on a English keyboard...fails if keyboard is not set to Ge...
Is there an event that fires when a WCF service gets started or shut down? Hopefully, independent of whether it is self hosted or hosted in IIS?
In Windows Communication Foundation (WCF), there are no specific events that directly indicate when a service starts or stops, whether it's self-hosted or hosted in IIS. However, you can implement similar functionality by utilizing service behaviors, or by overriding certain methods in your service host. ### Using Ser...
37,359
[ { "from": "human", "value": "Is there an event that fires when a WCF service gets started or shut down? Hopefully, independent of whether it is self hosted or hosted in IIS?\n" }, { "from": "gpt", "value": "In Windows Communication Foundation (WCF), there are no specific events that directly in...
I'd like to make anchors to every post in my asp.net forum. Every forum's post is rendered using repeater control. How can I render <a name="anchor_name"></a> in asp.net?
To render an anchor (`<a name="anchor_name"></a>`) in an ASP.NET application using a Repeater control, you can do this by generating unique anchor names based on the properties of each post. Typically, you would want to use the post ID or a combination of attributes to create a unique anchor name for each post. Here’s...
39,099
[ { "from": "human", "value": "I'd like to make anchors to every post in my asp.net forum. Every forum's post is rendered using repeater control. How can I render <a name=\"anchor_name\"></a> in asp.net?\n" }, { "from": "gpt", "value": "To render an anchor (`<a name=\"anchor_name\"></a>`) in an AS...
I have found a few libraries to edit MP3 tags (UltraID3Lib is great) but none that will edit tags for WMA files. Can anyone recommend a .net library for editing WMA tags / metadata ? Thanks MATT
For editing WMA (Windows Media Audio) tags or metadata in .NET, you can consider the following libraries: 1. **TagLib#**: TagLib# is a popular library that supports various audio formats, including WMA. It provides an easy-to-use API for reading and writing metadata for different audio files. You can install it via Nu...
37,998
[ { "from": "human", "value": "I have found a few libraries to edit MP3 tags (UltraID3Lib is great) but none that will edit tags for WMA files.\nCan anyone recommend a .net library for editing WMA tags / metadata ?\nThanks\nMATT\n" }, { "from": "gpt", "value": "For editing WMA (Windows Media Audio...
I have two Windows Mobile 6.1 applications that use the same MS SQL Server Mobile database. They might select and update data in the database at the same time. The database is kept in one .sdf file. I don't know how the MS SQL mobile version works. The application loads following sql libraries: sqlceoledb30.dll, SQLCE...
You're correct in noting that SQL Server Compact Edition (SQL CE) has some limitations when it comes to concurrent access by multiple applications. ### Key Points about SQL CE and Concurrent Access: 1. **Single-User Database**: SQL Server Compact Edition (including version 3.1 and 3.5) is designed primarily as a ...
40,981
[ { "from": "human", "value": "I have two Windows Mobile 6.1 applications that use the same MS SQL Server Mobile database. They might select and update data in the database at the same time. The database is kept in one .sdf file. \nI don't know how the MS SQL mobile version works. The application loads follow...
I am trying to show and hide an inline element (eg a span) using jQuery. If I just use toggle(), it works as expected but if I use toggle("slow") to give it an animation, it turns the span into a block element and therefore inserts breaks. Is animation possible with inline elements? I would prefer a smooth sliding if ...
Yes, animations can be applied to inline elements using jQuery, but by default, the `toggle()` method changes the display property of an inline element to `block`, which can result in unexpected behavior such as line breaks. To achieve a smooth sliding effect while keeping the inline layout, you can wrap the inline ele...
40,378
[ { "from": "human", "value": "I am trying to show and hide an inline element (eg a span) using jQuery.\nIf I just use toggle(), it works as expected but if I use toggle(\"slow\") to give it an animation, it turns the span into a block element and therefore inserts breaks.\nIs animation possible with inline e...
Given a word, I've to replace some specific alphabets with some specific letters such as 1 for a, 5 for b etc. I'm using regex for this. I understand that StringBuilder is the best way to deal with this problem as I'm doing a lot of string manipulations. Here is what I'm doing: String word = "foobooandfoo"; String conv...
Using a `StringBuilder` for string manipulations, especially when you're doing a lot of modifications, can be more efficient than using a `String`, particularly when concatenating strings in a loop. Here's how you can rewrite your regex replacements using a `StringBuilder`: ```java public class StringConverter { ...
41,103
[ { "from": "human", "value": "Given a word, I've to replace some specific alphabets with some specific letters such as 1 for a, 5 for b etc. I'm using regex for this. I understand that StringBuilder is the best way to deal with this problem as I'm doing a lot of string manipulations. Here is what I'm doing:\...
Why does the select statement below return two different values ? declare @tempDec decimal set @tempDec = 1.0 / (1.0 + 1.0) select @tempDec, 1.0 / (1.0 + 1.0)
The difference in the output of the `SELECT` statement occurs due to how SQL Server handles data types and precision in the expression evaluation. In your example: 1. **First Expression: `@tempDec`**: - You declare a variable `@tempDec` of type `decimal` and assign it a value based on the expression `1.0 / (1.0 + ...
40,978
[ { "from": "human", "value": "Why does the select statement below return two different values ?\ndeclare @tempDec decimal\nset @tempDec = 1.0 / (1.0 + 1.0)\nselect @tempDec, 1.0 / (1.0 + 1.0)\n\n" }, { "from": "gpt", "value": "The difference in the output of the `SELECT` statement occurs due to h...
Lucky me, I have to work with Oracle. And packages. I have a package that a lot of different developers are touching and it's scaring me. Is it possible to put a package inside of Version Control? Is there some kind of software out there that already does this? If not, is there some kind of export procedure? Can I jus...
It's great that you're considering version control for your Oracle package, as it can significantly help manage changes and collaboration among developers. Here are some options and best practices for version control with Oracle packages: ### 1. **Version Control Systems** You can definitely use version control system...
39,189
[ { "from": "human", "value": "Lucky me, I have to work with Oracle. And packages. \nI have a package that a lot of different developers are touching and it's scaring me. Is it possible to put a package inside of Version Control? Is there some kind of software out there that already does this? If not, is ther...
Does the MySQL command : FLUSH TABLES; flush every table in the current database, or every table on the server ? I'm using MySQL 5.0 - the documentation is unclear, although it does mention that : FLUSH TABLES WITH READ LOCK; will do so for ALL databases. Thanks.
The `FLUSH TABLES;` command in MySQL affects all tables in the current database context, but it does not specifically flush every table on the server. When you issue the command without any additional options, it will close all open tables for the current database and write any changes to disk, allowing for a clean sta...
42,522
[ { "from": "human", "value": "Does the MySQL command :\nFLUSH TABLES;\n\nflush every table in the current database, or every table on the server ?\nI'm using MySQL 5.0 - the documentation is unclear, although it does mention that :\nFLUSH TABLES WITH READ LOCK;\n\nwill do so for ALL databases.\nThanks.\n" ...
I am designing an ASP.NET website that will run sqlcmd, get some output and put this into a grid on screen. I was wondering if there is a method for reading the results of a query from sqlcmd into some kind of format that I can work with, XML, DataSet etc. Is there a friendly switch in sqlcmd that will output it in a n...
`sqlcmd` is a command-line utility that allows you to run T-SQL commands directly against SQL Server, but it does not provide a direct way to output results in structured formats like XML or DataSet. However, there are ways to get SQL results in a more manageable format that you can work with in your ASP.NET applicatio...
36,934
[ { "from": "human", "value": "I am designing an ASP.NET website that will run sqlcmd, get some output and put this into a grid on screen.\nI was wondering if there is a method for reading the results of a query from sqlcmd into some kind of format that I can work with, XML, DataSet etc.\nIs there a friendly ...
I'm in need of a functional OleDB data provider for PostgreSQL. It should be similar to the ODBC provider for MySQL. See http://dev.mysql.com/downloads/connector/odbc/5.1.html
For connecting to PostgreSQL via OLE DB, you can use the **PostgreSQL OLE DB Provider** known as **Npgsql**. Although Npgsql is primarily an ADO.NET data provider for PostgreSQL, it can be leveraged in OLE DB contexts as well. Here are a few options for OLE DB providers for PostgreSQL: 1. **Microsoft OLE DB Provider ...
39,585
[ { "from": "human", "value": "I'm in need of a functional OleDB data provider for PostgreSQL. It should be similar to the ODBC provider for MySQL. See http://dev.mysql.com/downloads/connector/odbc/5.1.html\n" }, { "from": "gpt", "value": "For connecting to PostgreSQL via OLE DB, you can use the *...
This is my code: import datetime today = datetime.date.today() print(today) This prints: 2008-11-22 which is exactly what I want. But, I have a list I'm appending this to and then suddenly everything goes "wonky". Here is the code: import datetime mylist = [datetime.date.today()] print(mylist) This prints [datetime.d...
To get the date in the format you want (i.e., as a simple string like "2008-11-22"), you can convert the `datetime.date` object to a string using the `strftime` method. Here’s how you can modify your code: ```python import datetime # Create a list and append today's date as a formatted string mylist = [datetime.date....
43,756
[ { "from": "human", "value": "This is my code:\nimport datetime\ntoday = datetime.date.today()\nprint(today)\n\nThis prints: 2008-11-22 which is exactly what I want.\nBut, I have a list I'm appending this to and then suddenly everything goes \"wonky\". Here is the code:\nimport datetime\nmylist = [datetime.d...
What is meant by using an explicit memory fence?
An explicit memory fence, also known as a memory barrier or memory fence, is a programming construct used in concurrent programming to control the ordering of memory operations (loads and stores) performed by a thread. It ensures that certain memory operations are completed before others, thereby preventing the compile...
40,398
[ { "from": "human", "value": "What is meant by using an explicit memory fence?\n" }, { "from": "gpt", "value": "An explicit memory fence, also known as a memory barrier or memory fence, is a programming construct used in concurrent programming to control the ordering of memory operations (loads a...
I was wondering if it is possible to tweak the way garbage collector works on JavaMe in order to improve performance somehow(may reducing the number of passages)? I´ve seen some articles about it, but mostly directed Java SE and most of them says GC is highly dependant on the maker. How much would that be.
Java ME (Micro Edition) is designed for resource-constrained devices, such as mobile phones and embedded systems. Consequently, the garbage collection (GC) mechanisms in Java ME may differ significantly from those in Java SE (Standard Edition) due to these constraints. ### Understanding Java ME Garbage Collection 1....
39,452
[ { "from": "human", "value": "I was wondering if it is possible to tweak the way garbage collector works on JavaMe in order to improve performance somehow(may reducing the number of passages)? I´ve seen some articles about it, but mostly directed Java SE and most of them says GC is highly dependant on the ma...
I have all the web pages of a website. My task is to change all HTML files to .asp files and change the links. I have about 280 HTML files. Is there any software or web service which can read a website and show me the link structure of the site (to make my job easier) similar to a site map?
Yes, there are several tools and services available that can help you analyze a website's link structure and generate a sitemap, which can make your task easier. Here are some options: 1. **Screaming Frog SEO Spider**: - This is a desktop program that crawls websites and provides various SEO-related data, including...
38,680
[ { "from": "human", "value": "I have all the web pages of a website. My task is to change all HTML files to .asp files and change the links. I have about 280 HTML files.\nIs there any software or web service which can read a website and show me the link structure of the site (to make my job easier) similar t...
I need a conditional compilation switch that knows if I am compiling for the mono or MS .NET runtime. How can I do this?
To conditionally compile code for Mono or the Microsoft .NET runtime, you can use the preprocessor directives `#if`, `#elif`, and `#endif` in combination with the predefined symbols. Mono defines certain symbols that you can check during compilation. Here's how you can do this: 1. **For the Mono Runtime**: You can ch...
41,160
[ { "from": "human", "value": "I need a conditional compilation switch that knows if I am compiling for the mono or MS .NET runtime. How can I do this? \n" }, { "from": "gpt", "value": "To conditionally compile code for Mono or the Microsoft .NET runtime, you can use the preprocessor directives `#...
I want to save a set of email addresses collected from a text field (separated by commas) into a single field in a table. I am trying to use serialize but I'm getting SerializationTypeMismatch error. How can I do this? This is my model: class Crew < ActiveRecord::Base class Recipients < HashWithIndifferentAccess ; end ...
The error you're encountering, `SerializationTypeMismatch`, typically arises when the data you're trying to serialize doesn't match the expected type defined in your model. In your case, it appears you're attempting to serialize a custom class `Recipients` which inherits from `HashWithIndifferentAccess`. However, `se...
37,354
[ { "from": "human", "value": "I want to save a set of email addresses collected from a text field (separated by commas) into a single field in a table. I am trying to use serialize but I'm getting SerializationTypeMismatch error. How can I do this?\nThis is my model:\nclass Crew < ActiveRecord::Base\nclass R...
I've seen this syntax a couple times now, and it's beginning to worry me, For example: iCalendar iCal = new iCalendar(); Event evt = iCal.Create<Event>();
The syntax you're seeing seems to indicate the use of generics in C#. The line `Event evt = iCal.Create<Event>();` implies that the `Create` method of the `iCalendar` class is a generic method that creates an instance of the specified type, in this case, `Event`. Here’s a breakdown of the components: - **iCalendar**...
37,733
[ { "from": "human", "value": "I've seen this syntax a couple times now, and it's beginning to worry me,\nFor example:\niCalendar iCal = new iCalendar();\nEvent evt = iCal.Create<Event>();\n\n" }, { "from": "gpt", "value": "The syntax you're seeing seems to indicate the use of generics in C#. The ...
I am trying to monitor my outlook inbox so whenever new emails come in with attachments I save the attachment to some other location. Can anyone help me out?
You can achieve this by using a combination of Microsoft Outlook and VBA (Visual Basic for Applications) to create a script that automatically saves email attachments to a designated folder whenever a new email arrives. Here’s a step-by-step guide to set it up: ### Step 1: Enable Developer Options in Outlook 1. Open O...
40,218
[ { "from": "human", "value": "I am trying to monitor my outlook inbox so whenever new emails come in with attachments I save the attachment to some other location. Can anyone help me out?\n" }, { "from": "gpt", "value": "You can achieve this by using a combination of Microsoft Outlook and VBA (V...
What is the best way to change the height and width of an ASP.NET control from a client-side Javascript function? Thanks, Jeff
To change the height and width of an ASP.NET control using a client-side JavaScript function, you can use the `ClientID` property of the control to get its rendered ID on the client-side. Here’s a general approach to achieve this: ### Step-by-Step Guide 1. **Define Your ASP.NET Control**: First, ensure you have your ...
38,908
[ { "from": "human", "value": "What is the best way to change the height and width of an ASP.NET control from a client-side Javascript function?\nThanks,\nJeff\n" }, { "from": "gpt", "value": "To change the height and width of an ASP.NET control using a client-side JavaScript function, you can use...
This is the HTML: <div id="testBlue"> <span>hello</span> <span id="testGreen" class="testGreen">hello2</span> </div> If I have set in CSS: #testBlue span { color:Blue; } .testGreen, #testGreen { color:Green; } How can I override the general style in the second SPAN? I have tried both id and class selector...
To override the general style applied to the second `<span>` element in your HTML, you need to ensure that the more specific selectors take precedence. In your case, the `#testBlue span` selector is applying the blue color to all `<span>` elements within the `#testBlue` div, including the one with the id of `testGreen`...
39,818
[ { "from": "human", "value": "This is the HTML:\n<div id=\"testBlue\">\n <span>hello</span>\n <span id=\"testGreen\" class=\"testGreen\">hello2</span>\n</div>\n\nIf I have set in CSS:\n#testBlue span { color:Blue; } \n.testGreen, #testGreen { color:Green; }\n\nHow can I override the general style in...
What is the difference between request, response and server?
In the context of web communication, the terms "request," "response," and "server" refer to distinct yet interrelated concepts. Here's a breakdown of each: ### Request: - A **request** is a message sent from a client (usually a web browser or a mobile app) to a server, asking for some resources or data. - Requests are...
39,303
[ { "from": "human", "value": "What is the difference between request, response and server?\n" }, { "from": "gpt", "value": "In the context of web communication, the terms \"request,\" \"response,\" and \"server\" refer to distinct yet interrelated concepts. Here's a breakdown of each:\n\n### Requ...
In CFEclipse, I do a lot of double-clicking to select text. The standard behavior is to select all text within the nearest word boundaries. This is problematic when editing code where the original editor didn't use camel-case; for example, they wrote "myObject" as "my_object". Is there a way to change the double-click ...
In CFEclipse, the default behavior for double-click selection generally follows the conventions of many text editors, which treat underscores (`_`) as word delimiters rather than as part of a word. Unfortunately, CFEclipse does not natively support changing the double-click selection behavior to treat underscores as va...
40,880
[ { "from": "human", "value": "In CFEclipse, I do a lot of double-clicking to select text. The standard behavior is to select all text within the nearest word boundaries. This is problematic when editing code where the original editor didn't use camel-case; for example, they wrote \"myObject\" as \"my_object\...
Is Microsoft Project the best tool for managing software development or IT projects or is there an alternative that is better?
Microsoft Project is a well-known project management tool that offers a wide range of features for planning, scheduling, and tracking projects. However, whether it is the "best" tool for managing software development or IT projects depends on various factors, including the specific needs of the project, the team's work...
40,007
[ { "from": "human", "value": "Is Microsoft Project the best tool for managing software development or IT projects or is there an alternative that is better?\n" }, { "from": "gpt", "value": "Microsoft Project is a well-known project management tool that offers a wide range of features for planning...
I'm looking for a good ssh console plugin for Eclipse, and can't find much at all. Would anyone have some good leads on one?
If you're looking for an SSH console plugin for Eclipse, you might consider the following options: 1. **Eclipse Terminal Plugin**: - The Eclipse Terminal plugin (also known as "TM Terminal") is part of the Eclipse Target Management (TM) project. It allows you to open terminal sessions directly within Eclipse and su...
42,385
[ { "from": "human", "value": "I'm looking for a good ssh console plugin for Eclipse, and can't find much at all. Would anyone have some good leads on one?\n" }, { "from": "gpt", "value": "If you're looking for an SSH console plugin for Eclipse, you might consider the following options:\n\n1. **Ec...
I am sure making a silly mistake but I can't figure what: In SQL Server 2005 I am trying select all customers except those who have made a reservation before 2 AM. When I run this query: SELECT idCustomer FROM reservations WHERE idCustomer NOT IN (SELECT distinct idCustomer FROM reservations WHERE DATEPART ( ho...
It looks like the issue with your query arises from the handling of `NULL` values in the `NOT IN` clause. When you use `NOT IN`, if any of the values returned by the subquery are `NULL`, the entire result will be affected, and you might end up with no rows returned. To clarify, if any customer in your `reservations` t...
42,138
[ { "from": "human", "value": "I am sure making a silly mistake but I can't figure what:\nIn SQL Server 2005 I am trying select all customers except those who have made a reservation before 2 AM.\nWhen I run this query:\nSELECT idCustomer FROM reservations \nWHERE idCustomer NOT IN \n (SELECT distinct idCust...
I'm using Ryan Bates' excellent scope_builder to conditionally build a new named scope to use in a search() method of an Active Record model. The example documentation shows that you can do something like the following: # in product model def self.search(options) scope_builder do |builder| builder.release...
When using Ryan Bates' `scope_builder`, you can return the results of executing the built scope directly by calling the appropriate method (like `all`, `to_a`, or `count`) on the final scope you've constructed within the `scope_builder` block. By default, the block returns the `Builder` instance, which is why you're se...
40,982
[ { "from": "human", "value": "I'm using Ryan Bates' excellent scope_builder to conditionally build a new named scope to use in a search() method of an Active Record model.\nThe example documentation shows that you can do something like the following:\n # in product model\n def self.search(options)\n sco...
I'm passing a reference of a form to a class. Within this class I believed I could use formRef->Controls["controlName"] to access properties on the control. This works for a few labels, but on a button I receive a "Object reference not set to an instance of an object." when I try to change the Text property. Help or ex...
The error message "Object reference not set to an instance of an object" typically occurs when you attempt to access a member of a reference type that is `null`. In your case, it sounds like you are trying to access a button control on a form, but the control reference is `null`. This could happen for a few reasons: 1...
39,492
[ { "from": "human", "value": "I'm passing a reference of a form to a class. Within this class I believed I could use formRef->Controls[\"controlName\"] to access properties on the control.\nThis works for a few labels, but on a button I receive a \"Object reference not set to an instance of an object.\" when...
It seems that I can't control the NSApp delegate from within a System Preferences pane, which is understandable. Is there any other way I can have my object notified when the program becomes active?
In a System Preferences pane, you are indeed limited in certain ways compared to a regular macOS application. However, you can still monitor the application state through notifications. To receive notifications when the System Preferences application (NSApplication) becomes active or inactive, you can observe the `NSA...
41,647
[ { "from": "human", "value": "It seems that I can't control the NSApp delegate from within a System Preferences pane, which is understandable. Is there any other way I can have my object notified when the program becomes active?\n" }, { "from": "gpt", "value": "In a System Preferences pane, you a...
When creating a UIView with a navigation bar in interface builder, the top bar takes some space, but the view still has the same size. This mean that the bottom of the view is not visible. Is there a way to get the "visible size" of a UIView? I would like to show a subview at the bottom of the screen, but part of the...
In iOS development, when you're working with a `UIView` that has a `UINavigationBar` (or any other system element that might consume space), the content area of the view may indeed extend behind these elements. To obtain the visible size of a `UIView` while accounting for the navigation bar and other UI elements, you c...
41,373
[ { "from": "human", "value": "When creating a UIView with a navigation bar in interface builder, the top bar takes some space, but the view still has the same size. This mean that the bottom of the view is not visible.\nIs there a way to get the \"visible size\" of a UIView? I would like to show a subview ...
How can I test my site in AOL without installing AOL? I did that once on my machine, and it killed it... ;) I know, I know... I can use a Virtual Machine, but I'm really just looking for an AOL Browser... a separate browser install.
If you want to test your site in the AOL browser without installing the full AOL software, there are a few alternative options you can consider: 1. **AOL Desktop Gold**: Although this is still an installation of the AOL software, it is a more modern version of AOL’s web browser. If you want to test in AOL without the ...
39,500
[ { "from": "human", "value": "How can I test my site in AOL without installing AOL? I did that once on my machine, and it killed it... ;)\nI know, I know... I can use a Virtual Machine, but I'm really just looking for an AOL Browser... a separate browser install.\n" }, { "from": "gpt", "value": "...
Does anyone know what is wrong with this query? SELECT DISTINCT c.CN as ClaimNumber, a.ItemDate as BillReceivedDate, c.DTN as DocTrackNumber FROM ItemData a, ItemDataPage b, KeyGroupData c WHERE a.ItemTypeNum in (112, 113, 116, 172, 189) AND a.ItemNum = b.ItemNum...
The error message "ORA-01791: not a SELECTed expression" occurs in Oracle when you try to order by a column that is not included in the `SELECT` statement. In your case, you are trying to order by `a.DateStored`, but `DateStored` is not included in your `SELECT` clause. To fix this issue, you should include `a.DateSto...
42,334
[ { "from": "human", "value": "Does anyone know what is wrong with this query?\n SELECT DISTINCT c.CN as ClaimNumber, \n a.ItemDate as BillReceivedDate, c.DTN as\n DocTrackNumber\n FROM ItemData a,\n ItemDataPage b,\n KeyGroupData c\n WHERE a.ItemTypeNum in (112, 113, 1...
I want to be able to take still images with a web cam, via .NET 2.0 (or 3.5 if necessary). I know I can use DirectShow but that seems like a very large learning curve. Is there a simple to use OCX, or library that can work with most standard webcams?
If you're looking to capture still images from a webcam in .NET 2.0 or 3.5 without diving deep into DirectShow, there are a few options you might consider: ### 1. **AForge.NET** AForge.NET is a popular framework that provides a simpler interface for working with video devices (like webcams) compared to DirectShow. It ...
39,721
[ { "from": "human", "value": "I want to be able to take still images with a web cam, via .NET 2.0 (or 3.5 if necessary). I know I can use DirectShow but that seems like a very large learning curve.\nIs there a simple to use OCX, or library that can work with most standard webcams?\n" }, { "from": "gp...
Is it possible to set the size of a checkbox using CSS or HTML across browsers? width and size work in IE6+, but not with Firefox, where the checkbox stays 16x16 even if I set a smaller size.
The appearance of checkboxes is largely controlled by the browser and the operating system, which makes them somewhat resistant to styling with CSS. While you can manipulate some aspects of their appearance (like margins, padding, and background), the size of native checkboxes is not directly changeable in a way that w...
41,136
[ { "from": "human", "value": "Is it possible to set the size of a checkbox using CSS or HTML across browsers? \nwidth and size work in IE6+, but not with Firefox, where the checkbox stays 16x16 even if I set a smaller size.\n" }, { "from": "gpt", "value": "The appearance of checkboxes is largely ...
I need to control (play,rewind,stop) my Video Cam connected to firewire of my PC Is this possible. My program is written in .NET Thanks Anon
Yes, it's possible to control a FireWire-connected video camera using .NET, but it requires some understanding of how to interface with the camera using appropriate libraries and APIs. Here are steps to help you get started: ### 1. **Check the Camera's API/SDK:** - Many video cameras come with their own SDK (Softwa...
39,145
[ { "from": "human", "value": "I need to control (play,rewind,stop) my Video Cam connected to firewire of my PC\nIs this possible. My program is written in .NET \nThanks\nAnon\n" }, { "from": "gpt", "value": "Yes, it's possible to control a FireWire-connected video camera using .NET, but it requi...
What is the @ symbol mean in oracle? For example: select * from question_answer@abcd where id = '45'
In Oracle, the `@` symbol is used to denote a database link. A database link is a schema object in one database that enables you to access objects on another database. This allows you to execute queries against remote databases, treating them as if they were part of the local database. In your example: ```sql SELECT ...
43,052
[ { "from": "human", "value": "What is the @ symbol mean in oracle? \nFor example:\nselect * from question_answer@abcd where id = '45'\n\n" }, { "from": "gpt", "value": "In Oracle, the `@` symbol is used to denote a database link. A database link is a schema object in one database that enables you...
In other words, can fn() know that it is being used as $var = fn(); rather than as fn();? A use case would be to echo the return value in the latter case but to return it in the former. Can this be done without passing a parameter to the function to declare which way it is being used?
In PHP, functions cannot inherently distinguish how they are being called (i.e., whether their return value is being assigned to a variable or simply being invoked). This is because once the function is called, the context in which it is called (whether it's being assigned or echoed) is not part of the function's scope...
40,543
[ { "from": "human", "value": "In other words, can fn() know that it is being used as $var = fn(); rather than as fn();?\nA use case would be to echo the return value in the latter case but to return it in the former.\nCan this be done without passing a parameter to the function to declare which way it is bei...
I am performing two validations on the client side on the samve event. I have defined my validations as shown below btnSearch.Attributes["OnClick"] = "javascript:return prepareSave(); return prepareSearch();" Pseudo code for prepareSave(): { if (bPendingchanges) { return confirm('Need to save pending chang...
The issue you're encountering stems from the way you've set up your `OnClick` attribute for the button. When you use the `return` keyword in JavaScript, it stops executing further code in that function as soon as it encounters a `return` statement. In your current setup, the first `return` statement in `prepareSave()`...
40,617
[ { "from": "human", "value": "I am performing two validations on the client side on the samve event.\nI have defined my validations as shown below\nbtnSearch.Attributes[\"OnClick\"] = \"javascript:return prepareSave(); return prepareSearch();\"\n\nPseudo code for \nprepareSave():\n{\n if (bPendingchanges)\n...
Under what circumstances should I expect memcpys to outperform assignments on modern INTEL/AMD hardware? I am using GCC 4.2.x on a 32 bit Intel platform (but am interested in 64 bit as well).
The performance of `memcpy` versus simple assignments in C or C++ can vary depending on several factors. Here are some circumstances under which you might expect `memcpy` to outperform straightforward assignments, especially on modern Intel and AMD hardware: 1. **Large Data Sizes**: `memcpy` is typically optimized for...
38,909
[ { "from": "human", "value": "Under what circumstances should I expect memcpys to outperform assignments on modern INTEL/AMD hardware? I am using GCC 4.2.x on a 32 bit Intel platform (but am interested in 64 bit as well).\n" }, { "from": "gpt", "value": "The performance of `memcpy` versus simple...
class A def initialize @x = do_something end def do_something 42 end end How can I stub do_something in rspec, before the original implementation is called (thus assigning 42 to @x)? And without changing the implementation, of course.
To stub the `do_something` method in RSpec before it is called in the constructor of class `A`, you can use RSpec's `allow_any_instance_of` method. This allows you to set up a stub on an instance of the class before the method is called during the initialization. Here’s how you can do it: ```ruby require 'rspec' clas...
43,071
[ { "from": "human", "value": "class A\n def initialize\n @x = do_something\n end\n\n def do_something\n 42\n end\nend\n\nHow can I stub do_something in rspec, before the original implementation is called (thus assigning 42 to @x)? And without changing the implementation, of course.\n" }, { ...
In C++ often do something like this: typedef map<int, vector<int> > MyIndexType; Where I then use it like this: MyIndexType myIndex; for( ... some loop ...) { myIndex[someId].push_back(someVal); } If there was no entry in the map the code will insert a new empty vector and then append to it. In Python it would look...
In Python, you can achieve a similar behavior to the C++ `map<int, vector<int>>` using `defaultdict` from the `collections` module. This allows you to specify a default factory function that will be called to create a new value whenever a key is accessed that does not already exist in the dictionary. Here's how you ca...
39,966
[ { "from": "human", "value": "In C++ often do something like this:\ntypedef map<int, vector<int> > MyIndexType;\n\nWhere I then use it like this:\nMyIndexType myIndex;\nfor( ... some loop ...)\n{\n myIndex[someId].push_back(someVal);\n}\n\nIf there was no entry in the map the code will insert a new empty ve...
How to put underline for first letter for access key for ?
To create an underline for the first letter of an access key in an HTML context (like web development), you typically use an `accesskey` attribute along with some CSS or HTML tricks to visually represent the underlined letter. Here's a simple way to achieve that with a combination of HTML and CSS: 1. Use the `access...
41,061
[ { "from": "human", "value": "How to put underline for first letter for access key for ?\n" }, { "from": "gpt", "value": "To create an underline for the first letter of an access key in an HTML context (like web development), you typically use an `accesskey` attribute along with some CSS or HTML...