instruction_seed stringlengths 1 35.8k | _source stringclasses 1
value |
|---|---|
I am having a strange linking error. I followed instructions presented here to avoid this kind of problems, but I can't figure out how to split headers and implementation files.
Here's my test file:
#include <cargo.h>
#include <iostream>
#include <string>
using namespace std;
using namespace dom;
int main()
{
dom... | stackexchange/codereview |
I have following query:
THis is my structure in some .h file
typedef struct
{
recUEInfo_t *recUEInfoPtr_t;
Int32 frameID;
Int32 slotIndx;
Int32 symNumber;
} recControlList;
If I do recControlList recControlListPtr; I can pass address to caller function
and collect it ... | stackexchange/codereview |
I have a issue with two breaks < Br /> appearing in IE,
If I have a normal break placed like so
<wcl:GridView ....... />
<br />
<wcl:Button runat="server" ID="btnAddAnotherQuote" OnClientClick='AddDeliveryQuote(this);return false;' />
<wcl:HelpDialog runat="server" ID="hdDeliveryQuotes" />
Then it appears in Firefox a... | stackexchange/codereview |
I have been looking arund at implementing Gravatar for all my users profile pictures but I am a little confused about one or two things.
Imagine, like this site, I have a current user who is not registered with gravatar. In order to give them a gravatar, do I have to tell them to register with gravatar separately or is... | stackexchange/codereview |
I have a C++ app where I need to create topmost windows. Sometimes it works, but quite often it fails. In one part of the app, I create a background thread to display a topmost information window. After the user closes the window the thread goes away. The first time the app creates the thread and displays the window, t... | stackexchange/codereview |
i ve implemented shortest path algorithm on 1 city in asp.net and now i wanted to show the lines between the points selected in shortest path.how it can be done using asp.net?
| stackexchange/codereview |
well I havn't really ever using jquery to grab data from a server.. and well my jquery skills are pretty limited anyway so maybe im doing the jquery wrong ...im not sure
heres my controller to handle the json requests
class Controller_Json extends Controller_Template{
public function get_chat_entries(){
echo json_... | stackexchange/codereview |
I'm trying to create a little plugin that will make working with SQLite databases a little easier. I've got the basic CRUD functions except for selecting data from the database.
I would like to return the selected data from the executeSql function, but it seems all I can do is call another method and not just return t... | stackexchange/codereview |
I am trying to design a view using asp.net mvc 3 RC. I am not sure but I am not able to open my cshtml files in designer mode. I can just change their source html but no design time assistance is there.
Am I missing something ?
| stackexchange/codereview |
My primary IDE is Visual Studio 10.0, so MSVC is my compiler. I'm building a CMake-based project, and need to install SDL and SDL_Mixer. What's the proper way to go about this, so CMake recognizes I have these things installed?
Thanks!
| stackexchange/codereview |
I am trying to get a random string from a list of strings in scheme.
Example List ( "this" "that" "today" "yesterday")
So based on length of the list a random number is created and that word is output. But keep getting error!
I tried it like this:
;; produces random number that should be input to the random-function
(... | stackexchange/codereview |
I'm building a web application and am starting to create a test plan/test cases and results.
I've had a look at the IEEE 829 standard http://en.wikipedia.org/wiki/IEEE_829 for creating the above and it seems a bit overkill really for my needs.
Just wondering does anyone have any examples of a test plan (and associated ... | stackexchange/codereview |
This may sound as a non related coding question but it's directly related :
The facts: I've developped a website (with symfony) which allows players to search for a team (like a job board). It makes one module only.
The problems I want the website to be even more accurate and make a custom form for each players dependi... | stackexchange/codereview |
Disqus wants me to add an attribute called data-disqus-identifier to my links, but for obvious reasons, new { @data-disqus-identifier = "article" } gives me a syntax error.
Any idea what to do in these situations?
Thanks,
Rei
| stackexchange/codereview |
Alright, I wanna know why this code is working, I just realized that I have two variables with the same name within the same scope.
I'm using g++ (gcc 4.4).
for(int k = 0 ; k < n ; k++)
{
while(true)
{
i = Tools::randomInt(0, n);
bool exists = false;
for(int k = ... | stackexchange/codereview |
In Insert Mode I want to show one kind of Template and Edit Mode I want to show another Kind of Template in Devexpress Control in C#.NET
| stackexchange/codereview |
I'm getting a warning from the compiler :
"warning: 'NSSortDescriptor' may not respond to '+sortDescriptorWithKey:ascending:' "
...on this line of code:
id sortDescriptor=[NSSortDescriptor sortDescriptorWithKey:@"value" ascending:YES];
the compiler is also saying the following:
"Messages without a matching method sig... | stackexchange/codereview |
I want to build a factory class which:
instantiates a new instance of an EJB on a server
returns the remote interface to that bean to the client
via SOAP
Practically, what I'm trying to do is create a set of games on a server, instances of a class Game let's say, via a remote method invocation -- each time I call tha... | stackexchange/codereview |
Why Google App Engine Tasks can be executed more than once?
According do Brett Slatkin talk from Google I/O 2009, it is possible for a task to spuriously run twice even without server failures!
This has something to do with spurious wakeup of threads?
| stackexchange/codereview |
I have a strange character showing up on my rss feed. On firefox, it looks like a box with four numbers in each corner, in some cases, 0 - 0 - 9 - 4, in other 0 - 0 - 9 - 2.
These are appearing where smart quotes should be.
I'm familiar with the black diamond with the question mark, but this is a new one.
| stackexchange/codereview |
I'm creating a plot in matlab that includes some lines, as well as a fill. For example,
fill([0 1 1], [0 1 0], [.9 .9 .9]);
plot(rand(5, 1), 'b');
plot(rand(5, 1), 'r');
plot(rand(5, 1), 'g');
legend('fill', 'line one', 'line two', 'line three');
I can change the length of the sample lines in the legend with:
f = f... | stackexchange/codereview |
Since I had some comments on the formulation of my question, I decided to rewrite it completely. And also, I understand a little bit more about wordpress so it should make more sense now.
So, let's start with what I'm trying to accomplish by using a simple example:
Goal:
Make a search engine for some products and lin... | stackexchange/codereview |
I'm trying to get continuous integration working using Hudson, Maven & Perforce (with an scm poll used to trigger each build)
One of the requirements is to automatically update POM snapshot version numbers following each successful build.
This is trivial using the Maven release plugin, but the act of checking in the ne... | stackexchange/codereview |
When one brings up a web page that contains fields to be populated by an email address, I typically get a long drop down list of addresses that I have used in the past.
where is this stored in the registry? One location, multiple locations?
Is it directly accessible?
I want to delete some ...not all...of them.
| stackexchange/codereview |
Getting a weird problem with DOMPDF..
Wherever I use content with a br tag in it..
<p>
Something<br/>
Something Else<br/>
Last line
</p>
The rendered output pdf seems to justify the line where the br tag is so it spans across the whole width.
Anyone get that too? Any idea how to prevent it?
I'm on the latest version f... | stackexchange/codereview |
Anyway that I can check for string inside a string in javascript?
Example:
If I have 2 variable
var value1 = '|1|2|3|4|5|6'
var value2 = '1|2|3'
How can I check whether value2 is found in value1?
| stackexchange/codereview |
I need to create a table to store users' class schedules. These schedules have 7 blocks a day for Monday through Friday. However, not all blocks are filled with classes.
I was planning on creating a table that stored stored a user's id, the period id, the class name, and the class subject in each record. If I implemen... | stackexchange/codereview |
I generally don't use Interface Builder (I hate it). But I am being forced to use it, because I was invited to a project where people are using it. I am trying to create a custom UISlider.
I have created a UISlider custom class, with my own images for the slider parts.
If I add a new object to my main code using
mySli... | stackexchange/codereview |
I am mostly playing with F# on Linux and would like to get all the necessary GUI libraries (Gtk, Gdk, Atk, Glib, Pango, Cairo) to be referenced by default so that I can simply use:
open Gtk;;
without any additional typing.
My best guess would modifying the fsi launching script, which at the moment looks like that: ... | stackexchange/codereview |
Just got a new Windows laptop, installing emacs23 on it.
My previous computers have used emacs 22 for I-don't-know-how-long.
I have a longish emacs.el, which loads various side elisp libraries. I had everything set up just so, in emacs 22.
I brought this emacs.el over to the new pc, along with all the other elisp ... | stackexchange/codereview |
I'm loving the ease of OmniAuth, but I'm having a hard time connecting the dots on making additional api calls after I receive the token back.
I'll use LinkedIn as an example, but it's not LinkedIn that's the issue, more so my lack of understanding on how to make subsequent calls after I have authenticated.
I can make... | stackexchange/codereview |
Hi
I'm follow the changes of the playframework with an rss-feed on lighthouse
http://play.lighthouseapp.com/projects/57987-play-framework/events.atom. It works pretty cool an I like it, but there is one thing I'm missing: How can I see for which branch the change is made? For example https://github.com/playframework/p... | stackexchange/codereview |
I know that there are alot of discussions about how Model and ViewModel collections should be handled and alot of "syncher" solutions have been proposed from different parties along with BLINQ, CLINQ, MVVM Wrapper Kit etc. I'm still not grasping this and I would like to find a good solution to the problems in my curren... | stackexchange/codereview |
I know how to open a URL using Intents:
Intent browserIntent = new Intent("android.intent.action.VIEW", Uri.parse("http://www.lala.com"));
startActivity(browserIntent);
But how can I open multiple URLs, each on new window/tab???
Tried creating several Intents and opened each with different startActivity but it just op... | stackexchange/codereview |
I'm working on a 3d game using OpenGL and would like to take it in a fantasy direction. Specifically I'm thinking of having magic with effects for fire, water, ice, and lightning. My problem is I have no idea how to create these effects. Are there any resources for me on how to learn something like this?
| stackexchange/codereview |
I'm parsing an XML file and filling a table view. The XML has a format like this:
<article>
<title>Title 1</title>
<last-modified>MM/DD/YYY</last-modified>
</article>
...
I currently have it working using an NSMutableString to collect all of the article titles and appending the strings in the - (void)parser:(NSXML... | stackexchange/codereview |
For example, I may want to make create a div.Style1 block where all <img /> elements within this type of div are given certain properties.
Is this possible?
If so, what is the proper syntax?
| stackexchange/codereview |
I am using php to dynamically generate a table of information from a mysql database. Each row of data has an edit button. When I click edit, I want to popup a modal iframe containing a form for editing the data. I have the table and the popup working, however, I cannot find a way to send the id of the data row so that ... | stackexchange/codereview |
I'm looking for some View in eclipse, which show me modified files by me today.
I have many projects, and naturally i can use SVN but I would like somethin easy.
Any view can do this requirments ?
| stackexchange/codereview |
I have a button defined in my XML file. The button works exactly like you would expect...that is until I add the line at the bottom (android:background="drawable/leftarrow1"). Then the button is no longer clickable in the activity, but the new background shows up like I want.
What gives?
<Button
android:id="@+id/... | stackexchange/codereview |
I just downloaded the source of wordpress app. I am on the process of rebranding the wordpress app (icons & lebels) for my self hosted site. I was wondering, if there is a process / configuration option to remove the wordpress links & wordpress blogging options from my app. It doesn't make sense for the user to downloa... | stackexchange/codereview |
For some reason my header row is not visible. I am using SwingBindings.createJTableBinding to bind a pojo to the table. My table is showing all the rows however the header row is not visible.
If I inspect the JTableHeader in the table is there and its columns have names as expected. The JTable header properties: isEna... | stackexchange/codereview |
I have a two item in list control in mfc .On clicking on each item i am doing something.but fist time when i clicked nothing effecting.after second clicking everything working fine.what will be the reason.
| stackexchange/codereview |
Possible Duplicate:
getPixel from HTML Canvas?
I've looked around quite a bit for an answer to this question. Kind of surprised to have not found a definitive answer.
Is there any way to do color transforms on bitmaps in modern browsers using either javascript, css or any of the webkit css effects? Examples would b... | stackexchange/codereview |
This is not so much a technical question but still part of the development cycle.
I'm having to word all of my dialog boxes in this program I am working on and I was trying to get a good handle on the best practices for making text for the average end user to comprehend.
I have three core principles I could think of
K... | stackexchange/codereview |
I have my function getAllData, which is returning an array with dictionaries.
- (NSArray *)getAllData {
NSMutableArray *result = [[NSMutableArray alloc] init];
NSArray *data = [skiResorts sortedArrayUsingFunction:comparator context:NULL];
NSString *currentLetter = @"A";
NSMutableArray *array =... | stackexchange/codereview |
This code is a working example of checking if a path is a directory:
if [ -d "$1" ]; then
printf "Directory exists\n"
else
printf "Does not exists\n"
fi
I changed it to this to try and test if files in a directory are directories or not:
for file in "$1/*"; do
if [ -d "$file" ]; then
... | stackexchange/codereview |
I'm a french beginner dev and I need to draw charts using WPF and IronPython. I'm coding with MVS2010 and I didn't find any help on Google.
Does anybody have an idea ? Something to help me ?
Thanks all,
Ben
| stackexchange/codereview |
So I was given this function to read options to perform. I understand the execution of the prompts but I am having trouble passing the 'c' back to the program. I figure it has something to do with pointers I have yet to grasp.
int nextCommand(int *x, int *y)
{
char c;
while(1){
... | stackexchange/codereview |
I have a program that will take the files in a directory and upload them to a server. If the file is a Word File, I would then like to detect if the file is open in word / excel etc. If it is open, I would like to be able to then close it, in order to delete the local copy of the file.
Any ideas how to do this? The ... | stackexchange/codereview |
I want to update my twitter status using yahoo pipes. I could do that earlier without any difficulty using either yahoo pipes or YQL. But, recently I am not able to do it.
the document for POST status/update is http://dev.twitter.com/doc/post/statuses/update
Is there anyway to update status using yahoo pipes or YQL?
| stackexchange/codereview |
var tmpDoc = fl.createDocument();
/*..some logic...*/
tmpDoc.addItem({x:0,y:0},item);
My JSFL has the above code.
And on the 3rd line, I get a dialog box :
which has title : "Resolve library conflict"
two radio button options : "replace","dont replace"
two buttons : "ok","cancel"
Due to this dialog box, I have to m... | stackexchange/codereview |
I am trying to process some PHP code to extract keys from a specific array. I am using regular expressions to do so.
A sample source text :
$src = 'if ( $loc["key"] == $val) { // some stuff }';
The regex code :
preg_match_all('/\$loc\[\"(.+)\"]/',$src,$keys);
Which gives me the right answer :
key
But if change sr... | stackexchange/codereview |
We have a Excel spreadsheet with data to import into MySQL from a client. Some of the column names have spaces in them, so when we build the schema with the data-dump function it adds spaces into the field names; thus the BaseModels have it too.
'Client Field': { type: string, peerName: client_field }
Wondering if the... | stackexchange/codereview |
Can I find the id of a combo box in JavaScript, not its value?
jsp file code
function ChangeColor(colors) {
var partcolor = (colors.options[colors.selectedIndex].value);
if (partcolor=="black"){
document.getElementById("colorRow").style.backgroundColor = 'black';
}
else if(partcolor=="brown") ... | stackexchange/codereview |
I'm really having a difficult time trying to find a way to successfully authenticate a user and post a bookmark to their delicious account.
I downloaded Yahoo's YOS Social SDK then began modifying the oauth sampleapp.php. It basically handles the oAuth process by creating a login link that sends you to Yahoo to grant p... | stackexchange/codereview |
I have an Android service that's responsible for firing notifications at certain points in time. I use an android.OS.CountdownTimer for this. An activity creates and starts the service. If the phone is locked, notifications that are within let's say 1min are shown. Notifications that are much later are never shown. The... | stackexchange/codereview |
Suppose I have defined a unit of measure:
[<Measure>] type Blob
And I want a type that takes a value in Blobs per second as a constructor argument:
type Something(flowRate:double<Blob/s>) = ...
F# throws a wobbly on this - "double does not expect any type arguments, but here is given 1 type argument"
I understand the m... | stackexchange/codereview |
I'm looking to do recuring billing with Paypal and Rails 3. I like the process with Express Checkout, where the customer goes to paypal to enter details, but confirms on my website.
I've looked into ActiveMerchant, however their support for Recuring billing with Paypal Express Checkout isn't there.
How might I go about... | stackexchange/codereview |
I'm migrating from weblogic (struts extension) to JSF2.
I wonder how can I navigate form one bean action to another bean action.
In weblogic, I would create and initialize form bean and I would return new Forward pointing to another action.
How can I do the same in JSF?
| stackexchange/codereview |
Hope someone helps me with this
If CallbackHandler.proxy is static, then everything works fine:
using System;
using System.ServiceModel;
namespace ConsoleApplication5
{
// Define class which implements callback interface of duplex contract
public class CallbackHandler : ServiceReference1.IStockServiceCallback... | stackexchange/codereview |
I'm trying to use the Earley parser in NLTK to parse sentences such as:
If date is before 12/21/2010 then serial = 10
To do this, I'm trying to write a CFG but the problem is I would need to have a general format of dates and integers as terminals, instead of the specific values.
Is there any ways to specify the right... | stackexchange/codereview |
I updated to Ext 3.3 and suddenly my GridPanel's column "width" and "hidden" settings are not restored anymore, they remain at their default settings. I use the most recent version of the Buffering Http Provider. I don't really know the reason of the fault, if it's because of this State Provider implementation or the u... | stackexchange/codereview |
I've been getting lots of connection pool timeouts in my ASP.NET MVC project. I've been reading that even though Linq-to-SQL should be disposing for me it doesn't always work and also that not manually disposing anything that inherits IDisposable is bad practice.
I'm using the repository pattern that all my Linq-to-SQL... | stackexchange/codereview |
Before python 3, I used bisect to insert user-defined objects into a list. bisect was happy with this because my user-defined object had a def __cmp__ that defined how to compare the objects. I've read the rationale for not supporting cmp in python 3 and I'm fine with that. I thought a fix for my old code would be t... | stackexchange/codereview |
Is there a good tool for writing JSON specifications?
I'm looking to improve my internal team's documentation capabilities, and at the same time generation validators (which could be throw into CouchDB view).
| stackexchange/codereview |
I have one problem with one SP, when I am joining some specific tables, I am getting less data from the SP then I am getting when they are not included in the SP.
I am not getting any data from them yet, I am just joining them and only that makes the SP to send me less data.
Any idea what the problem can be? Thanks
| stackexchange/codereview |
Can you share your thoughts how would you implement data versioning in MongoDB. (I've asked similar question regarding Cassandra. If you have any thoughts which db is better for that please share)
Suppose that I need to version records in an simple address book. (Address book records are stored as flat json objects). I... | stackexchange/codereview |
Instead of starting from scratch, I was wondering if there were any ready made iPhone functionality for presenting a store's item lists (small picture and main info) and detail pages (all images and full info).
All data is already stored in an online database and setting up Web Services or the like for communication is... | stackexchange/codereview |
I have at my disposal PHP, MySQL and a Linux server.
The site I'm creating for a client should have a back-end manageable photo gallery.
I am planning to create it fully in MySQL, meaning I would have a table containing a mediumblob that would contain the binary data of the picture. This would allow me to have everythi... | stackexchange/codereview |
we have the following problem. We have several sorts of documents (txt, xsl) to transform them into output files (txt) accordingly to some rules. Now it's done by stupid hardcoding but we prefer to use some templates or rules-defining files (in xml format for example). The problem is we have assumption that creating of... | stackexchange/codereview |
As You may know, there are higher order functions in OCaml, such as fold_left, fold_right, filter etc.
On my course in functional programming had been introduced function named fold_tree, which is something like fold_left/right, not on lists, but on (binary) trees. It looks like this:
let rec fold_tree f a t =
matc... | stackexchange/codereview |
The following query is given in a PL/SQL procedure.
SELECT e.data FROM extra e WHERE e.external_id in
(SELECT * FROM TABLE (p_external_ids)).
The type of p_external_ids is create or replace type "VARCHAR2TABLE" as table of VARCHAR2(4000 CHAR).
Oracle inefficiently executes the query using a full table scan. Hints ... | stackexchange/codereview |
I have an event handler, which I want to be handled in the original thread where the object was created, so that it doesn't block. With forms, it's easy to use InvokeRequired to force it to the original thread. But how do you do this if your class is not a Form?
Thanks,
PM
| stackexchange/codereview |
Okay, so I have a shopping cart problem.
I've decided to roll out my own cart, which is alot easier than I had expected. BUT, I've run into a problem and cannot for the life of me figure out what to do next.
The problem:
After adding products to the cart, the user is taken to a "checkout" page, where they edit the quan... | stackexchange/codereview |
I am writing an ipad app that I have locked the orientation to landscape mode for.
I want to have a PNG file that is 100 pixels high but 4 times the width of the ipad screen.
What I want is this background image to be shown on the screen then automatically begin
scrolling on a timer. I have made sure the start and end ... | stackexchange/codereview |
I have been using google maps in my application for some time. The application allows users to write a review for somewhere they have visited. They can add a location to the review, and view the place the wrote their review as an overlay showing the other reviews in the area.
I want to allow a user to syncronise with t... | stackexchange/codereview |
I'm working on my homework and am having trouble figuring out the correct syntax for the "NOT IN" functionality.
The database is a small insurance database (carriers, members, employers, plans) made up for this assignment. I am supposed to "List ALL carriers and the count of plans they have. (use either the right or le... | stackexchange/codereview |
I'm trying to use the OpenLayers JavaScript library to load a number of KML files to a map. I can load all of the KML without a problem, but now in trying to retrieve data from the OpenLayers.Layer.Vector object being generated I'm running in to an issue.
If I output the generated object with console.log I can see the... | stackexchange/codereview |
What does CAxControl::FinalRelease mean and how do I suppress it? It's written to standard out when my Windows Form containing a Web Browser control closes.
| stackexchange/codereview |
Possible Duplicate:
Sort array by object property in PHP?
I've got an array of instances of the same class, each contains a variable with a different number. I'd like to sort (ascending) by the number inside of a class, but I don't know of and can't seem to find a decent sort method for something like this... do I n... | stackexchange/codereview |
For example,
class Foo
{
private static $my_static;
public static function staticValue() {
if (self::$my_static === null) {
self::$my_static = 'foo';
}
return self::$my_static;
}
}
The first call of Foo::staticValue() will set $my_static to foo, and the subsequent calls... | stackexchange/codereview |
The following function is from a PEAR script called File_CSV_DataSource, and is a CSV parser.
CSV file is this:
name,age,skill
john,13,knows magic
tanaka,8,makes sushi
jose,5,dances salsa
The current output of this function is like this:
array (0 => array ('name' => 'john','age' => '13','skill' => 'knows magic',),1 =>a... | stackexchange/codereview |
I came across wapache (http://wapache.sourceforge.net/) sounds like a very interesting project. But the development seems to have stopped on this one ... Does anyone know a stack which has apache webserver with controllable (at least partially) browser ?
Thanks
| stackexchange/codereview |
I have some code as such to submit multiple forms on my page at once:
$('.photo-edit-form form').ajaxSubmit({
success: function() { console.log('success'); },
error: function() { console.log('error'); }
});
However, no matter how many forms I have, I only ever get one success print out. I've found that I can... | stackexchange/codereview |
I updated from 2.3.3 to 2.3.5 for the string to array bug, and now when I try to call Model.image.reprocess! I get the following error. Is this something in my code or something in paperclip? Or maybe in the image I'm uploading?
"\xFF" from ASCII-8BIT to UTF-8
/home/brian/.rvm/gems/ruby-1.9.2-p0@sp/gems/paperclip-2.3.5... | stackexchange/codereview |
a standard loop in Excel VBA goes like this:
dim i as integer
for i = 1 to 100
<do program>
next
end sub
Now, my question is: how can I use the counter, i, as an argument in the program?
example:
dim i as integer
for i = 1 to 100
If Range("Ci") = 0 Then
Rows("i:i").Select
Rows.Delete
next
end sub
| stackexchange/codereview |
is it possible to have a cross-platform way to handle backspace and arrows keys within a C or OCaml program?
Actually an OCaml solution would be appreciated but many standard unix functions are wrapped directly to corresponding API calls so there's should be no problem in porting a C solution.
What I'm going to achieve... | stackexchange/codereview |
I am attempting to solve a problem from topcoder.com and it's driving me crazy. I am learning C++ after a long break from C and am having trouble with strings.
The purpose of the program is to decode a string of 0s and 1s that has gone through an encryption algorithm that consists of adding each adjacent digit to the d... | stackexchange/codereview |
A friend was telling me the other day that there is a pyramid for the costs of fixing a problem in the software development life cycle. Where could I find this?
He was referring to the cost of fixing a problem.
For example,
To fix a problem at the requirements stage costs 1.
To fix a problem at the development stage ... | stackexchange/codereview |
In Ruby, if I were to loop over a collection, how many times would Ruby evaluate the enumerated collection?
Specifically, I'd like to sort a collection, and loop over the sorted collection. Since I have no need for keeping a copy of the sorted collection around, I figured I'd just write the loop as:
for item in @items.... | stackexchange/codereview |
Here is my code with the corresponding output
> tkplot(g.2,vertex.label=nodes,
+ canvas.width=700,
+ canvas.height=700)
[1] 6
> ?tkplot
Warning message:
In rm(list = cmd, envir = .tkplot.env) : object 'tkp.6' not found
I get this error no matter what command I run after building and viewing my plot.
This may be o... | stackexchange/codereview |
I have a winforms form in which I use a MediaElement. Everything is working (more or less) perfectly. The only thing is, after loading a media file (mp3) accessing NaturalDuration.TimeSpan.TotalSeconds throws an exception
InvalidOperatoinException: A TimeSpan property can not be returned for a duration value of automa... | stackexchange/codereview |
I used a static library provided by a client, and the library is not named as "lib*.a", then how to use it when I compile.
I tried to add it as library(similar to "-l*"), but then I got -l* not found, I guess it's because it tried to find a "lib*.a".
Then I put the file name with it's absolute path in the command lin... | stackexchange/codereview |
Is there a mocking/stubbing framework for Common Lisp?
EmacsLispMock looks great, but it is an Emacs lisp framework, and I'm looking for something to use from Common Lisp.
Any suggestions?
| stackexchange/codereview |
I'm trying to display the less-than sign using MathJax to render MathML input... currently working on Firefox but will be expanding to other browsers. I have tried displaying the sign in different variations:
<
<
<
But I get the following error:
Error parsing MathML: not well-formed Line Number 18, Column 1... | stackexchange/codereview |
I have a Rails app where I load up a base HTML layout and I fill in the main content with rows of divs from JSON. This works in 2 steps:
Render the HTML
Ajax call to get the JSON
This has the benefit of being able to cache the HTML layout which doesn't change much, but it seems to have more drawbacks:
2 HTTP reques... | stackexchange/codereview |
I wrote my own settings manager, serialization is provided by BinaryFormatter. It is cool becouse, it can load and save class with missing/added property and I can define default value in missing property. But I have problem to test it with unit test.
I am doing this by myself. How to do this scenario automatically?
W... | stackexchange/codereview |
How can I remove certain items of an array?
Let's say I have an array with 10 elements, I want to remove elements at index 0, 3, and 8.
| stackexchange/codereview |
I am not sure what I am doing wrong here. I find many examples that show that I am doing this right and it is really basic stuff, I know.
I am simplyfying a bit, but I have two models, 'Post' and 'Category'. I am trying to get the list of categories from the database and list them by name.
class Post < ActiveRecord::Ba... | stackexchange/codereview |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.