instruction_seed stringlengths 1 35.8k | _source stringclasses 1
value |
|---|---|
I am an affiliate of an online store, and I promote it through my own website which is targeted for a specific language.
One of the issues i'm having with my affiliated site, is that he would not translate his website to the language I am promoting it in. Meaning, when I redirect to his website with my referral code, t... | stackexchange/codereview |
I have a set of entities that implement an interface:
public interface ILocalised
{
Culture Culture { get; }
}
For lots of complicated reasons I need to filter entities which do not have the correct culture after they are returned back from the DB (i.e. I can't use a Filter). My immediate thought was to create an ... | stackexchange/codereview |
how to check if OpenOffice is installed programatically using c#
| stackexchange/codereview |
In order to run a CLIM UI, the generic function clim:run-frame-top-level must be invoked, however this function blocks until the UI exits. This would seem to require all application control be handled via the CLIM top level.
Is it possible to structure an application differently such that a control-flow outside of the ... | stackexchange/codereview |
I am searching for a Javascript Library Which has only AJAX no other feature. e.g. a Small Simple XMLHttp Wrapper.
| stackexchange/codereview |
I'd like to do this but I know this isn't the right syntax:
INSERT INTO TBL1
SELECT Col1
FROM TBL2
WHERE Col1.endswith('s')
| stackexchange/codereview |
Hello I have following Problem:
Within an uninstall-process I load a JAR (jdbc-driver).
URL pDriverJar = jarToDelete.toURI().toURL();
URL[] lURLList = new URL[]{pDriverJar};
URLClassLoader lLoader = new URLClassLoader(lURLList, Thread.currentThread().getContextClassLoader());
Thread.currentThread().se... | stackexchange/codereview |
I have a webpage having four Checkboxes as follows:
<p>Buy Samsung 2230<label>
<input type="checkbox" name="checkbox1" id="checkbox1" />
</label></p>
<div id="checkbox1_compare" style="display: none;"><a href="#">Compair</a></div>
<p>Buy Nokia N 95<label>
<input type="checkbox" name="checkbox2" id="checkbox2" /></label... | stackexchange/codereview |
In my JavaScript program, I get values from a form through its elements and then print them in order, in an alert. This works fine in Firefox, but in Chrome the order is wacky and it ends with the "Submit" button.
I tried getting rid of the fieldset and adjusting the numbers, and it worked, but I liked the fieldset! Al... | stackexchange/codereview |
I have two UIViewController subclasses, A and B.
In A.xib I have embedded a "B" UIViewController, set its NIB Name as "B", and attached its delegate and IBActions to the File's Owner, which is an A.
In B.xib I have defined a view and attached its various IBOutlets to the File's Owner, which is a B.
In the graphic you c... | stackexchange/codereview |
I have url rewrite rules which redirect www.domain2.com to a subfolder under the root of a domain1.com (let's call this folder subproject). In my controller, I need to construct a URL to the original non modified path but the Request.Url properties (like AbsoluteUri or LocalPath) always contain the subproject subfolder... | stackexchange/codereview |
I'm working on a template with a designer and we see different things. In my browser on mac the input field are next to the labels but for the designer in his browser the input fields are under the labels.
I use eric meyer's css reset so everything should be correct. Here's a screenshot to illustrate what I mean (left ... | stackexchange/codereview |
Given a series of randomly generated data how can I figure out how random it actually is? Is R-lang a good tool for this matlab? What other questions can can these tools answer about randomly generated data? Is there another tool better for this?
| stackexchange/codereview |
Since I've migrated from Leopard to Snow Leopard I get
$ ruby script/server
Rails requires RubyGems >= 1.3.2. Please install RubyGems and try again: http://rubygems.rubyforge.org
the only way to make it work is:
$ /usr/bin/ruby script/server
=> Booting Mongrel
=> Rails 2.3.8 application starting on http://0.0.0.0:300... | stackexchange/codereview |
I need to pull out data from a plist array and put it in an NSArray. But it seems to not be working.
Here is my main file:
NSString *path = [[NSBundle mainBundle] pathForResource:@"htmlData" ofType:@"plist"];
NSMutableDictionary *tempDictionary = [[NSMutableDictionary alloc] initWithContentsOfFile:path];
dictionary = ... | stackexchange/codereview |
Below are two fragments (ready to compile) of code. In first fragment in which I'm using only forward declaration for a struct while deleting pointer to this struct from a Base class dtor for a Guest class isn't invoked.
In the second fragment when instead of forward declaration I use full definition of this Guest clas... | stackexchange/codereview |
Where can I find the source code for java arrays?
Example:
double[] arr=new double[20];
All array's with any dimension implements Cloneable and Serializable` interface. I searched the source code but couldn't find the code for this.
| stackexchange/codereview |
Using tipfy, how does one express a catch-all route in urls.py if more specific routes do not match?
Tipfy uses Werkzeug-like routing, so there's this (in urls.py):
def get_rules(app):
rules = [
Rule('/<any>', endpoint='any', handler='apps.main.handlers.MainHandler'),
Rule('/', endpoint='main', handler='apps... | stackexchange/codereview |
Say you have this:
class LogEntry
{
int ID;
int UserName;
datetime TimeStamp;
string Details;
}
and you have pulled a set of data like this:
ID Username Timestamp Details
1 foo 1/01/2010 Account created
2 zip 2/02/2010 Account created
3 bar 2/02/2010 Account create... | stackexchange/codereview |
If I include files in my Xcode project, how can I control or specify which files are included as a part of the application's bundle?
For example, all the PNG files I add to the project always wind up in the bundle. Conversely, the .m and .h files are not.
How can I control or specify which are or are not included?
If I... | stackexchange/codereview |
I'm trying to build an application that uses QTKit, with some compress options. I saw this example in the apple developer page QTCompressionOptionsWindow that uses a Window for that purpose.
in MyController.m line 65 there is a comment:
// ******** Compression Options Window *****
// create our window with the media t... | stackexchange/codereview |
I am creating a rails3 application and I want to create a class that handles string formatting, so I made a class called FormatUtilites.rb in the lib directory but whenever I try calling it from somewhere else in my app I get this error:
ActionView::Template::Error (uninitialized constant ActionView::CompiledTemplates... | stackexchange/codereview |
I'm new to android developing but right now I'm working on an application that displays Random Facts. Since I don't want it to be in a random order, I would like to have them in a list. I would like to order through them one by one and show them using TextView.
Resources res = getResources();
myString = res.getStringAr... | stackexchange/codereview |
I have some report and plenty of parameters inside that report. One of parameter contains values stored inside dropdown list (that are downloaded from db). I wanted to set the custom width for a specific drop down list in my report so I do it by adding the following code in Report.aspx file located in: C:\Program Files... | stackexchange/codereview |
Hi I have a DropDownList bounded from the code behind. How can I use the DataTextField as a ToolTip of the DropDownList?
DropDownList list = this.DropDownList1;
list.DataSource = GetData();
list.DataTextField = "DisplayString";
list.DataValueField = "DataValue";
list.DataBind();
I want the bounded Field DisplayString... | stackexchange/codereview |
Could someone explain this command for me:
cat | sed -e 's,%,$,g' | sudo tee /etc/init.d/dropbox << EOF
echo "Hello World"
EOF
What does the "sed" command do?
| stackexchange/codereview |
I'm trying to create a pretty simple program that basically is a timer.
I have three sets of labels, lbl_seconds, lbl_minutes and lbl_hours.
These labels have the default value of 00:00 and I want the timer to change that for each label. I have googled this but I cannot seem to find any good info on it.
Do I need thr... | stackexchange/codereview |
server = SOAPpy.WSDL.Proxy(wdf)
Traceback (most recent call last):
File "<pyshell#11>", line 1, in <module>
server = SOAPpy.WSDL.Proxy(wdf)
File "C:\Python27\lib\soapy\SOAPpy\WSDL.py", line 62, in __init__
self.wsdl = reader.loadFromStream(stream, wsdlsource)
File "C:\Python27\lib\soapy\SOAPpy\wstools\WS... | stackexchange/codereview |
I have a file which contains around 10 million rows and size is around 400mb , my system is just not able to handle it . when i try opening the file using gedit , it just gets stuck . Is there any way to handle such large files of data.
| stackexchange/codereview |
I have a series of activities that share a database. In the primary activity the user will be doing things will the program automatically logs data into the db. This continues until the user would like to view the database by starting the view database activity. How I have it set up is that onPause will close the datab... | stackexchange/codereview |
I am trying to use the ctrl and + combination within firefox for a different action for our web application. How could I prevent firefox from zooming when our web application is listening for this event? I do not want to change a setting within firefox, but would like the code to do this somehow. Any suggestions?
| stackexchange/codereview |
I have an Activity where I want to display a heading that takes up the top quarter of the app and displays a dynamic set of text. In some cases it'll all fit on one line and I'd like the font size to get sized up so it's large and easy to read. In some cases it'll be on multiple lines (usually less than 4) and need to ... | stackexchange/codereview |
For example if I search for the name Åsa i only want to get the name Åsa and not Asa, same with Björn instead of Bjorn
$query="select * from users where username like 'Björn'";
$result=mysql_query($query);
$num=mysql_num_rows($result);
echo"$num";
$i=0;
while($i<$num){
$id=mysql_result($result,$i,"id");
$name=mysq... | stackexchange/codereview |
I would like to do something like:
dct = ['do_this', 'do_that']
dct[0]() // call do_this
But you can't call the string as a function (will get an error).
How can I achieve this without switching and without using a list of lambdas or functions?
Explicitly I want to refer the function by name.
| stackexchange/codereview |
I have a program that will get messages from a server and store them locally. If the message header, but not the message itself, exists locally, the program downloads the message while displaying a popup saying the download is taking place as well as a "cancel" button should the user want to abort the download.
In the... | stackexchange/codereview |
First time posting. :)
I'm a pretty new developer so I'm not well versed in common ASP.NET problems.
As a test, my boss asked me to convert a (not very critical) ASP.NET site from 1.1 to 4.0. Well, it's not extremely difficult and things are going well so far. However, I've hit a small snag. I keep getting a NullRef... | stackexchange/codereview |
I have a RelativeLayout in which I have two images. The problem is the scale up. They are displayed way bigger than the are supposed to. Here is my layout:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/gallery_batch"
android:layout_width="wrap_content"
android:layout_height... | stackexchange/codereview |
When invoking a service, my client code passes in data. One of the data members is a byte array, so WCF will automatically encode this into a base-64 string during serialization. The problem is, the data contract of the service is expecting a byte array, not a string, so deserialization of the data will result in an ex... | stackexchange/codereview |
I am beginner to Apache POI api. I am trying to create excel sheet using arraylist.
My java code is as follows.
HSSFWorkbook wb = new HSSFWorkbook();
HSSFSheet sheet = wb.createSheet("new sheet");
HSSFCellStyle style = wb.createCellStyle();
style.setFillForegroundColor(HSSFColor.LIME.index);
... | stackexchange/codereview |
I have created a Delphi for PHP page in RadPHP. How can I make it center in the browser's window?
Is it possible to achieve it using only PHP code?
| stackexchange/codereview |
I have to insert data into table but only if it does not already exist.
I check for existing rows using:
IF EXISTS (SELECT 'X' FROM Table1 where id = @id)
Will the use of 'X' improve performance instead of using a column name?
| stackexchange/codereview |
I have two classes and one class contain string array and its constructor how to call it in main with its object?
| stackexchange/codereview |
I have a custom MsBuild task that sends an email (does some special stuff while sending the email -like formatting content).
Background:
Using TFS 2008
Build server is a separate machine using TeamBuild 2008.
This custom task used to work fine until I installed .Net 4.0 on the build machine and setup the build service ... | stackexchange/codereview |
I need to parse a simple json response (from my rails app):
[
{
"photo":
{
"updated_at":"2010-10-14T19:12:35Z",
"photo_file_size":206422,
"created_at":"2010-10-14T19:12:01Z"
}
},
{
"photo":
{
... | stackexchange/codereview |
Possible Duplicate:
Final classes in Python 3.x- something Guido isn't telling me?
I was watching a talk (How to design a good API and why it matters) in which it was said, literally, "design and document for inheritance, else prohibit it". The talk was using Java as an example, where there's the 'final' keyword for... | stackexchange/codereview |
I have an app, and after about 20 minutes of idle time the program just crashes. ("Windows has encountered an error and needs to close...")
I have no idea why this is happening. What is the best way to go about debugging something like this?
| stackexchange/codereview |
I want to implement Hill cipher but I think I have a problem in understanding the algorithm itself.
The key I'll use is a 2X2 matrix and I'll encode 2 characters each time.
I'll multiply the key matrix with the matrix of 2 characters then modulus the result on 26 as this equation.
C = E(K, P) = KP mod 26
where: K:key
... | stackexchange/codereview |
I have a Clojure program that I build as a JAR file using Maven. Embedded in the JAR Manifest is a build-version number, including the build timestamp.
I can easily read this at runtime from the JAR Manifest using the following code:
(defn set-version
"Set the version variable to the build number."
[]
(def versio... | stackexchange/codereview |
I have an interface
public interface IResolver<T>
{
T Resolve();
}
I know this isn't the ideal (service locator is an anti-pattern and all), but in some cases it's still necessary (for example WCF service activation - I don't want to instantiate the channel until Resolve() is explicitly called...and in the case o... | stackexchange/codereview |
I have a problem using a carriage return to rewind to the beginning of a line within XCode.
This small example:
std::cout << "will not see this\rwill see this" << std::flush;
std::cout << std::endl; // all done
compiled in XCode results in:
will not see this
will see this
whereas, when I compile it in the terminal u... | stackexchange/codereview |
When I'm in my virtual environment, I attempt to run:
pip install MySQL-python
This didn't work, so I tried downloading the package and installing it by running:
python setup.py install
This returns the following error:
% python setup.py install ... | stackexchange/codereview |
Seems like a simple question, but I haven't been able to find a solid answer anywhere. I'm outputting a ton of HTML and find escaping "s to be error prone and hard to read, but I also want to have my HTML formatted nicely.
Want something like this (though I know this won't worK):
echo '<div id="test">\n';
echo '\t<div... | stackexchange/codereview |
I'm building a Windows Phone 7 Silverlight app. Is there any reason to use RestSharp instead of WebClient? I've looked around on the RestSharp site, but it's not immediately obvious what the benefits are.
| stackexchange/codereview |
I followed the steps here to make my existing WCF service (already working fine as console application) be Windows Service as well, on my Windows 7 machine which is also my development machine.
No matter what I tried, when doing the last step of using installutil, I'm getting the following message in the command line:
... | stackexchange/codereview |
I have 2 AttributeSet objects- how can I combine them into 1?
| stackexchange/codereview |
I want/would like a TabControl with TabItem's I can close (with an x) and move around. If I also could move the tabitems to other screens it would be great. In fact I want it exactly as in VS2010 with docking and splitting side-by-side etc. But to implement all this by my self would take weeks. Thats life I suppose, bu... | stackexchange/codereview |
I want to make an empty div react to click.
HTML
<div id="closeButton"></div>
CSS
#closeButton {
height:100px;
position:absolute;
right:0;
top:0;
width:100px;
z-index:1000;
border:1px solid blue;
}
Javascript
$('#closeButton').click(function() {
alert("yo");
});
This works perfectly in Firefox, but not in Inte... | stackexchange/codereview |
can someone help me please how to check is visitor on my website fan of my facebook page,thanks in advance.
Regards
| stackexchange/codereview |
I have a context manager that captures output to a string for a block of code indented under a with statement. This context manager yields a custom result object which will, when the block has finished executing, contain the captured output.
from contextlib import contextmanager
@contextmanager
def capturing():
"C... | stackexchange/codereview |
How can i create a method that has optional parameters and params together?
static void Main(string[] args)
{
TestOptional("A",C: "D", "E");//this will not build
TestOptional("A",C: "D"); //this does work , but i can only set 1 param
Console.ReadLine();
}
public static void TestOptional(string A, int B =... | stackexchange/codereview |
The quick login/no registration of stackoverflow is one of its finest features. I'm just curious if there's an off-the-shelf solution for providing this service.
Has anybody seen anything?
| stackexchange/codereview |
Goal: to get a list of N random questions that have been answered correctly the least amount of times, per user.
following sql will provide me a list of having a count of correctly answered questions for user_id 4.
select q.id, temp.Count
from questions as q
left join
(select q.id, count(a.id) as count
from questions a... | stackexchange/codereview |
In MongoDB, is it possible to update the value of a field using the value from another field? The equivalent SQL would be something like:
UPDATE Person SET Name = FirstName + ' ' + LastName
And the MongoDB pseudo-code would be:
db.person.update( {}, { $set : { name : firstName + ' ' + lastName } );
| stackexchange/codereview |
I need to send a file to webdav server from iphone app, it's include the function of create folder, update file, delete file. so i want a webdav client framework for iphone or static library, which could used at my iphone app.
I have found some code, such as ConnectionKit, it hasn't been updated in years, and i have n... | stackexchange/codereview |
I have a Trac installation with the Trac-Git plugin. When committing to git, I can use TracLinks to reference to a Bug by using a prefix bug:123 or #123 and the changeset is linked to the bug. I want to achieve the reverse effect now. On a given ticket, I want to see a list of all the Changesets associated with it. I r... | stackexchange/codereview |
http://u.neighborrow.com/users/view/4 (sorry - had the wrong link up there, i had copied a redirect by accident)
<?php if (! empty($user['User']['avatar'])): ?>
<img src="/images/users/<?php echo $user['User']['avatar']; ?>" width="100" />
<?php else: ?>
<img src="http://gravatar.com/avatar/<?=... | stackexchange/codereview |
1) What is the reason for the use of retain?
For example, in a setter method:
- (void) setCount: (int) input {
[intCount autorelease];
intCount = [input retain];
}
2) the autorelease-Method: Is it deleting an old object or preparing the new one?
3) Why the retain-method is called at the input-object?
Would
in... | stackexchange/codereview |
let's say I want to return all chars after some needle char 'x' from:
$source_str = "Tuex helo babe".
Normally I would do this:
if( ($x_pos = strpos($source_str, 'x')) !== FALSE )
$source_str = substr($source_str, $x_pos + 1);
Do you know a better/smarter (more elegant way) to do this?
Without using regexp that wo... | stackexchange/codereview |
I must integrate a .jar file into a flash project. The project is like this:
There'll be a flash video player for a Web Browser with Play, Pause, Stop commands. I must use voice commands to trigger the player actions. I have a .jar that makes the voice recognition so I want to integrate this file with my Flash Player.
... | stackexchange/codereview |
PHP is one of those languages I use periodically, but usually have to dust the cobwebs off when I start using it again. The same applies this week whilst I port some C code to PHP. This uses a lot of AES encryption and SHA256 hashing - all working fine so far. However, decrypted strings come out in "C" form - i.e. term... | stackexchange/codereview |
I am pasting my code for a simple socket server in C and a Java client.
I use write method sending character by character in Java. However after the chunk of characters are sent(here, 'h', 'e', 'y') , the Java client is send blocked as the C server does not reply to it :(
I am assuming there is some problem with sendin... | stackexchange/codereview |
For example:
void DeleteLastNode(NodeType **L)
If **L represents the address of the variable L, can it not be replaced by &L instead? Also, if I were to use *L or simply just L, would I not be able to change L's contents? If so, what's the difference of using *L and L, if L is a pointer to it anyways? Would I not be a... | stackexchange/codereview |
Morning all,
I don't even know if this is possible, and if it is, I'm struggling to know where to start.
I'll describe the problem: I have application A, which is a third-party application in Java, and application B, which is MY application, also in Java. They're both Java for cross-platform reasons. Application A is a... | stackexchange/codereview |
Something like this:
function foo()
print( __func__ )
...
end
How can it be done?
| stackexchange/codereview |
$3.5 - "In addition, a member
function, static data member, class or
enumeration of class scope has
external linkage if the name of the
class has external linkage."
Any inputs on what does it mean by 'if the name of the class has external linkage'?
Is the hint on 'local classes' (which probably don't have any... | stackexchange/codereview |
I am trying to read the .wav file and give the raw data as input to the FFT algorithm. I have used the following code to read the .wav file.
char ChunkID[4], Format[4], Subchunk1ID[4],Subchunk2ID[4];
int ChunkSize,Subchunk1Size, SampleRate, ByteRate,Subchunk2Size;
short AudioFormat, NumChannels, BlockAlign, BitsPerSamp... | stackexchange/codereview |
I'm using django-socialregistration to manage my site's connection with Facebook.
When a user clicks the "Connect with Facebook" button, I am able to automatically create a new Django user and log them in. However, I also need to create a UserProfile (my AUTH_PROFILE_MODULE) record for them which contains their Faceb... | stackexchange/codereview |
I have been using Flask for some time now and I am really enjoying the framework. One thing that I fail to understand is that in almost all other places they talk about storing the session on the server and the session id on the client, which would then identify the session. However after using flask, I dont feel the ... | stackexchange/codereview |
I am trying to call some methods from System.Speech via a WCF Service hosted on Windows Azure. When i try this locally on the development fabric, it is working perfectly fine. I can consume the methods from this Speech API via WCF service in my client.
But when I up this service in real cloud on Azure, i get the follow... | stackexchange/codereview |
After some code modifications, I suddenly noticed the project icon has a small red cross icon. However, no other file/package/folder is showing this icon. I am not sure where the error is and how to solve it.
| stackexchange/codereview |
I am using Visual C++ 2010. Does it support the C++11 threads library, such that I could compile the code in this question?
If not, what library can I use that would support this?
| stackexchange/codereview |
I want to override initWithContentRect on a subclassed NSWindow, as I've seen done in Obj-C, in order to create a borderless window from a nib.
If I try this:
class GroupWindow < NSWindow
def initWithContentRect(contentRect, styleMask:windowStyle, backing:bufferingType, defer:deferCreation)
super.initWithContentRec... | stackexchange/codereview |
I tried doing it like in the vertical example but could not get that to work.
So what I have is a div with a horizontal scrollbar in it with a lot of pictures in it.
I now want to make a button that if clicked will scroll +200px or something like that.
Is this possible and where do I start? Couldn't find anything on g... | stackexchange/codereview |
Well, I have a new project, and I've not done anything like it before, but so far so good. I am in need of having to pass some data from one page to another, and there is no limit to the amount of data that gets passed.
At first, I was thinking of POST-ing it, and then when each page loads, just grab the POST data, and... | stackexchange/codereview |
First I have read all questions about this subject, so this is not a repeated question.
What I want to ask about, how an application written in Java (such as eclipse) uses an icon instead of the default jar icons.
I don't care about compatibility, I always can make 2 different versions of my program to Windows and Linu... | stackexchange/codereview |
I am making a multiplayer game in c++ :
The clients simply take commands from the users, calculate their player's new position and communicate it to the server. The server accepts such position updates from all clients and broadcasts the same about each to every. In such a scenario, what parameters should determine the... | stackexchange/codereview |
I'm pretty new to PHP, but I've been programming in similar languages for years. I was flummoxed by the following:
class Foo {
public $path = array(
realpath(".")
);
}
It produced a syntax error: Parse error: syntax error, unexpected '(', expecting ')' in test.php on line 5 which is the realpath call.... | stackexchange/codereview |
I am looking for a method to intercept http post requests with delphi without hooking any browser functions.Is that possible? How??
| stackexchange/codereview |
I have a set of checks to perform certain tasks.
// tempDouble is a (double), hour is an int
if (tempDouble > 60.0 && (hour >= 6 || hour <= 17)) { //CLEAR
NSLog(@"CLEAR");
}
else if (tempDouble > 60.0 && (hour < 6 || hour > 17)) { //NIGHT_CLEAR
NSLog(@"NIGHT_CLEAR");
}
else if (tempDouble <= 60.0 && (hour >... | stackexchange/codereview |
How to make an EAR file using JDev 10.1.3.4 from an EJB Application???
| stackexchange/codereview |
I am developing a multithreaded application that makes use of POSIX Threads. I am using threads for doing a periodical job and for that purpose I am using usleep(3) to suspend thread execution. My question is how can I cancel usleep() timer from the main thread, I tried pthread_kill(thread, SIGALRM) but it has a global... | stackexchange/codereview |
In my Cpanel account in Daily Process Log I can see that my zend framework application load CPU very much
Top Process %CPU 182 /usr/bin/php /home/*******/public_html/index.php
But any requests to ZF application goes by index.php (with rewrite rule for Apache)
Is it possible to find out what request (url) load CPU?
| stackexchange/codereview |
I am trying to generate sound using JavaScript. I have used the following code
<html>
<script type="text/javascript" src="jquery-1.4.2.js"></script>
<script>
function PlaySound(soundObj) {
var sound = document.getElementById(soundObj);
sound.Play();
}
function init() {
//alert("");
... | stackexchange/codereview |
I have a list:
var myList = new List<string> { "red", "blue", "green" };
I have a string:
var myString = "Alfred has a red and blue tie";
I am trying to get a count of matches of words in myList within myString. Currently, I am using .Contains(), which gets me a count of 3 because it is picking up the "red" in "Alfr... | stackexchange/codereview |
I'm trying to use the twitter_oauth gem : http://github.com/moomerman/twitter_oauth
In my model I have:
require 'twitter_oauth'
And within a function I have:
def example
client = TwitterOAuth::Client.new(
:consumer_key => 'xxxx',
:consumer_secret => 'xxxx',
:token => "xxxx",
:secret => "xxxx")
retur... | stackexchange/codereview |
One Google Chrome extension displays a window with an image once in a while, how can I get the image from it with Cocoa?
Basically there is a window and image inside it, and I need that image for my program.
Thanks for reading!
| stackexchange/codereview |
I've been working on a set of RESTful HTTP services implemented using Restlet in Java. Those services are currently used by a proprietary desktop application running on Windows, and by other back-end services.
My goal now is to design an Ajaxy user interface to these services that will run within the Web browser. I am ... | stackexchange/codereview |
My question is about type variables used in generic classes and methods.
Why can't we do something like this T = new T(); or in other words, why can't we construct an object of the type variable ?
I know that generic information is erased during compilation, and everything is converted to
Object, so why doesn't the com... | stackexchange/codereview |
I'm trying to use map/reduce to process large amounts of binary data. The application is characterized by the following: the number of records is potentially large, such that I don't really want to store each record as a separate file in HDFS (I was planning to concatenate them all into a single binary sequence file), ... | stackexchange/codereview |
I am a complete novice to C, and during my university work I've come across comments in code that often refer to de-referencing a NULL pointer. I do have a background in C#, I've been getting by that this might be similar to a "NullReferenceException" that you get in .Net, but now I am having serious doubts.
Can someo... | stackexchange/codereview |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.