instruction_seed
stringlengths
1
35.8k
_source
stringclasses
1 value
I read the article Algorithm to Switch Between RGB and HSB Color Values Type RGBColor Red As Byte Green As Byte Blue As Byte End Type Type HSBColor Hue As Double Saturation As Double Brightness As Double End Type Function RGBToHSB(rgb As RGBColor) As HSBColor Dim minRGB, maxRGB, Del...
stackexchange/codereview
I need to set the home page in browser, but setHomePage works only in IE. Are there any method to do it? (i can't find such results) Thanks much
stackexchange/codereview
I'm writing a server app which should be able to log at different levels both on the console and a log file. The problem is, if logging.basicConfig() is set it will log to the console but it must be set in the main thread. It can also be set with logging.basicConfig(filename='logger.log') to write to a file. Setting a ...
stackexchange/codereview
Concerning the following situation: www.foo.com is a page delivered in UTF-8. It features a login form to www.bar.com/Servlet. www.bar.com is a ISO-8859-1 capable application. I have the following problem: whenever someone is using special chars like German umlauts for his password the login fails because the password ...
stackexchange/codereview
I have a simple html table which has several rows. the following is implemented 1) I have given style for mouseover event of the row so that it will be highlighted once the mouse moves over it. 2)Each row has a checkbox as well. once this is selected, the row which the check box is in need to be shown in a different co...
stackexchange/codereview
How can I reload the data in the TTTableViewController? I tried to call reloadData but it doesn't display the new data. I have created the datasource file, which is a subclass of TTListDataSource. Basically, the init function looks like this. - (id) initWithObject:(NSArray *)objects { if (self = [super ini...
stackexchange/codereview
I used Netbeans to create a Spring MVC 3.0 app. I have a simple controller and JSP view. The JSP view appears correctly except for an image that doesn't render. My directory structure looks like this: In my Home.jsp page, the image that doesn't render is referenced like so: <img src="Images/face.png" /> I've verif...
stackexchange/codereview
I would appreciate insight into why this happens and how I might do this more eloquently. When I use sapply, I would like it to return a 3x2 matrix, but it returns a 2x3 matrix. Why is this? And why is it difficult to attach this to another data frame? a <- data.frame(id=c('a','b','c'), var1 = c(1,2,3), var2 = c(3,2,1)...
stackexchange/codereview
I'm trying to get the log history (recursively, if possible) of a fixed path in SVN across all copies/moves/etc. Effectively, I'm trying to avoid peg revisions, and have the log apply to the path rather than the objects. The svn manual poses this question - "Are you asking about the operations that have happened to a...
stackexchange/codereview
I am little bit confuse. I am working with QTreeView as model I assigned QSortFilterProxyModel. http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qsortfilterproxymodel.html //treeview self.ProxyView = QtGui.QTreeView(self.centralwidget) //model self.ProxyModel = QtGui.QSortFilterProxyModel(self) self.ProxyMod...
stackexchange/codereview
Please, answer any-of the three-parts: When I copy (simple text) from the Web into MS Office One-Note the program detects the url where I'm copying from: i.e. The following example is a working script. Whenever it is running, it will briefly display... Pasted from http://www.autohotkey.com/docs/misc/Clipboard.htm 1...
stackexchange/codereview
i need help with this 2 rewrite rules: RewriteEngine On RewriteBase / # folder/script.php?A=1&B=2 -> xyz/1/2 (REDIRECT) RewriteCond %{QUERY_STRING} ^A=([^&]+)&B=([^&]+)$ RewriteRule ^folder\/script\.php$ /xyz/%1/%2? [R=301,L] # xyz/1/2 -> folder/script.php?A=1&B=2 (REWRITE) RewriteRule ^xyz\/([^\/]+)\/([^\/]+)$ /...
stackexchange/codereview
I'm lazy, I know (by hey, at least next time I Google it then I'll find the answer) Do you have an existing piece of code that takes a Date object, and generates a string, that has a sort order equivalent to the chronological order? I want the string to contain all the date pieces (day, month, hour, minute, millisecond...
stackexchange/codereview
How to create usa today like News picture scroller?
stackexchange/codereview
In one of my pages <s:link value="/index.seam"><h:outputText value="#{messages.home}"/></s:link> renders as <a href="/acm20/index.seam?cid=64" id="j_id9">/index.seamHome</a> How can I get rid of the "/index.seam" in front of "Home" ?
stackexchange/codereview
How would you add a span tag to the text inside a hyperlink? Right now, I'm changing the existing text to something else, using this: $(document).ready(function() { $("a:contains('text')").text('new-text') }); I need the link to look like this when it is parsed: <a href="/xxx.aspx">new-text<span class="someclass">some...
stackexchange/codereview
If I have an object, how can I know the details of the object. Like the file in which it is defined, its methods, properties etc.
stackexchange/codereview
I have a text field where users enter a URL string, which cannot contain spaces or non-alphanumeric characters (if that's an accurate way of putting it). Is there a way in Rails to restrict entry into the text_field itself so that spaces and characters like /":}{#$^@ can be avoided? Thanks a lot. To clarify, the only ...
stackexchange/codereview
I have a universal app for ipad and iphone. What I'm trying to determine is what OS version do my users need to have in order for my app to work? In Xcode, in the top left hand corner I see: "Device - 4.0 | Release | MyAppName" Does this mean they need to have ios 4.0? Also, the weird thing is that my ipad is running i...
stackexchange/codereview
-->I am new to Android And i want to show two progress dialog one after another?? -->First i want to show when my image is load from internet, when this process is done i have set A button on that Remote image. -->When i click that button i want Dialog for second time..(on clicking button i have set video streaming co...
stackexchange/codereview
I am trying to increase the width of #Item, but it increases only with text width. HTML <div><span class="Item">Brand Strategy:</span><span class="Summary">Strategy</span></div> CSS .Item{background-color:#000; height:40px; color:#FFF; text-align:center; width:200px;} How do I get the specified width for #Item. Thank...
stackexchange/codereview
I don't see the how to change color only from black to white. Grayscale. My example. I have values that goes from 0 to 100. Their representation is like this: 0 - Black 100 - White I am painting JComponent and whenever I have to change color I have to call g.setColor(Color); But how to tell it to change color only fr...
stackexchange/codereview
I have two textboxes which I am trying to use for autocomplete. The source data for both is coming from an ASP.NET ASMX web service, returned in JSON format. I'm getting back a List where NameValue is defined as: public struct NameValue { public string Name; public string Value; } How can I parse this data such that th...
stackexchange/codereview
I haven't been able to figure this out. It's easy to create two ctors but I wanted to learn if there's an easy way to do this. How can one pass a std::map as the default parameter to a ctor, e.g. Foo::Foo( int arg1, int arg2, const std::map<std::string, std::string> = VAL) I've tried 0, null, and NULL as VAL, none of ...
stackexchange/codereview
I'm using WMI inside c# to get a list of users currently "logged in" to a machine: ManagementScope ms = new ManagementScope(ManagementPath.DefaultPath); var q = new SelectQuery("Win32_LoggedOnUser"); using (var query = new ManagementObjectSearcher(ms, q)) { using (var results = query.Get()) { ...
stackexchange/codereview
I want to use Rounded Corner Button in my asp.net application. Do we have anything in ASP.NET 3.5 which helps us to make a rounded corner button ?
stackexchange/codereview
I want to generate a list of all the signal connections between high-level VHDL blocks in a VHDL file. For example, this is what Quartus' RTL viewer does, but graphically. I want my results to be textual instead of graphical, and to look something like this: Block A: input: block_a_instance_name.signal_name <- block_b_...
stackexchange/codereview
Possible Duplicate: When (if ever) is eval NOT evil? I've heard many places that PHP's eval function is often not the answer. In light of PHP 5.3's LSB and closures we're running out of reasons to depend on eval or create_function. Is there is any conceivable cases where eval is the best (only?) answer in PHP 5.3...
stackexchange/codereview
Is there any way to limit the length of a border. I have a <div> that has a bottom border, but I want to add a border on the left of the <div> that only stretches half of the way up. Is there any way to do so without adding extra elements on the page?
stackexchange/codereview
I am working in MVC and I want to show my data in an asp GridView and I also want to change the row backcolor whenever mouse hover that particular row. Please let me know how can I do that. Thanks in advance, gbhatnagar.
stackexchange/codereview
In the below code, I would like to use the code in static load method to refresh the object... but how would I reset the current object with new object ? Is copying field by field is the only way ? class WIP { // <Snipped> Various other properties... public Boolean Refresh() { // Need to change ...
stackexchange/codereview
I would like to ask about best practices or the simplest way possible of translating static content. E.g. translating, "search" or "save changes". My current idea is: depending on users browser locale (maybe geolocation of IP address, but I prefer browser locale) choose a subdomain, e.g. "fr.myweb.com". Set a cookie, s...
stackexchange/codereview
Maybe that's a silly question... But what's the best (performance and memory wise) way of creating a constant IEnumerable<TSomeType>...? If it's not possible to define "the best" way, which are my options? What is your opinion, do you think there is a most appropriate way of doing that? For instance: var enumerable = ...
stackexchange/codereview
My question is similar, but different from jquery-hover-menu-when-hovering-over-child-menu-disappears. I originally had the hover event on the li.item, which was a little quirky, but did what i needed it to do. I switched the hover to the span so that the event would fire on the text block, rather than the list block,...
stackexchange/codereview
I am using Devise on Rails and I'm wondering if there is a hook or a filter that I can use to add a bit of code to Devise's user registration process and send a welcome email to the user after an account has been created. Without Devise it would be something like this... respond_to do |format| if @user.save ...
stackexchange/codereview
I need to create a make file which will allow the user to choose to create either a 64 or 32 bit build. I'm new to make and am not sure what the best way to do this would be. Does anyone have any suggestions? Thanks
stackexchange/codereview
if(file_exists("./squadra/photos/photog.jpg")) { echo "### YES ###"; } else { echo "### NO ###"; } if i run this function on /zones/team.php it works (it print YES). If i run this function on /auth/ajax.php it print NO. Why? EDIT So i make some experiment. 1 - If i try : // file on /zones/team.php if(file_exis...
stackexchange/codereview
I Have a small business network with a couple of switches, end devices but only one router. I want to display the network topology like a graph would like (with the router on top). I'm only have access to network layer addresses, so I managed to obtain for every device on the network it's ip address and ip network i.e...
stackexchange/codereview
I'm making a gui API for games and one requested feature was a shake event. Essentially an event very similar to Windows 7's Aero Shake. When the mouse is down, if it is rapidly moved back and forth uni directionally, the event is fired. I'm just not sure what type of psedocode would go into this?
stackexchange/codereview
I am trying to debug into my kernel code, using the device emulation mode. However, I set break points in my kernel and it doesn't break. MatrixMultiplication_Kernel<<<dimGrid, dimBlock>>>(Md, Nd, Pd, Width); Can anyone assist me with this?
stackexchange/codereview
Does anyone know why magento does not provide any manual or developer guide? All most every framework and CMS provides an official development manual but in the case of magento I did not find any official manual which surprised me. Learning magento is hard because they are making this thing hard.
stackexchange/codereview
Is there any possibility of using something like FindFirst, FindNext, FindLast methods, that we use in VB6? I need to search my database before adding record, if record under current name is already there or not. Say I have a telephone book, I donot want any name to go again without warning. Thanks Furqan
stackexchange/codereview
I am using jQuery in a portal environment. The portal header files are loading jQuery 1.4.2 and there are other portlets using that version of jQuery. However, I recently discovered a bug that was fixed in jQuery 1.4.3, so I want to use that version for my portlet. I know how to detect the jQuery version. But, I am not...
stackexchange/codereview
I'm creating files in my Android application using: FileOutputStream fos = context.openFileOutput(fileName, Context.MODE_PRIVATE); fos.write(data); fos.flush(); fos.close(); Then later I'm trying to do some cleanup, so I'm comparing the last modified date to some threshold value, but the comparison is showing that the...
stackexchange/codereview
I am a new iPhone developer learning Objective-C, and am trying to dynamically calculate the distances between the users latitude/longitude coordinates, with latitude/longitude coordinates in a SQLite table. I know that we can use CLLocations method: (CLLocationDistance)distanceFromLocation:(const CLLocation *)locatio...
stackexchange/codereview
We have an existing application that makes use of the System.IO.Packaging.Package class for reading in a significant amount of structured data. Our application works fine in all scenarios except when attempting to open a Package from a read-only source such as a CD or DVD. The following line is the point where our a...
stackexchange/codereview
Does JavaScript have the equivalent of the ? : operator that you have in Java? Ie: String s = (isBlah ? "blah" : "not blah");
stackexchange/codereview
I have a SaveFileDialog with the option of saving with type .foo or .bar. The first item in the list, and selected by default, is .foo. The default filename is "untitled", and the default extension is ".foo". When the SaveFileDialog appears, it puts "untitled" in the file name textbox. I can change it to "untitled....
stackexchange/codereview
I've been importing a whole XML File to a temp table with a XML Datatype using the below code INSERT INTO import.XMLCompanyDetail ( XMLData ) SELECT BulkColumn AS XMLData FROM OPENROWSET (BULK '\\Server\Dir1\Dir2\Dir3\ExampleXML.xml', SINGLE_BLOB) AS XMLDATA However what I'm struggling to ...
stackexchange/codereview
I have been asked to modify an ASP.NET 3.5 web application. The solution file does not appear to be present on the web server, but there is a DLL. Is it possible to modify the solution by "reverse engineering" the DLL?
stackexchange/codereview
I committed a bunch of changesets locally (23-28) and then I realized that I wanted to go back to revision 25, so I ran "hg up -r 25" to go back. Then I started working from there and committed a few changesets. Now I'm ready to push my changes to the server, but when I try to do that it complains with "abort: push c...
stackexchange/codereview
I have 2 tables that I'm trying to query. The first has a list of meters. The second, has the data for those meters. I want to get the newest reading for each meter. Originally, this was in a group by statement, but it ended up processing all 7 million rows in our database, and took a little over a second. A subquery a...
stackexchange/codereview
I'm having trouble wrapping my head around this issue. I have a business model and an address model. To make things more complicated, I also have a location model. A business can have multiple locations, but only one mailing address. Here is a simple object chart. Business -Name -MailingAddress Location -Business -Na...
stackexchange/codereview
I am converting dataset table into custom object using linq: var list = (from row in ds.Tables[0].AsEnumerable() select new MyObj { Porp1 = row.Field<string>("field1"), Prop2 = row.Field<string>("field2") }).ToList(); How do I check that a column with specific ...
stackexchange/codereview
Thanks for stoping by.... i have followed the below link to learn about the In App purchase in iPhone.... http://mobile.tutsplus.com/tutorials/iphone/iphone-sdk-in-app-purchases/ when i run the code on xcode no errors found . -(void)request:(SKRequest *)request didFailWithError:(NSError *)error { NSLog(@"Faile...
stackexchange/codereview
I am curious about how the OpenCV Feature descriptors are compared. For instance, I can use cvExtractSURF() to get a list of features and their 64-bit (or 128-bit) descriptors, where can I find out how two descriptor can be compared? In stepping through some sample code, to me it looks like two of my "matched" features...
stackexchange/codereview
According to the MSDN documentation, the function GetOpenFileName() has no character limit with option OFN_ALLOWMULTISELECT when compiled for Unicode with Windows 2000 and greater. However, on Windows XP x64 SP2, I'm finding that the 32k ANSI limit is still in effect, despite the use of Unicode. I've seen other complai...
stackexchange/codereview
Below is a simple method I wrote (extremely simplified down so I hope it still gets the jist across) for taking a string representation of an array's elements in a string, and converting them into an actual array of those values. t is the type of the array. DeserializeArray(string sArrayElements, out Array aValues, Typ...
stackexchange/codereview
I'm studying the Tkinter Listbox widget and have been unable to find solutions for the following functionality: How can I create non-selectable horizontal separator items, eg. separators equivalent to the Tkinter Menu widget's .add_separator()? (Using chars like dashes and underscores looks awful). How can I disable ...
stackexchange/codereview
How can you validate fields in a Wix Custom Dialog? I've got a combo box that I'm using to set a property that cannot be null.
stackexchange/codereview
I cannot make sense of this... The simplified code below OUGHT to insert a new form field of the current time's second value. Instead, even though the list manipulation happens correctly (as verifiable within the controller and in the debug output), the View does render an additional element, but seems to be just a c...
stackexchange/codereview
I have the following php script which works flawlessly in normal circumstances (i.e. visiting the page directly): HTML <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Ty...
stackexchange/codereview
I am using Eclipse 3.2.0 on Red Hat Enterprise Linux Server release 5.2 Beta (Tikanga) and am trying to create a project using an Ant build file and properties file. When I load the build file the only properties that are loaded are the ${build.dir}, ${bin.dir}, and ${dist.dir}. All the other properties in the proper...
stackexchange/codereview
I think most of the time, if not always, we can avoid null pointer exceptions by checking if an object is null before sending it a message. When is it sensible then to catch NullPointerException instead of checking for null pointers?
stackexchange/codereview
def mergeDict(object): dict1 = {} for i in range(len(object)): dict1.update({'id': object[i].id, 'name': object[i].name, 'age': object[i].age, 'location': object[i].location}) return dict1 merged_dict = mergeDict(details_sorted) But this doesn't work. I want to get something like this: {1: {'id...
stackexchange/codereview
For a custom requirement to display dynamically generated records with client-side paging, I'm using Microsoft's jQuery Templates plugin alongwith G Birke's jQuery Pagination plugin. I could have managed with just the Pagination plugin but now definitely need the Template plugin to conserve on server side processing in...
stackexchange/codereview
I have looked at the intent-filter documentation and I can't figure out this specific intent-filter. I'm looking to use ACTION_SEND because I only want the app to show up in "Share" menus in other apps. I only want to show up in the share menu if the text of the intent is a url. For example, what is shared from the A...
stackexchange/codereview
I can bind to properties in the ViewModel fairly simply like so: <%=Html.RadioButtonFor(m => m.isCool, true%>cool<br/> <%=Html.RadioButtonFor(m => m.isCool, false)%>not cool<br/> but what if I wanted to bind to collection items within the ViewModel. I'm not sure if it's possible. Here's what I have: My ViewModel: nam...
stackexchange/codereview
Using PHP is it possible to take an existing image and produce a copy where the original image changes from 100% opaque to 0% opaque (or 0% transparent to 100% transparent!)? Thanks, Toby EDIT: I realise my question was unclear, apologies. I want to take an image and create an opacity gradient across it, so the image i...
stackexchange/codereview
I use my Android app's application Context as a storage area for "current state" information for my app. I'm finding that in the field, there are cases when this information goes away on some people's devices causing various NullPointerExceptions since I expect the data to be there when the app resumes and starts rebui...
stackexchange/codereview
Consider we have the following situation: a program named program which depends dynamically on libfoo.so libfoo.so that depends on nothing (well, it depends on libstdc++ and stuff but I guess we can omit that) program runs perfectly. Suddenly, libfoo codes changes, and some function now uses internally func_bar() a f...
stackexchange/codereview
I'm using google-oauth-java and one thing that really complicates my life is that when I attempt using OAuthClient.invoke() I frequently get OAuthProblemException thrown due to request returning code 302 instead of 200. Because of that I found myself rewriting invoke code and usingOAuthClient.access() instead. I'm wond...
stackexchange/codereview
I saw some other questions related to this, but they were not MySQL. The database is a live database, so I don't want to delete and recreate the table. I simply want to make a column no longer unique, which is less permissive in nature so it shouldn't cause any problems.
stackexchange/codereview
I'm looking to consume SOAP services -- read only -- from a third party web service. I know Flex has strong SOAP functionality. I am wondering, however, if there is any benefit to using e.g. Ruby or PHP to consume those 3rd party services and then passing the results to Flex, versus doing it all in Flex. Other than dec...
stackexchange/codereview
I have a couple labels I am using as a HUD for the player during a game. I am updating these labels frequently, so that the player has up-to-date information. The problem is is that I've been using uiLabel.text = [NSString stringWithFormat:@"%3.0f", value]; to pass the new value that the label should have. I have noti...
stackexchange/codereview
I am a little confused by the object model of Python. I have two classes, one inherits from the other. class Node(): def __init__(identifier): self.identifier = identifier class Atom(Node): def __init__(symbol) self.symbol = symbol What I am trying to do is not to override the __init__() method, but to cr...
stackexchange/codereview
I answered the question about std::vector of objects and const-correctness, and received a comment about undefined behavior. I do not agree and therefore I have a question. Consider the class with const member: class A { public: const int c; // must not be modified! A(int c) : c(c) {} A(const A& copy) :...
stackexchange/codereview
the suggested method of estimating the time is using the clock() function and then dividing the count of cpu cycles by cycles/second. My problem is that the program i am trying to run takes a lot of time (in hours). This means the clock() function (that returns a long int) returns a garbage value (because max long int ...
stackexchange/codereview
my app alerts like ( "already exists. Do you want to replace it?") appears in English. My computer is configured in Spanish. Why? There is any way to resolve it? thanks
stackexchange/codereview
I been really enjoying playing with OpenGl and have followed some examples etc My issue is texturing a cube. Most side texture fine (front, back, left) but right is a massed up mess. My cube // cube static const GLfloat cubeVertices[] = { -5.0f, 15.0f, 5.0f, 5.0f, 15.0f, 5.0f, 5.0f,0.0f, 5.0f, -5....
stackexchange/codereview
I've converted a gnome python script to use KDE notifications every time Spotify changes track. The code is below: #!/usr/bin/env python # -*- coding: utf-8 -*- """ Title: Spotify Notification Demo Author: Stuart Colville, http://muffinresearch.co.uk Modified to work with KDE: Steve Nixon License: BSD """ import dbu...
stackexchange/codereview
Ok, so. I've got a war deployed with an MBean exposed through spring's MBeanExporter and annotations. I have another war app deployed which is using some code to talk to the mbean. I'm having an issue calling the function on the mbean from that client code. RuntimeException occurred in RequiredModelMBean while tryin...
stackexchange/codereview
i have an ms chart control on the form and i would like to print the chart. what is the best way to do this?
stackexchange/codereview
I have a number (123456) converted to a hash key and stored in SharedPrefs using: String correctMd5 = passwdfile.getString(PhoneFinder.PASSWORD_PREF_KEY, null); I then retreive the number from a string: String[] tokens = msg.getMessageBody().split(":"); String md5hash = PhoneFinder.getMd5Hash(tokens[1]); and compare ...
stackexchange/codereview
I current have the following menu structure defined within a masterpage: <asp:ContentPlaceHolder ID="SubNavigation" runat="server"> <ul> <li><%= RenderLink("item 1", "/item1/", null, null) %></li> <li><%= RenderLink("item 2", "/item2/blah/", null, "nofollow")%></li> <li><%= RenderLink("item 3", "/item3/...
stackexchange/codereview
I have been playing with CouchDB and CouchApp for a little while now. I am planning on using it for a new web site project I'm working on. From a scalability viewpoint I love the idea of CouchApp. The downside is that with no server side code there are some things (like oAuth authentication) that are hard to do on the...
stackexchange/codereview
Ok so I am trying to get the same zoom in/location update feature that the iPhone Maps application has when you tap on the current location button. I am using code I found from here and here(code from the post by Brad Smith) to do most of the work. So all I really need to do is center the map around the updated current...
stackexchange/codereview
The type looks like this: class Category { public string Name; public string Message; public ObservableCollection<Category> SubCategories; } where it will have say 5 categories, where each category contains subcategories between 0 (none) to say 3. I know how to bind non-hierarchical data to a WPF TreeView...
stackexchange/codereview
I'm trying to test a Bash script which copies files individually and does some stuff to each file. It is meant to be resumable, so I'd like to make sure to test this properly. What is an elegant solution to kill or otherwise abort the script which does the copying from the test script, making sure it does not have time...
stackexchange/codereview
Lets say I have a solution with 4 projects: Namespace.Contracts - contains IContract interface Namespace.Plugin.A - contains class A - IContract implementation. Class A is exported using MEF Namespace.App - application that imports IContract classes from different locations including Plugin.A's assembly I receive "Un...
stackexchange/codereview
Anyone knows how to add a button to the titlebar of a CDockablePane ? I tried the usual way with CDialog but it does not work for CDockablePane... Thanks
stackexchange/codereview
I need a simple component to do image crop, to use inside an option where user must select an image, photo, or logo to represent them. I already done some search with Google but found nothing good. I would something with source code.
stackexchange/codereview
I have an application that handles WM_DEVICECHANGE, and is interested in DBT_DEVICEARRIVAL. When a new device is inserted, it needs to know if the AutoPlay dialog will pop-up. In order to find out, I am checking the values of NoDriveAutoRun and NoDriveTypeAutoRun in SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Ex...
stackexchange/codereview
There is a pdf version of assembly language instructions reference from intel, but as you know, an online version would be more convenient as my browser is always open, within one click I get the information I want. Does anyone know if there is an online version of assembly instruction manual?
stackexchange/codereview
Im using prepared statements to descramble BBcode but for some reason it puts \ before ' when posting. I dont know what causes it, but Im sure it happens when i change the BBcode to html to be put in the database, the code looks like this: $text = $membership->remove_HTML($text); //convert line breaks to <br /> t...
stackexchange/codereview
I just downloaded the MVC 3.0 RC and I'm excited to start using it, especially the Razor view engine. However, due to a few stick in the mud type people here, we are stuck using VB.NET instead of C#. When I started trying it out, I noticed some quirks. If you are creating a Razor view using CSHTML, you can write code l...
stackexchange/codereview
If the following code: String s = "a" + 1 + "b";// 1. Is implemented using using StringBuilder equivalent to String s = new StringBuilder().append("a").append(1).append("b"); then will extra objects "a" and "b" be created in 1 and why?
stackexchange/codereview
Currently, I am accessing the property by creating a static method like the one below. public static class CartCollection : List<Cart> { public static void Add(Cart Cart) { Add(Cart); } } All I am trying to achieve is to have access to all the properties of List<>. Outside of the class, I'd like to...
stackexchange/codereview
I have the following models class Order < AR::Base has_many :products accepts_nested_attributes_for :products end class Product < AR::Base belongs_to :order has_and_belongs_to_many :stores accepts_nested_attributes_for :stores end class Store < AR::Base has_and_belongs_to_many :products end Now I have ...
stackexchange/codereview
i used file control in a html page i want to remove the file location from control when user click on reset button. $("#control").val(""); if i run this code he not work in Chrome but in Firefox what i do to unselect the file who is not selected in file upload control. how i can reset the controls without reset the wh...
stackexchange/codereview