instruction_seed stringlengths 1 35.8k | _source stringclasses 1
value |
|---|---|
I am trying to create an effect similar to Sin City or other movies where they remove all colors except one from an image.
I have an RGB image which I want to convert to grayscale but I want to keep one color.
This is my picture:
I want to keep the red color. The rest should be grayscale.
This is what my code outputs ... | stackexchange/codereview |
In my C program, after I call a function, all the variables in the outer function are disappearing. The program no longer recognizes that they exist, and trying to access them causes an error.
void outer_function()
{
int x = 0;
inner_function();
printf("%d\n", x); // Throws an error because x does not exist
}
I'... | stackexchange/codereview |
How can i make a "Mark all" link that, marks all checkboxes there is inside a td:
<td style="padding-right:4px;padding:4px;" class="alternating">
<input name="cbPick" type="checkbox" value="88156144" />
</td>
Don't know what language you write this in.. JavaScript?
| stackexchange/codereview |
I've looked at this link and I've tried all the suggestions there, but my Asp.Net AJAX Autocomplete still isn't working.
I have a test project with only a label, text box an the auto-completer:
<asp:ToolkitScriptManager ID="ScriptManager" runat="server">
</asp:ToolkitScriptManager>
<asp:Label ID="FieldLabel" Text="Lab... | stackexchange/codereview |
I have a table like this:
Lists:
id, type, date
Is there a way just in MySQL to return a count on the most recent (order by date desc) where type = '1', but limit by 3?
So the question is, are the last 3 items of value type '1'?
| stackexchange/codereview |
I have Upgrade my report file Crystal Report 8.5 to ver.-9.00. Report files are intragated with vb6(No external .rpt file). From many reports i upgrade 18 report file. When i run the project 18 times reminder me For "Crystal Decision Registration Wizard".Till i don not close project Every thing OK. If i close the pro... | stackexchange/codereview |
I am trying to accomplish this same graph: http://raphaeljs.com/analytics.html but the thing is I will be needing multiple graphs on the same page and this won't allow me to do so, could anyone help me out? I've been messing around with the code inside the demo but haven't been able to successfully allow me to show mul... | stackexchange/codereview |
I have a query that retrieves the name of each friend a user has by joining that of friends and users tables. I have another table that stores active users. I need to retrieve friends that are active and not active but for some reason I am drawing a blank. If I have a list of all friends and a list of active friends, c... | stackexchange/codereview |
Hi
I am trying to delay the screen navigation. After loading MainPage screen, I want to navigate to MainMenu screen after 3 seconds. I have written the following code for that.
public MainPage()
{
InitializeComponent();
this.Loaded += new RoutedEventHandler(Default_Loaded);
}
priva... | stackexchange/codereview |
How to implement caching in WCF services?
| stackexchange/codereview |
first:
10-26 17:43:07.454: WARN/dalvikvm(6371): threadid=3: unable to interrupt threadid=19
10-26 17:43:07.487: DEBUG/dalvikvm(6371): GC freed 279 objects / 259776 bytes in 208ms
10-26 17:43:07.487: WARN/WindowManager(2215): Attempted to add application window with unknown token HistoryRecord{46366130 spexco.hus.cepviz... | stackexchange/codereview |
Here's my situation: I have a MySQL database in which I'd like to use triggers to automatically manage the updating of date creation and date modified fields in a few of my tables. Later, I'd like to expand them into logging data changes, but that's neither here nor there at the moment.
The triggers work fine and upd... | stackexchange/codereview |
I am relatively new to using Boost MPI. I have got the libraries installed, the code compiles, but I am getting a very odd error - some integer data received by the slave nodes is not what was sent by the master. What is going on?
I am using boost version 1.42.0, compiling the code using mpic++ (which wraps g++ on one ... | stackexchange/codereview |
This question is tangentially related to How can I create JUnit stub methods in eclipse? but it doesn't answer my specific question.
Assuming you have an existing JUnit test case class, if you add a method to the target class (or choose to test a previously untested method), is there a way to tell Eclipse to generate t... | stackexchange/codereview |
How can I easily take a screenshot of an X11 screen in C++ with ImageMagick++, similar to the "import" command?
| stackexchange/codereview |
This may not be for this forum, but...
We write new system and people are used to older system where components are called "modules". So they talk about the accounting module and the auditing module, etc...
This feels very old, like cobol/mainframe talk. What would be better term for functional components in a modern-d... | stackexchange/codereview |
I am trying to find the id's of jobs that end in error.
When I use
for i in *log
do tail -n 1 $i | grep error
echo $i
done
It seems to find error on the last line of each file, even for files that don't have errors on the last line, and returns all of the filenames with
STOP fatal_error
out1.log
STOP fatal_error
out2.... | stackexchange/codereview |
I am a seasoned ASP.NET developer but a novice Android developer who is just getting started.
The first page in my new app is a login page. I would like to pass a username and password to my web service authentication method from my android app. I would like to employ JSON since, from what I've read, would be the m... | stackexchange/codereview |
I've been told that I need to use the registerDefaults: to load the NSUserDefaults if the user has never changed the app settings.
In my AppDelegate I am using the following code:
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
// Override point fo... | stackexchange/codereview |
I found this code on the internet but I don't know how to display this code on the access 2010 form.
Can anyone help me with this?
Dim strPin As String
Dim i As Integer
strPin = "JobNr"
'Set seed
Call Randomize
For i = 1 To 4
strPin = strPin & Int(10 * Rnd)
Next
Question edit:
I have this, pls don't look ... | stackexchange/codereview |
I am thinking of using solr to index the log files generated by applications and allow the support staff to serach the log for trouble shooting. Any body ever did this kind of thing using solr?
| stackexchange/codereview |
What is the best flash video player to use for a mobile website? I'm using flowplayer for my desktop site, and need to find a way to get the same videos playing on mobile. Help!
| stackexchange/codereview |
I am trying to display tooltip for items in combobox. I tried this code in combobox selected index changed event but it does not work as expected.
ToolTip toolTip1 = new ToolTip();
toolTip1.AutoPopDelay = 5;
toolTip1.InitialDelay = 0;
toolTip1.ReshowDelay = 0;
toolTip1.ShowAlways = true;
for (int i = 0; i < cbo.Items.C... | stackexchange/codereview |
I have a project under git. One day I moved all project files from current directory to foo/bar/ under the project. I did it using git mv. Then I added some more files and did some changes to already existing files.
As a result, now when I look at the history of foo/bar/file.c, I can only see changes that I did after I... | stackexchange/codereview |
import java.io.*;
public class testing {
public static void main(String a[]) throws Exception{
Date d1=new Date();
Thread.sleep(2000);
Date d2=new Date();
if(d1.equals(d2)){
System.out.println("Both equal");
}else{
System.out.println("Both not equal")... | stackexchange/codereview |
I want a functionality in my iPhone application which will convert the image to its mirror like way.
Like if there is an image of man with his left hand up Then the converted image must have the same man with his right hand up.
Any code or link will be really appreciated
Thanks in advance for any help.
| stackexchange/codereview |
var test = new Boolean(0)
test.prop = "OK!"
Can you change the value of test to true?
but test.prop should still be "OK!"
in other words, test should be the same object
| stackexchange/codereview |
I know the answer to this, but i would like to confirm with you gurus out there :)
so, we have a client, and he said he has installed Reporting Service. However, I coudln't find any MSRS folder on his drive.
Usually, when a reporting service is installed properly, there should be a folder called MSRS$SOMETHING on the d... | stackexchange/codereview |
I get a "Duplicate Local Variable" error in JSP after build in RAD. I have same variable names inside scriptlet tags different logic:present / logic iterate tags.
Sample code.
<logic:present>
<%
int var1 = 5;
%>
</logic:present>
...................
<logic:present>
<%
int var1 = 5;
%>
</logic:present>
Since ... | stackexchange/codereview |
Browsing through the more dubious parts of the web, I happened to come across this particular SQL injection:
http://server/path/page.php?id=1+union+select+0,1,concat_ws(user(),0x3a,database(),0x3a,version()),3,4,5,6--
My knowledge of SQL - which I thought was half decent - seems very limiting as I read this.
Since I d... | stackexchange/codereview |
i am working on a struts2 web application-project and using netbeans 6.9. i want to create a properties file for my project.
how do i do that in net-beans........
| stackexchange/codereview |
i am trying to shutdown a remote computer on my network from a c# windows service. When i run the code below in a test app it works fine but when its run from the service nothing happens.
I have a feeling it may have something to do with permissions but not sure.
Does anyone have any suggestions?
Process p = new Proces... | stackexchange/codereview |
Is there any way to get dql alias for entity which doctrine adds to entity field names when uses scalar hydration?
| stackexchange/codereview |
How can I create a ListPreference with checkbox?
I know how to use ListPreference, but I need multiple selection like in Alarm application on "repeat" preference.
like this screenshot:
| stackexchange/codereview |
In ASP.NET MVC 2, TempData values persist until the session ends or until they are read. In the words of Microsoft...
The value of TempData persists until
it is read or until the session times
out. Persisting TempData in this way
enables scenarios such as redirection,
because the values in TempData are
avai... | stackexchange/codereview |
I have a nanoc site (so, all static pages) that I'd like to test with unicorn.
The idea behind this is to host this site on heroku then.
The structure is then a rack application.
I have added a config.ru file like:
require 'rubygems'
require 'rack'
require 'rack-rewrite'
require 'rack/contrib'
use Rack::Rewrite do
rew... | stackexchange/codereview |
I am currently using/experimenting with autofac as my IoC controller.
Previously to this I used a simple static class defining two methods, similar to
public static TService Resolve<TService>()
public static void Register<IType, ImpType>()
where ImpType must be of IType.
Now over to autofac. When registering, you mi... | stackexchange/codereview |
I have been using nagios + pnp4nagios for a while and am happy with the images rrdtool creates. My current task is to create a panel that has some statistics generated by nagios and after a while the statistics change. I'm looking for something like that:
But also able to switch screens automatically. I do know that I... | stackexchange/codereview |
I have a small requirement and that is as follows:
I am calling a stored procedure and based on the results from the stored procedure, i want to display the data into textboxes. I am using DataSet and DataAdapter for the same. Can anyone help me. My code is as follows:
Dim sqlStripCmd As New SqlCommand("prcAdt_mwo_... | stackexchange/codereview |
I am trying to understand what this means, the code I am looking at has
in .h
typedef void (*MCB)();
static MCB m_process;
in .C
MCB Modes::m_process = NULL;
And sometimes when I do
m_process();
I get segmentations fault, it's probably because the memory was freed, how can I debug when it gets freed?
| stackexchange/codereview |
Could you please help me for this matter?
I have 3 matrices, P (Power), T (Temperature) and H (Humidity)
every matrix has 31 columns (days) and there are 24 rows for every column
which are the data for the March of year 2000, i.e.
for example, the matrix P has 31 columns where every column represents
a day data for P... | stackexchange/codereview |
HTML5 gives us some new input elements to play with, such as <input type=number>. This renders (in Chrome) as a textbox with two cycle buttons inside the textbox, for incrementing and decrementing the numeric value inside the box.
For a personal hobby project, I'm using this control. However, I'm stuck with one issue:
... | stackexchange/codereview |
I'm trying to make an "at" job work at a given time, for testing purposes I'm using $time but this will be a datetime that I get from a separate MySQL query. In the command line I go like this:
echo "mysql -e 'UPDATE admin SET row1=row2 WHERE id=1;'" | at now
And I get a "job 36 at 2010-10-28 15:05". in PHP I tried ... | stackexchange/codereview |
title pretty much says it all.
I have a website which will only run behind a login so I want to ensure that nothing can be accessed unless you're logged in. This includes ActionResults, JsonResults etc...
Currently, I have [Authorize] all over my controllers which is quite tedious and not very DRY :)
So can I protect t... | stackexchange/codereview |
I'm getting an Xcode warning when compiling several class that subclass existing Cocoa classes. For example, the following class
@interface HMAttitude : CMAttitude
{
double pitch;
double roll;
double yaw;
}
@property (readwrite) double pitch;
@property (readwrite) double rol... | stackexchange/codereview |
how to make regex below to detect also prices like just £7 not only everything > 9
/\d[\d\,\.]+/is
thanks
| stackexchange/codereview |
I'm trying to render a partial view on my master page using Html.RenderAction() in VS 2010 using MVC2. Here is my RenderAction() call:
<% Html.RenderAction(
"Menu",
"Navigation",
new
{
currentAction = ViewC... | stackexchange/codereview |
I have a datetime value that is available in a django template.
I am trying to format the date as "d-mmm"
so for example dates are formated as:
5-Mar
10-Mar
4-Apr
etc.
I have tried different combinations - NOTHING works so far?. I hope I dont have to write a custom filter just to format a date ?
[Edit]
I tried the '... | stackexchange/codereview |
I've had this problem twice on two different sites. It works in all browsers other than IE9.
I have a div being opened and closed using jquery slideup and slideDown (the same problem happens with slideToggle). I'm able to see the content of the div as it slides down, but as soon as the animation stops, the content disa... | stackexchange/codereview |
I have a page that contains 8 jstree's, 3 of which are very large.
The obvious problem is that the page take 13 seconds to load, which is crap.
Through profiling I know this is all jstree processing time.
Does anyone have any ideas on reducing page load times ?
I was thinking partial loading of elements but this will ... | stackexchange/codereview |
I am surprised at how long it takes to merge a very small change from any particular branch into trunk; 1-2 minutes to merge in a few lines of text that have changed in a single text file that is only 2k long.
I would like, if possible, to make merging a hell of a lot faster but don't know where to start. I have done ... | stackexchange/codereview |
I need to check whether a particular url is up or not.
The format of the url is like
http://IP:port
When I use java.net.URL class then I get java.net.SocketException or java.net.ConnectException.
When i ping these IPs, I find them up then why java is not able to recognise them?
The code I'm writing is
URL url = new ... | stackexchange/codereview |
<asp:RegularExpressionValidator
id="RegularExpressionValidator1" runat="server"
ErrorMessage="Only images are allowed!"
ValidationExpression="^(([a-zA-Z]:)|(\\{2}\w+)\$?)(\\(\w[\w].*))
+(.jpg|.JPG|.gif|.GIF|.png|.PNG|.jpeg|.JPEG)$"
ControlToValidate="fileUpEx"></asp:RegularExpressionValidato... | stackexchange/codereview |
I am using following code for downloading PDF document in save as mode but there is a problem in IE,
anyone can resolve this prohlem?
private void DownloadFile(string fname, bool forceDownload)
{
string path = MapPath(fname);
string name = Path.GetFileName(fname);
string ext = Path.GetExtension(fname);
... | stackexchange/codereview |
I have some problems logging to a site using CURL.
I think my problem is related to cookie file.
I use cookiejar when I'm logging in to collect the information and then
I use cookiefile to retrieve the information.
The problem is that from some reason the SMIDENTITY is added to the GET request from the browser and my C... | stackexchange/codereview |
I was asking in terms of the Oracle SQL*PLUS ...
| stackexchange/codereview |
I have recently created a new shipping module in Magento 1.3.2 with the aid of the Magento developers guide. My module works correctly, however I cant seem to work how to get the functionality for it to become apart of the carriers down down list when a shipment is created within the admin area.
Once I have my carrier ... | stackexchange/codereview |
Every time I drag a vertical or horizontal slider, Interface Builder 3.2.4 hangs.
Is anyone else having this same problem? Any fixes?
| stackexchange/codereview |
In Eclipse 3.6 with Plugin v1.4.0 AppEngine 1.3.8 GWT 2.1.0 Local Task Queues no longer get executed.
To reproduce:
Create a new GWT and AppEngine project (I called the package "test2"
below)
Add the following to GreetingServiceImpl greetServer() method before
the return line:
final Queue queue = QueueFactory.getDefaul... | stackexchange/codereview |
I have to make formatting available for a text box in a web based application just like the options available here to make selected text bold or in italics. I don't know where to start. can anyone please guide me.
Thanks
| stackexchange/codereview |
Greetings,
I'm using Visual Web Developer Express 2010 to do some development; I have also the Visual Studio 2010 Shell installed, which I use to debug server and client code, using the Debug>Attach to process command.
My problem is that C# (.cs) files open in the shell as if they're plain text files; there's no syntax... | stackexchange/codereview |
Say I have a basic page like so:
<custom:TableOfContents />
<h1>Some Heading</h1>
<h2>Foo</h2>
<p>Lorem ipsum</p>
<h2>Bar</h2>
<p>Lorem ipsum</p>
<h2>Baz</h2>
<p>Lorem ipsum</p>
<h1>Another Heading</h2>
<h2>Qux</h2>
<p>Lorem ipsum</p>
<h2>Quux</h2>
<p>Lorem ipsum</p>
Assume all the header... | stackexchange/codereview |
I am looking for a way to authenticate at multiple servers at the same time. One login for multiple sites ( a.com , b.com, c.com )
All the servers are on one network. Ldap authentication
Thanks for the help
| stackexchange/codereview |
My Localizable.strings file has somehow been corrupted and I don't know how to restore it.
If I open it as a Plain Text File it starts with weird characters that I can't copy here.
If I leave the file be the app builds. If I make any changes either the values aren't interpreted properly or I get an error at compile tim... | stackexchange/codereview |
This might sound funny but I got a homework and I can`t make any sense of it.
The statement sounds like this:
"Find the 10 largest numbers in an array of 100.000 randomly generated integers. You will use threads to compare 2 numbers. A daemon thread will print at regular intervals the progress and the number of unch... | stackexchange/codereview |
How can I maximize the size of the div that plays the role of "content"?
I recognize that this may simply be a basic CSS question, but it feels like it is tied to CSS in jQueryMobile.
I'm placing a Google Map in the content div and I'd like the map to fill the available verticle space on the mobile browser. Instead, i... | stackexchange/codereview |
I have a form with two inputs:
echo $this->Form->input('articulo_id', array('empty'=>'---Select---'));
echo $this->Form->input('numeral_id', array('empty'=>'---Select---', 'type'=>'hidden'));
When the first one changes state the second one gets updated and auto-populated; this is how it gets updated:
$options = array... | stackexchange/codereview |
I have in my code behind the following property
public string Firstname {get;set;}
when I want to bind it to some textbox I do the following:
<asp:TextBox runat="server" ID="txtFirstname" Text='<%# Bind("Firstname") %>'/>
then I want value put in this textbox to be set in my Firstname property (because I want to proc... | stackexchange/codereview |
I have tons of existing code using wxWidgets. The main window is wxDialog. Now I have to add a wxMenuBar to that dialog. But, in order to do it, the window should be derived from wxFrame.
Is it possible to add a wxMenuBar to the wxDialog?
If not, is it possible to convert existing code in a way that main window is deri... | stackexchange/codereview |
I wanna have a simple module that adds two std_logic_vectors. However, when using the code
below with the + operator it does not synthesize.
library IEEE;
use IEEE.std_logic_1164.all;
use IEEE.std_logic_arith.all;
entity add_module is
port(
pr_in1 : in std_logic_vector(31 downto 0);
pr_in2 : in s... | stackexchange/codereview |
Using WPF(with C# and LinqToXml), I am reproducing a paperless version of an existing paper form. The existing form includes some one-character-per-box text strings. I have already duplicated the appearance of the paper form using XAML. How can I add code to a one-character TextBox to automatically send control to t... | stackexchange/codereview |
Hi
I am implementing socialAuth code using the code provided in the following link.
http://code.google.com/p/socialauth/wiki/GettingStarted.
But when I use provider object (of class AuthProvider). It gives me compilation error during compiling verifyResult method. If somebody has already implemented.
Please help.
Than... | stackexchange/codereview |
I am new to this 32 bit vs 64 bit thing. I have written programme in C++ in linux. I am wondering what determine the programme is 32 bit or 64 bit? This is because I compile the programme from a makefile written by others.
How could I check it and how could I modify it to 64 bit?
Thanks.
| stackexchange/codereview |
I understand the right way to protect a db from SQL injection is by using prepared statements. I would like to understand how prepared statements protect my db.
For starters, are prepared statements the same thing as "parameterised queries"?
As an example, I'm pasting below my code for the insertion of a new user in... | stackexchange/codereview |
I get a syntax error near AUTOINCREMENT. What is the cause of this error?
CREATE TABLE person (
id INTEGER NOT NULL AUTOINCREMENT,
name TEXT NOT NULL
);
CREATE TABLE department (
id INTEGER NOT NULL AUTOINCREMENT,
name TEXT NOT NULL,
FOREIGN KEY (leader) REFERENCES person(id)
);
| stackexchange/codereview |
Can I add a group of ArrayList into a single ArrayList?
The ArrayList groups are of different sizes. Then How can I recognize each ArrayList?
| stackexchange/codereview |
When using the C# UDPClient to receive data, how do I determine if the received datagram was a broadcast packet or not?
I can determine the source IP-address by reading the endpoint from UdpClient.Receive(endpoint), but I can't figure out how to get the remote IP-address of the packet. Is there a way to do that?
| stackexchange/codereview |
I'm using DotNetOpenAuth (which references System.Web.Mvc version 1.0.0.0) in a Mvc 3.0.0.0 project in Visual Studio 2010.
I'm using assembly binding redirection as follows:-
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Web.Mvc" publ... | stackexchange/codereview |
I'm googling without success to figure out how to make ANT print System.out.println/System.out.print messages in the console. Messages simply don't appear. I haven't found any simple way of doing this. Is there any?
Thanks
| stackexchange/codereview |
Is there any way I can change the Tab Bar Controller's color to something other than the default black? I know this isn't possible in IB, but perhaps maybe through code?
| stackexchange/codereview |
I'm going to migrate our project from svn to git. Now some of the developers work only on a subtree of it. Is it possible in git? To be specific, we one need to be able to:
- checkout a subtree of the trunk, change it and commit the changes
- without seeing the trunk. A person may not even be granted privileges to read... | stackexchange/codereview |
I have three models:
class Tenant < ActiveRecord::Base
has_many :sites
end
class Site < ActiveRecord::Base
belongs_to :tenant
has_and_belongs_to_many :users
end
class User < ActiveRecord::Base
has_and_belongs_to_many :sites
end
For Site and Users, I have a join table (sites_users).
Every Site has n Users. E... | stackexchange/codereview |
Say I have two factors and I want to graph them on the same plot, both factors have the same levels.
s1 <- c(rep("male",20), rep("female", 30))
s2 <- c(rep("male",10), rep("female", 40))
s1 <- factor(s1, levels=c("male", "female"))
s2 <- factor(s2, levels=c("male", "female"))
I would have thought that using the table ... | stackexchange/codereview |
Any Ninject experts in the house? :)
I've recently been trying to convert my WCF Service Application and Windows Forms Client Application from Castle Windsor dependency injection to Ninject.
All has gone fine on the Win Forms side, but I am encountering issues on the WCF side of things. I have learned so far I believe... | stackexchange/codereview |
Right now I am using the prompt command as a workaround to copy arbitrary text out of my JSX script in Photoshop.
prompt("to copy",(horizontalcenter.toString()) + ", " + verticalcenter.toString());
And that is giving me the information that I want. The "to copy" just gives the title, then the information I want to cop... | stackexchange/codereview |
Could somebody give me some recommendations on diff tools on Ubuntu? Actually what I need is not just file comparison, but also directory comparison.
I think diff tools under Windows is really most convenient, especially WinMerge.
But under Ubuntu, what I can get with high efficiency is only TkDiff, but it only suppor... | stackexchange/codereview |
Is there any way to find memory leaks in javascript or jquery.
i am working on javascript alot these days. I moved from middletier to UI.so I want to know if there is anyway to find them.
thanks in advance.
| stackexchange/codereview |
how can I select multiple files to upload like Facebook or Gmail or Flickr?
<button>Upload files</button>
When you press the Upload files button, the OpenDialogBox appears, and you select multiple files using CTRL KEY... then press open and the upload begins...
Thanks!
| stackexchange/codereview |
I am learning to write lambda expressions, and I need help on how to remove all elements from a list which are not in another list.
var list = new List<int> {1, 2, 2, 4, 5};
var list2 = new List<int> { 4, 5 };
// Remove all list items not in List2
// new List Should contain {4,5}
// The lambda expression is the Pr... | stackexchange/codereview |
I'm running a .net aspx application. I'll need my android app to access and modify/insert information into the ms sql database. is there any api ? thank you
| stackexchange/codereview |
I'm Using MVVM in WPF (.Net 3.5) and I need a control that supports formatted text, bold & italics, and I can bind to easily.
When I say easily I mean something like Text ="{Binding FormattedText}" and that's it.
RichTextBox blows for binding.
| stackexchange/codereview |
This example is a simplified version of my code. I'm still trying to grasp the new way of writing javascript (as opposed to the way 10 years ago) so thanks for your patience. I need globalVal's value to be accessible and I'm having trouble. The value is obtained from a function that is called as an argument from anothe... | stackexchange/codereview |
For example, if it is the choice of chocolate, ice cream, donut, ..., for the order of their preference.
If user 1 choose
A B C D E F G H I J
and user 2 chooses
J A B C I G F E D H
what are some good ways to calculate a score from 0 to 100 to tell how close their choices are? It has to make sense, such as if most an... | stackexchange/codereview |
How can I find nearby Bluetooth devices using Python, with a Bluetooth adaptor?
| stackexchange/codereview |
I am processing a CSV file and have the following working code:
reader = csv.reader(open(filename, 'rU'), dialect='excel')
header = reader.next()
However, to be compatible with elsewhere in the codebase, I need to use a file object using pkg_resources.resource_stream, as follows:
fileobj = pkg_resources.resource_strea... | stackexchange/codereview |
Anyone out there good with htaccess and mod rewrite - i need your help!
I need to rewrite the base part of a url.
for example all requestst to http://domain1.com need to go to http://domain2.com
The requests will typically be in the form as follows:
http://domain1.com/main/test?q=1
i then need to go to http://domain2.c... | stackexchange/codereview |
I want to use a CheckedListBox in an application where each item in the ListBox is the name of a folder on my hard drive and for the purpose of reading and writing text files to and from each of these folders I want to ensure that one and only one item (a folder) can be selected at any one time in the CheckedListBox
Ho... | stackexchange/codereview |
How I can concatenate boost::mpl::string?
The following code produce errors:
#include <iostream>
#include <boost/mpl/vector.hpp>
#include <boost/mpl/string.hpp>
#include <boost/mpl/fold.hpp>
#include <boost/mpl/placeholders.hpp>
#include <boost/mpl/push_back.hpp>
typedef boost::mpl::vector<
boost::mpl::string<'ab'>... | stackexchange/codereview |
I need to allow the user to submit queries as follows;
/search/"my search string"
but it's failing because of request validation, as outlined in the following 2 questions:
How to include quote characters as a route parameter? Getting "Illegal characters in path" message
How to modify request validation?
I'm currently ... | stackexchange/codereview |
We have a web site that currently uses windows authentication with NTLM.
In this solution we have some code that reads the user name out of the HttpContext.
We are now considering moving to Kerberos.
Question is: will this affect the user name in the HttpContext?
Edit
We are using:
HttpContext.Current.Request.LogonUser... | stackexchange/codereview |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.