instruction_seed stringlengths 1 35.8k | _source stringclasses 1
value |
|---|---|
You know that game, where you and an opponent take turns choosing numbers, and the last person to take their turn before the cumulative total passes a preset value, is the winner? What's the formal name of that game? I know it's a solved game in that there's an algorithm to generate the winning moves, but, given that g... | stackexchange/codereview |
I'm running a prototype script (lightbox) and I want to add an extra link below each image with the url to a page that changes with each image.
I have so far managed to add the a element to the right place, but later in the script I need to update the href of the link based on the image that is loaded.
There's a point ... | stackexchange/codereview |
All,
I have a Hudson running fine, but I wanted to get exact similar setup in another test machine so I tried following steps:
Copied hudson_home from my current server to test server (Environment is identical to my current machine), with all jobs. Plugins and builds as well.
I restarted the Hudson and Tomcat but and ... | stackexchange/codereview |
Is there any way to diable the caching of a single javascript file in my ASP.NET applicaiton without disabling the caching of any other files in the application?
It is running on IIS 7 in Azure, so to me it seems that my only options of controlling this are within the webserver tags.
I currently use the folowwing confi... | stackexchange/codereview |
As far as I can tell, any static member of a class like String or Int32 can also be accessed from the related primitive data type. So, String.Format is the same as string.Format, and Int32.MaxValue is the same as int.MaxValue.
Is there a difference between these two forms? Is one preferred to the other? Even if they ar... | stackexchange/codereview |
I have installed and trying to customize Jquery File Tree so that, on click of folder name, the folder name and path are returned to the calling function. Currently it only expands and collapses folders, and returns the file name on click of file.
So I need to return the folder too and cannot see where that is trigger... | stackexchange/codereview |
Scala is an awesome language, but unfortunately the library documentation is lacking. How do I change the initial size of a component? I have nothing on it (intentionally), but would like it to be a certain size anyway. I currently have
...
contents = new BoxPanel(Orientation.Vertical) {
contents += new BoxPanel(Or... | stackexchange/codereview |
i use the jquery ui slider and all is fine except that the function i defined in the change parameter fired only when i release the mouse over the handles. Is there a way to call the function when the mouse is released outside the slider?
thanks for helping.
| stackexchange/codereview |
Hi all i need to create a form to upload two files to a specified folder that is created by the selection of a select and an input on the same page.
So the form must have:
input type="text"
select
upload image on the folder "select_value/input_value/random_name_image.jpg"
upload file on the folder "select_value/input_v... | stackexchange/codereview |
This is the error I am getting:
Traceback (most recent call last):
File "E:\stuff\module.py", line 91, in <module>
f = open('E:/stuff/log.txt')
IOError: [Errno 2] No such file or directory: 'E:/stuff/log.txt'
And this is my code:
f = open('E:/stuff/log.txt')
The E:/stuff/log.txt file exists. I can navigate in W... | stackexchange/codereview |
We need to build quite a complicated form, which will allow creation / updating of multiple instances of entity A, where entity A can have multiple instances of entity B.
Both types of entities are quite complicated (lots of fields and dropdowns) but only a few of these fields need filling in on creation. The requireme... | stackexchange/codereview |
Good day all,
A series of differently sized images are each individually wrapped in left floating differently sized divs on a horizontally scrolling web page. I want to be able to tap on a div to scale it to fullscreen, (by adding a css class containing the scale instruction, with toggleClass), and tap on the image (wh... | stackexchange/codereview |
I'm developing an app (VisualStudio 2010 Express for Windows Phone).
I have a listbox with images and a storyboard with an animation (a projection) that I want to apply to a specific listboxitem/image when the SelectionChanged event gets fired (well not immediatly but inside the event handler).
How can I "link" my anim... | stackexchange/codereview |
I have a site with elements of the form:
<td id="subject_23432423">content I want to read</td>
How do I use Selenium RC (with the Python bindings specifically) to read the content from all these elements? I've gone through all the commands, and while there's a lot of options to find a single element, none of the comma... | stackexchange/codereview |
I've been thinking about this and have read through another stackoverflow question regarding the best recommended way to communicate between view controllers. However, the question/answer for that doesn't seem to address the best approach for the reverse behavior.
i.e. to pass data from ParentController to its ModalCon... | stackexchange/codereview |
Here's a sample table:
name | picture
John S. | http://servera.host.com/johns.png
Linda B. | http://servera.host.com/lindab.png
...
Let's say there are several hundred more records.
Let's also say we moved servers from "servera" to "serverb".
Would it be possible to go into this table with one query ... | stackexchange/codereview |
I am looking for a way to detect if a SQL Server fails to respond (timeout/exceptions etc) so that if our C#/.net program trying to access the server asks a server that is down for maintenance, it will jump and try another automatically.
I would like a solution where we do the SQL connection and THEN get the timeout. W... | stackexchange/codereview |
Possible Duplicate:
SQL Identity (autonumber) is Incremented Even with a Transaction Rollback
does a rollback also rollback identity values???
| stackexchange/codereview |
Every so often when programmers are complaining about null errors/exceptions someone asks what we do without null.
I have some basic idea of the coolness of option types, but I don't have the knowledge or languages skill to best express it. What is a great explanation of the following written in a way approachable to t... | stackexchange/codereview |
Hiya, as part of an assessment I have to hand in a code which requires a few non-standard libraries. In order to save submitting the header files and the code I would like to form a 'makefile' with the code and required add-ons sort of 'bundled' together. I have absolutely no idea idea how to go about doing this thou... | stackexchange/codereview |
My code produces the following error:
java.sql.SQLException: Cannot absolute position to row 0
What does this error mean? How can I fix it?
| stackexchange/codereview |
I think this may be a "false positive", but I could be wrong. I have the following script and it's crashing on one line with a "too much recursion" error:
var Win, Doc;
var Content, Blackout;
$(function () {
Win = $(window);
Doc = $(document);
Content = $("#Content");
Blackout = $("#Blackout");
C... | stackexchange/codereview |
First consider this sample C++ code:
std::string input1, input2, input3;
std::cout << "Enter Input 1: ";
std::cin >> input1;
std::cout << std::endl << "Enter Input 2: ";
std::cin >> input2;
std::cout << std::endl << "Enter Input 3: ";
std::cin >> input3;
If for input1 I enter something like "Good day neighbors" then i... | stackexchange/codereview |
I use a BlockingCollection to implement a producer-consumer pattern in C# 4.0.
The BlockingCollection holds items which take up quite a lot memory. I would like to let the producer takes one item out of the BlockingCollection at a time, and process it.
I was thinking that by using foreach on BlockingCollection.GetCon... | stackexchange/codereview |
I am using the built-in solver in Excel 2003 within a VBA loop to solver a number of different problems. Occasionally, the solver hits the maximum time or iterations limit, which causes a pop-up dialog box to appear asking whether the user wants to Continue, Stop, or End. In all cases I want it to end, and proceed to t... | stackexchange/codereview |
i would like to know whether i can use the getbulk command with SNMPv1. If yes please let me know its adv... in no then what are the drawbacks.
Thanks in advance.
Uday.
| stackexchange/codereview |
I need to move all files from source folder to destination folder. How can I easily extract file name from file path name?
string newPath = "C:\\NewPath";
string[] filePaths = Directory.GetFiles(_configSection.ImportFilePath);
foreach (string filePath in filePaths)
{
// extract file name and add new path
File.Del... | stackexchange/codereview |
I've recently been using the MVVM light toolkit for Silverlight 4.
I really like the EventToCommand behaviour that is included, it makes life a lot easier. One thing I've been wondering about is if setting PassEventArgsToCommand="True" is bad practice as it will tie a particular RelayCommand to a particular event in t... | stackexchange/codereview |
With NHibernate closing on a 3.0 release, what's really changed and new in it?
Any good resources for looking up the changes?
| stackexchange/codereview |
I was told that my server refused to accept client network connections at a specific port could be due to the lack of file descriptors. I looked up what this is all about and read about it here: http://www.netadmintools.com/art295.html
So I tested my system and I got this:
cat /proc/sys/fs/file-nr
1088 0 331287
... | stackexchange/codereview |
I am trying to do something like:
this.reportViewer.LocalReport.DataSources.Clear();
DataTable dt = new DataTable();
dt = this.inputValuesTableAdapter.GetData();
Microsoft.Reporting.WinForms.ReportDataSource rprtDTSource = new Microsoft.Reporting.WinForms.ReportDataSource();
rprtDTSource = dt; // this line generat... | stackexchange/codereview |
I've rammed into a huge problem. I got to these two objects:
IList<Product> products; and
Collection collection;
Both objects contains and IList<Tag> named .Tags.
I'm trying to do the this with Linq To NHibernate:
products = products.Where(p => p.Tags.Any(t => collection.Tags.Contains(t)));
This will give an exception... | stackexchange/codereview |
For example, if each row in a list had a background that was a gradient, would it be better to use a image of a gradient or to define that gradient in a shape drawable in xml? Is there is significant performance difference between the two methods?
| stackexchange/codereview |
I am looking into the code behind Dictionary<TKey, TValue>. What is interesting is in the private Insert method, there is a bucket that appears to be holding empty slots in a pre-sized array. Inside the Insert method, the code checks to see if the bucket has any elements left and will resize if necessary. The number of... | stackexchange/codereview |
I am writing a Java application, and I have four radio buttons, call them rb1, rb2, rb3, and rb4. I've added two of them to one radiobutton group, and the other two to a second radio buttongroup. Then I added all four of them to a panel. Distinct action listeners are defined for all four buttons.
However, when I clic... | stackexchange/codereview |
For my algorithm analysis course, I've derived from an algorithm the function f(n) = n^2 - n + 2. Now I need to prove or disprove f(n) ∈ O(n). Obviously it's not, so I've been trying to disprove that for a few hours and can't figure out how to do it.
To disprove it, I need to prove the negative:
∀M > 0, ∀N > 0, ∃n > N ... | stackexchange/codereview |
How can I get the browser window's left edge (including menu, border, caption, etc), without it being "fixed" to take into account the zoom level? (This question addresses the basic question, but does not consider zoom.).
window.screenLeft or window.screenX work fine on Chrome and Safari, but these report "fixed" valu... | stackexchange/codereview |
I have four tabs that hold four listviews, I want to set a background for each list view but whenever I try to add the background it puts the image in each cell of the listview instead of behind the list.
<?xml version="1.0" encoding="utf-8"?>
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
andr... | stackexchange/codereview |
How can I do dynamic pattern matching in Erlang?
Supose I have the function filter/2 :
filter(Pattern, Array)
where Pattern is a string with the pattern I want to match (e.g "{book, _ }" or "{ebook, _ }") typed by an user and Array is an array of heterogenous elements (e.g {dvd, "The Godfather" } , {book, "The Hitchhi... | stackexchange/codereview |
is there a way to find the the profile image of a user that's logged in using his/her google account (through OpenID).
I've checked stackoverflow and it seems they're using gravatar service to assign an avatar to the email address. but it should be possible to fetch the user google profile image directly from google. ... | stackexchange/codereview |
When I execute a routed command, let's say:
ApplicationCommands.Undo.Execute(null, this);
WPF does some magic to find the proper CommandBinding on which it executes the ExecutedRoutedEventHandler.
Is there a way to get a reference to the CommandBinding (or at least to the handler) that would be executed?
It would so... | stackexchange/codereview |
I'm trying to enabled editing for a number of columns in my DataGridView. Now, before anyone suggestions I should read the MSDN article: How to: Specify the Edit Mode for the Windows Forms DataGridView Control, I already have.
In summary (and I quote):
The underlying data source supports editing.
The DataGridView cont... | stackexchange/codereview |
How can you make the value in the password field visible? So, when typing your password in the field, it will not show the black dots, but the actual value that you are typing.
Thanks!
edit: Ok, so then a better question might be: How can I force the browser to remember the value in this 'password' field and treat it a... | stackexchange/codereview |
I am getting the HTML content of the page using the URL. once i got the HTML i m striping all the images using Xpath. I m stuck at how to fetch the video content. If i try checking for embed code ,it gives me all the adds inside the page. Please suggest me a workaround. Thanks in advance.
| stackexchange/codereview |
I have tested on stl vector with code below:
struct structA{
char charArray[256];
}
structA a;
..assign 256 characters to a.charArray
vector<structA> v1;
v1.reserve(1000);
for(int i=0; i<1000; i++){
v1.push_back(a);
}
I realized that for every 16 push_back, there is a spike in the v1.push_back. I suspect that... | stackexchange/codereview |
I have a program which needs to download multiple files at once. I can download a single file by using this single file download, but it doesn't work for multiple.
How can one download multiple files at once in such as as zip file?
| stackexchange/codereview |
I have implemented Elmah in one of my ASP.NET MVC projects. In addition I did the following:
I implemented the ElmahHandleErrorAttribute written by Atif Aziz in this post
I added the attribute to all my controllers
I have setup Elmah to filter out 404 errors since I do not want to log those
I added an Error.aspx view ... | stackexchange/codereview |
In Emacs, I often find myself in a situation where I need to jump back and forth between various source files to various terminals. However, I feel like I do not have a good way to do this efficiently and it's clumsy that you can only open one shell in Emacs (shell, eshell, or term).
Moreover, I need an efficient way o... | stackexchange/codereview |
I need to closely monitor the scale of the scroll view so that I can update the content view's elements (a subview managing multiple CALayers) according to the scroll view's animated zoom.
On iOS 3.1, everything works as expected, I use zoomToRect:animated: and the scrollViewDidScroll: message of the UIScrollViewDelega... | stackexchange/codereview |
Let's say I have a class with a object field. When Dispose() is called I would like to clear the reference to that object. The private field can only be set once, so ideally I would like it to be readonly, but if it is readonly there is a compile time error when I try to release the reference to the object during Dispo... | stackexchange/codereview |
I wrote a simple program to grab stock prices from yahoo finance. The loop that reads the data was truncating early (and ending about where the data from the website shows as opposed to the full download to the correct date for the excell file). So I put in a cout command in the loop to try to debug and voila, it ... | stackexchange/codereview |
Greeting,
What is the best practice to read all attributes from a child elements by ID attributes using C# in xml file listed down.
Thank you,
<?xml version="1.0" encoding="utf-8"?>
<WinDLN>
<Program ID="1" Name="CIS562" StartDate="9/8/2010 5:50:00 PM" EndDate="9/8/2010 9:15:00 PM" />
<Program ID="2" Name="CIS5... | stackexchange/codereview |
Possible Duplicate:
Using an ORM or plain SQL?
Would you elect to use an ORM or some kind of home spun DAL? And why?
The advantages of an ORM seem obvious - better structure / organization, better language fit etc. But I worry about performance issues. Anyone have war stories to share? Any insights on not so obvious... | stackexchange/codereview |
I have a page that constantly refreshes itself, I want to include the page into my main page.
I am using an iframe to include the page to my main page, but every time the page in the iframe refreshes, it also refreshes my main page. How can I make the iframe refresh within its own frame and not affect my main page?
Or ... | stackexchange/codereview |
Sorry if I missed something and this is a silly question...but can I enter arbitrary javascript in the developer tools console (like I can with firebug)? It seems that I can interact with the DOM, console.log, etc., but I'm wondering if there's a way to enter code in to try things out like one would do with an interpre... | stackexchange/codereview |
I have a function that can play set frequencies. The function's inputs are frequency and duration. How can I analyze a sound file so that I have the output frequency for every milisecond of audio.
e.g.:
MS, Frequency
1, 400
2, 401
3, 402
etc.
If there is Mac based software that can do this, I'd be fine with preprocessi... | stackexchange/codereview |
This error appears when executing the code below:
Fatal error: Uncaught exception 'PDOException' with message
'SQLSTATE[42000]: Syntax error or access violation: 1065 Query was empty'
in /home/content/63/6563663/html/inventory/pg.php:20
Stack trace:
#0 /home/content/63/6563663/html/inventory/pg.php(20): PDOStatem... | stackexchange/codereview |
I am trying to parse out an apache-like config file using Objective-c. Where is the best place to start? I haven't done a lot of file read/write on this platform.
Thanks!
| stackexchange/codereview |
I'm using Android's Browser Bookmark ContentProvider to create a new bookmark programatically. The bookmark is created (I can retrieve it programatically via the ContentProvider) but the bookmark isn't visible in the browser bookmark view. Thoughts?
// Saving the bookmark via ContentProvider
final ContentValues bookma... | stackexchange/codereview |
I am new to Ruby. A simple example, what I need:
class Animal
abstract eat()
class Cat < Animal
eat():
implementation
class Dog < Animal
eat():
implementation
In other words, the eat() method should be required for all the classes which extend Animal.
In JAVA I would just use an abstract class, bu... | stackexchange/codereview |
I defined two CSS classes that set the background to an image (shown below). One is a yellow block, and another is a grey block.
.block-gray { background: url('grey.gif'); width: 15px; height: 3px; }
.block-yellow { background: url('yellow.gif'); width: 15px; height: 3px; }
What I want to be able to do is to de... | stackexchange/codereview |
I think I understand it as, if it is Rails 2.x
config.gem 'gem_name' # in config/environment.rb, and then rake gems:install
and in Rails 3.x
gem 'gem_name' # in Gemfile, and then bundle install
these are the two standard ways to add a gem into a Rails project.
Is there a standard way to add a plugin? It s... | stackexchange/codereview |
I have need to position div with id="center_dv" on center of the div with id="wrapper_dv" and to div wrapper_dv be on center of body. How can I do it ?
<body>
<div id="wrapper_dv">
<div id="center_dv">
<p>some text</p>
</div>
</div>
</body>
| stackexchange/codereview |
I have an asp.net 4.0 web application.
I need extensive configuration data for this web application, that is strongly typed and the structure of this configuration data is going to be fairly complex (cannot do with key-value pairs). In the past I remember having done this in .Net 2.0 but cannot figure out how I will d... | stackexchange/codereview |
This is my setup
class EditorTabViewModel : TabViewModel {
...
public bool CanSave { get; set; };
}
ObservableCollection<TabViewModel> _tabs
I want to check if there are any tabs in _tabs that are EditorTabViewModel that has property CanSave set to true
i did something like ...
var tabs = from t in _tabs
... | stackexchange/codereview |
I'd like to know how to access the data stored in the SQL server tables from Windows Mobile to PC.
for e.g. I can add many data to the application and when I connect to the PC, I'd like to access it.
We can use SQL Server Sync for synchronizing the data and using web services, it's possible to access the data but this... | stackexchange/codereview |
I have 3 list control on one dialog box but only one is showing focus.
if i clicked on 2nd list control then focus disaappear from 1st one.
Means at a time only one list showing focus.
How to make focus remain on all list control on same dialog box?
| stackexchange/codereview |
I am using the Entity Framework for the first time and want to know if the following is possible - I have generated my classes from the DB, and have one called Category.
Obviously it has all my fields in the table (ID, CategoryName, SortOrder etc..) but I want to know if I can add a custom property which is not in the ... | stackexchange/codereview |
mWhile attempting to make a backup copy of a file in C, I find that extra characters are sometimes generated by the algorithm below. I've also tried declaring the readBuffer within the while loop, but that did not solve the problem. Here's an example of the issue.
Original File Contents
Hello there.
My name is Alice. ... | stackexchange/codereview |
I would like to write a function that has a loop in it which preforms the operations necessary for Euler's method. Below it my poor attempt.
In[15]:= Euler[icx_,icy_,h_,b_,diffeq_] :=
curx;
cury;
n=0;
curx = icx;
cury = icy;
While
[curx != b,
Print["" + n + " | " + curx + cury];
n++;
dq = StringReplace... | stackexchange/codereview |
I'm currently using a UIAlertView at startup in my app with the UIAlertViewDelegate. It all works fine. The only problem is, I get the warning "type 'id ' does not conform to the 'UIAlertViewDelegate' protocol" every time I reference the App Delegate, giving me about 32 warnings.
Can anyone shed some light on why I'm g... | stackexchange/codereview |
Could anyone point me in the direction of an idiots guide to integrating Game Center into an iPhone app ? Please do not refer me to any Apple documentation as it's about as useful as a pork chop at a barmitzvah.
Thanks,
Martin
| stackexchange/codereview |
I'm having an issue in my Java application where the JIT breaks the code. If I disable the JIT, everything works fine, but runs 10-20x slower.
Is there any way to disable the JIT for a specific method or class?
Edit:
I'm using Ubuntu 10.10, getting the same results both with:
OpenJDK Runtime Environment (IcedTea6 1.9)... | stackexchange/codereview |
Does NSFileHandle create the sockets for me? Or must I create them myself and then setup an NSFileHandle to use that socket?
| stackexchange/codereview |
I'm hitting a wall over and over again, trying to solve a problem I've got in xcode. I'm a newbie and started coding just a while ago.
I'm trying to make a XML parser based on this tutorial: http://cocoadevblog.com/iphone-tutorial-creating-a-rss-feed-reader
which works fine separately, but when I'm implementing it into... | stackexchange/codereview |
<table width=100%>
<tr>
<td id="show1" class="centerNoBorder"> <input type="button" name="upd_rate" value="Update Rate" onclick="showEdit(1)"></td>
<td id="show2" style="display:none" class="centerNoBorder"> <input type="button" name="upd_rate" value="Save" onclick=" updateRate(); showEdit(2)"></... | stackexchange/codereview |
I want to use SQLite update query to update the database in iPhone.
Could anyone provide me with the code how to do that?
| stackexchange/codereview |
I'v looked at pyserial but I can't seem to figure out how to do it. I only need to send one at a time? Please help?
| stackexchange/codereview |
I'm new to android programming, and I was wondering if there was an event or something for any virtual keyboard input. I was also wondering if there is an event for when you try to send a text message, or maybe a way to send a text message. I want to use 2.2. thanks.
After doing some reading it looks like this isn't po... | stackexchange/codereview |
I'm trying to write a query that brings back patients who have had an office visit at least a year before the most recent one. The various ways I'm thinking of get all twisted up in my head, so I was wondering if anyone out there can see an obvious way to write it that I'm missing. Don't worry too much about the exact ... | stackexchange/codereview |
i hope you can help me with this one. The code is supposed to display mysql data using a php script returning XML (the backend script works fine delivering good XML - checked with my previous question on Stack Overflow).
I'm using jQuery 1.4.2 to do a .get AJAX call - and i just can't get Internet Explorer to display ... | stackexchange/codereview |
I have been looking into how interceptors can be applied to session beans etc in EJB3.0. Can these be applied to servlets as well?
| stackexchange/codereview |
in Silverlight 3 for Mobile, how do I get at a Path's figure points, so I can ultimately get at it's Points (X, Y coordinates)? From what I've been reading, it sounds like the tree structures of the PathGeometry isn't stored in Silverlight 3 for Mobile (I'm doing this for WP7)... Is there another way around this? All ... | stackexchange/codereview |
In my rails application I letting users download files
def download
options = { :filename => @file_name, :type => 'application/zip', :disposition => 'attachment' }
send_file(@path, options)
end
This works and user sees an Open or Save File dialog. However user is never given a chance to specify neither file name n... | stackexchange/codereview |
Having trouble getting my form to UPDATE records in my database even after searching the web and viewing the other answers on stack-overflow.
Here is my current NON functioning code:
if ((isset($_POST["MM_update"])) && ($_POST["MM_update"] == "form1")) {
session_start();
$tablename = $_SESSION['MM_Username'];
$amount=... | stackexchange/codereview |
The First Dictionary is like
Dictionary<String, String> ParentDict = new Dictionary<String, String>();
ParentDict.Add("A_1", "1");
ParentDict.Add("A_2", "2");
ParentDict.Add("B_1", "3");
ParentDict.Add("B_2", "4");
ParentDict.Add("C_1", "5");
i need to convert this into... | stackexchange/codereview |
I have a list of tags:
>>> tags_list
['tag1', 'second tag', 'third longer tag']
How can I replace whitespaces within each element of the list with "+" ? I was trying to do this with regular expressions but each string remains unchanged:
for tag in tags_list:
re.sub("\s+" , " ", tag)
What is wrong with my approach... | stackexchange/codereview |
What's the difference between a "stream-type" socket and a "datagram" socket type?
| stackexchange/codereview |
I'm thinking it may be beneficial to sprinkle some debug logging throughout my app (a painting-type program), and to have this info written to a file. My current debugging strategy is to hook up a custom exception listener (sys.excepthook) and to allow the user to e-mail me a copy of the stack trace that caused the cra... | stackexchange/codereview |
I am working on a site and the header element is completely disappearing in only IE7 (it shows in IE6 and IE8). It shows for a second, then once the whole page is loaded, it disappears. I have no idea what could be causing this. The portion disappearing is the section I have included via PHP, but it still doesn't show ... | stackexchange/codereview |
I am creating a simple web management studio using SMO. Is it secure enough to persist/store user information (login and password for database) using ASP.NET mechanism (e.g. formsauthentication, cookies, etc.).
What will be the best practice to do this?
thanks
| stackexchange/codereview |
I developed an application in portrait mode in Android.
What changes do I have to do, that my application will be also fit for landscape orientation?
Thanks in advance.
| stackexchange/codereview |
Say I got an Employee class that has a hire date data member. This member only get set one time only and it is constant too. So it'll get initialised when the object is created.
If I want the class to have a method that returns the hire date, what's better:
getHireDate();
Or just:
hireDate();
Am I thinking too much :... | stackexchange/codereview |
I am using a multi-dimensional SVM classifier (SVM.NET, a wrapper for libSVM) to classify a set of features.
Given an SVM model, is it possible to incorporate new training data without having to recalculate on all previous data? I guess another way of putting it would be: is an SVM mutable?
| stackexchange/codereview |
I believe this is a bug in Rails 3. I am hoping someone here can steer me in the correct direction. The code posted below, is purely for illustration of this problem. Hopefully this does not confuse the issue.
Given I have a Post model, and a Comment model. Post has_many Comments, and Comment belongs_to Post.
With a de... | stackexchange/codereview |
I have a string like this being returned from my backend:
"1,2,3,4,5,6"
I have a large array locally and want to display only those items not in this list, so I was thinking of exploding this string into an array but how can I search efficiently? As far as I know there are no hashmaps in JS so how does one do this? I ... | stackexchange/codereview |
I have all my site images setup to serve from Amazon's Cloudfront CDN. If my pages will sometimes be served as both HTTP and HTTPS, then should I make all image paths HTTPS to the CDN?
Is this a poor practice?
Any other ideas?
| stackexchange/codereview |
I have developed a script that receives json data from a php script using $.getJSON. The JSON data looks like '[{"options":"smart_exp"},{"options":"user_intf"},{"options":"blahblah"}] '
<html>
<head>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script t... | stackexchange/codereview |
I'm trying to expand a div to fit text without having to specify an exact hegiht. I tried using something like.
$('#div').addClass('myclass');
With myclass having a height:auto; but that won't work. I don't know how to get it to expand the div accordingly from an ajax call that returns text.
This is the main css class... | stackexchange/codereview |
ATM I do it this way which is far slow and incorrect:
for i in `find -type f`; do
echo $i`LANG=C hg log -v $i | grep user | tail -1 | awk '{print " "; print $2}'`;
done
When someone has moved a file to a new name, yes he is the creator of that new file, but not of the code which he moved. I could extract the revisio... | stackexchange/codereview |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.