instruction_seed stringlengths 1 35.8k | _source stringclasses 1
value |
|---|---|
I have a program I am writing that lists 100,000 prime numbers. It works fine for 10 numbers, but after so many numbers they turn into negative values. I changed the ints to long ints and that did not change anything, then I changed them to doubles and I get the error listed in the title. What should my variable be?... | stackexchange/codereview |
I'm trying some GUI development in Java and when I added the following code, I got a runtime error during initialization of the class:
public class Search_Album_Main_Tab extends JPanel{
JComboBox search_list;
JTextArea searched_data;
JButton search_button;
Results_Main_Tab rmt;
Search_Action... | stackexchange/codereview |
I've seen some people writing Python code by creating one class and then an object to call all the methods. Is there any advantage of using classes if we don't make use of inheritance, encapsulation etc? Such code seems to me less clean with all these 'self' arguments, which we could avoid. Is this practice an influenc... | stackexchange/codereview |
is there anything in the boost which could help to get a number of members in enumeration?
e.g. to return 3 for the following code:
enum SomeEnum
{
One,
Two,
Three
}
| stackexchange/codereview |
The following code compiles on VS Express Edition 2008, yet I get the following errors when trying to debug/release:
1>Linking...
1>MSVCRT.lib(crtexew.obj) : error LNK2001: unresolved external symbol _WinMain@16
1>E:\Documents and Settings\Administrator\Desktop\Proyecto 2 gràficas\testing\Release\testing.exe : fatal er... | stackexchange/codereview |
actually i am using late-binding in delphi, and i need to know wich is the proper way to work with it.
My principal concern is about how I handle the memory used by these objects, I must free the memory?
check this sample code
var
chEaten: Integer;
BindCtx: IBindCtx;
Moniker: IMoniker;
MyObject:: IDispatch;
... | stackexchange/codereview |
Say I have two classes:
class A(db.Model):
class B(db.Model):
a_reference = ReferenceProperty(A)
I can now do the following:
a = A()
a.put()
b = B();
b.a_reference = a.key()
b.put()
The documentation states the following two things:
The ReferenceProperty value can be used as if it were a model instance, and t... | stackexchange/codereview |
I'm fairly new to database management and this question never seems to be answered in more than one sentence. All other SO answers say "A candidate key is a minimal super key." That means nothing to me.
A candidate key is supposed to specify uniqueness of a db record, correct? And a primary key is a candidate key. If a... | stackexchange/codereview |
We build the application once, and then deploy it to multiple sites. I can install it from any of the deployed servers, but I cannot have it installed from multiple at the same time. I understand that this is a limitation of ClickOnce. Is there any way to trick ClickOnce into allowing this to work? Or any site-spec... | stackexchange/codereview |
I want to make a program that reads a serial port (V.24).
with the info from the serial port I need to split a string up, and add it to a MySQL database.
I don't know C very well, so I need some help with what functions I should use
The program has to run under windows XP, and I have to make it an service.
thanks,
Seba... | stackexchange/codereview |
Transitioning from C++, I am now learning the dark art of C and have developed the following code to replace my need for templating. In the bottom example, I have implemented your garden-variety Node structure in such a way that it can be used to store any data type. Consider the following...
// vptr.c
#include <stdio... | stackexchange/codereview |
I know its strange what I am doing but I want this to work. I am going wrong somehwere I feel.
I have a DataTemplate defined in my resources as follows :
<UserControl.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="../ParameterEditorResourceD... | stackexchange/codereview |
I want to ask is there a library or assembly to access seral port to write on it using c#?
| stackexchange/codereview |
I have this code for on ASP.NET MVC website:
x.For<AccountController>().TheDefault.Is.ConstructedBy(() => new AccountController());
This code throws a warning which seems quite self explanatory but for some reason when I use the "Use" method it doesn't seem to work. I know I am doing something wrong and would apprecia... | stackexchange/codereview |
I am wanting to calculate total elevation loss and gain at the end of recording Core Location data. I am having a hard time thinking of the math for this one.
Say if I started at 600 feet and I go up and down during the tracking, how would I calculate my elevation gain and loss?
Ideas?
| stackexchange/codereview |
All I want to do is mix three RSS feeds into one, remove duplicates (based on the title) and sort the items by date of publish. So I built this pipe (http://pipes.yahoo.com/nerdvanagr/olympiacosbc) which is just refusing to work: As you can see, for example, the 4th and the 7th item have almost exactly the same title s... | stackexchange/codereview |
In our customized C# logging system, we use streamWriter = File.CreateText(fileNameStr); to create a file and open a stream for write.
Now we want to monitor the file size to see if it reach the max required size. What I did is the following:
create a FileInfo object for about file: currFileInfo = new FileInfo(fileNa... | stackexchange/codereview |
My question in brief here:
The site is developed with PHP as front end and mysql as backend.
I am registering in my site by entering the arabic letters. And the value also inserted in mysql database. But it is not in the format what i entered. It looks like junk words.
Now my problem is when i try to login i can't able... | stackexchange/codereview |
I have a UIImageView in Interface Builder connected to an outlet called imageView. The statement
[imageView setImage: [UIImage imageNamed: @"xxxx.png"]];
displays an image successfully if placed in viewDidLoad, but NOT if placed in an action method in the same view controller. There's an NSLog in the action method so ... | stackexchange/codereview |
I was wondering if there is a way I could hook the windows processes to check if any suspicious programs are running like (Wireshark, Fiddler, OllyDBG, etc).
I want to hook the windows processes so it will close the client or pop-up a message in real time when it detects a unwanted process.
If you guys can provide me w... | stackexchange/codereview |
I know that PHP5 will let you iterate through a class's properties. However, if the class extends another class, then it will include all of those properties declared in the parent class as well. That's fine and all, no complaints.
However, I always understood SELF as a pointer to the current class, while $this also ... | stackexchange/codereview |
I need a playlist that's editable from multiple computers. It can be <table> or <ol> but you must be able to drag rows around. This gets sent to the server, which pushes it down to everybody, so I need updates without reloading the page.
I never worked with JavaScript before, but it all seems doable with http://jqueryu... | stackexchange/codereview |
In the sidebar of the php web manual, link text the addChild method uses the :: scope resolution operator, but in the example it uses the Arrow operator. Can anyone tell me why that is?
| stackexchange/codereview |
hi friends i want to pop up a button from the bottom of my screen when the default menu button is pressed on the android key pad. i want to navigate from that pop button to other screens.
| stackexchange/codereview |
I am tryng to write a multibinding converter for a navigation model where I load pages into a frame when any listboxitem is selected from two listboxes. At the same time, I need to be able to navigate with Back/Forward buttons from the navigation class and being able to show listboxitem in selected state if its UriSour... | stackexchange/codereview |
I am attempting to implement the BlueprintCSS grid framework in my app and after including the scripts it calls for my links are rendering weird. I have it narrowed down to the print.css. was wandering if anyone has run across this before.
Here's what renders
Logout (javascript:__doPostBack('ctl00$LoginStatus1$ctl00',... | stackexchange/codereview |
The introduction to QUnit over at netTuts.com spawns an interesting exchange (never resolved) over how to apply unit tests against actions that manipulate the DOM. The following quote (Alex York) gets to the crux:
What would be nice is that if you had
a function like this:
function add(a, b) { var result = a +
b;
... | stackexchange/codereview |
I'm trying to make a stripped-down user sessions system, and tried to model it to be similar to authlogic.
class UserSession
attr_accessor :username
def initialize(params={})
@username = params[:username]
end
def new_record?
true
end
def self.find
return nil if session[:username].nil?
Use... | stackexchange/codereview |
I have three class ClassA , ClassB, ClassC. All the three classes implements "ClassInterface" interface .
class ClassA<T> implements ClassInterface<T>{}
class ClassB<T> implements ClassInterface<T>{}
class ClassC<T> implements ClassInterface<T>{}
I have method in other class ClassD:
void methodname(ClassInterface<... | stackexchange/codereview |
EDIT
The use of the phrase "bad at XML" in this question has been a point of contention, so I'd like to start out by providing a very clear definition of what I mean by this term in this context: if support for standard XML APIs is poor, and forces one to use a language-specific API, in which namespaces seem to be an a... | stackexchange/codereview |
Please consider the following table 'mmm':
select * from mmm;
Output:
+-------+-------+------+
| texto | value | n |
+-------+-------+------+
| aaa | 10 | 1 |
| aab | 10 | 1 |
| aaa | 11 | 1 |
| aab | 11 | 1 |
| aaa | 10 | 2 |
+-------+-------+------+
The c... | stackexchange/codereview |
Details on the packages/types is in the Scala API documentation on scala-lang.org. But that's organised by class and I (as a Scala neophyte) find it difficult to locate the exact data type I need and work out what operation are supported on what (especially in the huge and powerful scala.collections.* tree).
Is there a... | stackexchange/codereview |
I'm currently developing a chrome extension, I need to access some http-auth protected resources (webdav). The HTTP auth is using (in the best case) a digest authentication.
I'm able to do the auth directly in the ajax request using the https://login:password@domain.tld/path/to/ressource form.
The issue is : if the log... | stackexchange/codereview |
I have a list of items that I want to insert into the database but I do not want any duplicates. So I delete all the items and reinsert all. It's not the most efficient way but it's not many items so it works for me. But I get syntax error near "Insert". I do the following:
DELETE FROM Settings WHERE Type = 'Extensions... | stackexchange/codereview |
I have a django model with a DateTimeField called when which I want to match against a Date object. Is there a way to do that in django's queryset language better than
Samples.objects.filter( when__gte = mydate, when__lt = mydate + datetime.timedelta(1) )
| stackexchange/codereview |
//CCodeWrapperIF.h
public ref class CCodeWrapperIF
{
public:
CCodeWrapperIF// Default constructor
public:
static UINT8 funny;
void foo(void);
}
//CCodeWrapperIF.cpp
extern "C"
{
#include "CCodeWrapperIF.h"
}
[DllImport("CCode.DLL", CallingConvention = CallingConvention::Cdecl)]
extern "C" void CCode_Foo(v... | stackexchange/codereview |
I'm building a shopping cart page that could potentially contain dozens of separate items. Each item has a collapsible panel that contains several form elements that can be used to customize it. Most of the cart is wrapped in an UpdatePanel so that I can avoid a full postback when the user makes changes. When there are... | stackexchange/codereview |
I'm trying to sort an array least to greatest and i am really lost....
Here is what i have so far:
int temp, temp2;
for (int x = 0; x < array_size; x++)
{
temp=a[x];
for (int i = 0; i < array_size; i++)
{
if (a[i] < temp)
{
... | stackexchange/codereview |
i have this select box that users can use to choose an option, but im stuck on how i can process it with php and insert the value in mysql:
<select name="vote[]">
<option value="support">I support this</option>
<option value="against">Im against this</option>
<option value="dont">I want the audience to decide!</o... | stackexchange/codereview |
a minor question but it's driving me nuts. I'm programatically generating about 50 DDLs based on a database schema (i.e. item 1 can do a,b,c item 2 can do d, e, a, etc etc).
If I was just writing the markup, I could specify:
asp:DropDownList
OnSelectedIndexChanged="funTimes"
and be done with it, unfortunately, I'm ju... | stackexchange/codereview |
I'm trying to work out why memory usage in a basic application I'm writing is excessive. I'm trying to create a dynamic MVC sitemap with about 25000 nodes and populating it from a database table using the entity framework (though this detail is probably not important)
I have the following code:
foreach (var c in conte... | stackexchange/codereview |
I am running Rails 3 and Passenger 2 and I don't know why but my page is still cached despite having this configuration (in one of my virtual hosts):
<VirtualHost *:80>
ServerName railstut.dev
ServerAlias *.railstut.dev
DocumentRoot "/home/ygamretuta/dev/railstut/public/"
RailsEnv "development"
<Di... | stackexchange/codereview |
This should be simple but I can't find any examples. I have standard functional tests in my rails 3 application (descending from ActionController::TestCase) that look like:
test "see if 1+1=2" do
....
end
and at the top I have a setup method:
setup do
......
end
How do I exclude a method? I.e.
setup :except => "se... | stackexchange/codereview |
Can I play a m3u8 file on a BlackBerry? I have a m3u8 file on my server and would like to stream it to my BlackBerry.
| stackexchange/codereview |
I am trying to use Linq to Xml and Xaml data binding in a Windows Phone app with no luck, following this example.
I've got some Xaml that looks like this:
<Image
Source="{Binding Path=Element[image].Value, Converter={StaticResource UriBitmapConverter}}"
Grid.Column="2" MaxWidth="75" Horizont... | stackexchange/codereview |
There's a bug in OS 4.1 that has broken location services for some iPhone apps ( https://devforums.apple.com/message/306250 ). Basically location services fails to turn on, and doesn't even ask the user for permission to get their location. The worst thing about the bug is that it doesn't occur when you're installing t... | stackexchange/codereview |
I'm building an app where my users will post content. The exact time of the post is an important data point - I need to know exactly when the user hit the "Post" button. Once the post has been captured I'll upload that posting to my web server. My app should still work in offline mode, meaning when there is no inter... | stackexchange/codereview |
Someone has inadvertently renamed a file in an SVN working copy by deleting the old one and adding the renamed file, instead of using the proper SVN rename command. Changes have continued to be made to the new file, but unfortunately the history is now broken. Unless you know where to look, you wouldn't even know that ... | stackexchange/codereview |
How do I pass a variable into a URL in a Perl script?
I am trying to pass the variables in an array to url. For some reason it is not working. I am not sure what I am doing wrong. The code roughly looks like this:
@coins = qw(Quarter Dime Nickel);
foreach (@coins) {
my $req = HTTP::Request->new(POST =>'https://url... | stackexchange/codereview |
I'm having a really confounding problem using Core Data. In my Core Data store, for an existing Core Data object, I'm checking whether a relationship exists, and if not, I create the object like so (this is a method on AFFingerprintGeneratorOperation):
NSManagedObjectContext *newContext = [[NSManagedObjectContext allo... | stackexchange/codereview |
I'm trying to POST a JSON object to a controller in Spring 3.
I'm getting the following error:
2010-10-20 17:59:14,391 DEBUG [org.springframework.web.servlet.DispatcherServlet] Could not complete request
org.springframework.http.converter.HttpMessageNotReadableException: Could not read JSON: Unrecognized token 'tilI': ... | stackexchange/codereview |
I have a SPROC that runs every hour. This SPROC calculates the popularity of a users artwork and updates the popularity column on the main artwork table. This is the same table where users are writing to it each time they upload a new artwork.
The problem is, this sproc keeps getting deadlocked with another transaction... | stackexchange/codereview |
Why isn't 0f treated as a floating point literal in C++?
#include <iostream>
using namespace std;
int main(){
cout << 0f << endl;
return 0;
}
Compiling the above gives me
C2509 (syntax error: 'bad suffix on number')
using VS2008.
| stackexchange/codereview |
I am aware that I cannot actually distribute an app that is not compile with the latest version, but I cannot upgrade my Mac now for some driver compatibility issue.
So, for the time being, is there any way to do actaully code and test an iphone app in plain old leopard? I cannot find what I need to download in the dev... | stackexchange/codereview |
When we use the method jQuery.Val( value ) over a DOM element to change its value.
Shouldn't the element dispatch an event informing that its value has changed? -I though the event 'change' was going to be dispatched.
If it shouldn't why?
Live Demo
| stackexchange/codereview |
Someone has given me the following C++ code snippet to try out - and now I have lost contact with them (its a long story). Anyway, it won't compile - I get an error
error C2512: 'mstream' : no appropriate default constructor available
Can anyone explain why, and what is needed to fix it.
class mstream : private ostr... | stackexchange/codereview |
How do I get PermGen space error on running Jboss 5.1.0 as a service on Windows machine?
| stackexchange/codereview |
I have two tables one called Point and other called Poly i have around 400 polygons in the Poly table and around 200 thousand points in Point table. what i wanted is to find how many points are there in a certain polygon. The query i am using is:
select COUNT(*) from point p
inner join Poly pl on pl.GeoDataID = 101 an... | stackexchange/codereview |
I have a problem which has received plenty of attention which, despite much googling, I have been unable to resolve. I have a Test Project attached to my Visual Studio 2010 MVC 2 Application. When I attempt to run my tests, I get:
"no tests were run because no tests are loaded or the selected tests are disabled."
Fol... | stackexchange/codereview |
This is the view of a table that I have:
<% @campaign_events.each do |campaign_event| %>
<% model_name = campaign_event.class.name.tableize.singularize %>
<tr class="<%= cycle('oddrow','evenrow') %>">
<td><%= link_to campaign_event.title, send("#{model_name}_path", campaign_event) %></td>
<td><span cl... | stackexchange/codereview |
I have a Perl module that matches text against a list of hundreds of regexes; currently I am just or'ing them:
if (
/?:re1/ or
...
/re200$/
) { return "blah"; }
Is there a better/faster/less resource-intensive way to do this? Perhaps a useful module exists, or I should store them in a hash, etc.
| stackexchange/codereview |
I'm sure a lot of people around here tried Rainmeter or Google desktop. They are nice but I never felt comfortable using them on my desktop, either because they ate too many space or aren't much flexible in terms of settings and stuff that can be grabbed from the Webs.
So I thought I'd make my own personal tools.
It's ... | stackexchange/codereview |
We have implemented webservices on Weblogic 10.3.
I am trying to test the webservices using the SOAP UI client (soapui.org).
but I get following error message:
Error 401--Unauthorized
Error
401--Unauthorized
From RFC
2068 Hypertext Transfer Protocol --
HTTP/1.1: 10.4.2
401 Unauthorized The reque... | stackexchange/codereview |
I would to block child classes from overriding a base method and have the child classes override a new method in a parental class. In other words, a child class of the base class blocks the base class methods and delegates to a new method that further child classes must override. I still want the base class method to... | stackexchange/codereview |
From http://www.tizag.com/mysqlTutorial/mysql-php-sql-injection.php I got:
SQL injection refers to the act of
someone inserting a MySQL statement to
be run on your database without your
knowledge. Injection usually occurs
when you ask a user for input, like
their name, and instead of a name they
give you a... | stackexchange/codereview |
I am considering whether it is better to have two pointers, one for each object sub class and super, or whether I should just use casting.
How much system resources does this use:
objectName.functionOne();
((SubClass) objectName).functionOther();
Is it better than:
SuperClass objectA = (SuperClass) getSameInstance();
... | stackexchange/codereview |
I have the following model, Purchase, on my Rails app:
class Purchase < ActiveRecord::Base
[...]
belongs_to :payment, :validate => true
belongs_to :day, :foreign_key => :day_day, :primary_key => :day,
:counter_cache => true
[...]
end
And I have the Day model:
class Day < ActiveRecord::Base
[...]
has_m... | stackexchange/codereview |
I have a app where in once I tap on a textfield it slides on top of keyboard.
My scrollview is bouncing back when I scroll down my content. iPhone documentation says "by default, it “bounces” back when scrolling exceeds the bounds of the content."
Any clue how to get rid of this? Should I increase the content size of ... | stackexchange/codereview |
I have 3 views and the first view has a motion background (sequence of pictures), music, and two buttons. When I push either button it crashes. I have a feeling its a memory problem but I'm not sure how to fix this. I'm rather new to Xcode.
| stackexchange/codereview |
I have a table of 50 odd rows with 11 columns. Each row has a unique id made up of id="row_<clientid>_rownumber". There is a checkbox in the second column with id="group_<clientid>_<petid>_rownumber"
Redacted Screenshot http://www.forsythesit.com.au/res/img/slowrowremoval.jpg
When the user clicks a checkbox I want to r... | stackexchange/codereview |
HI all! I am using message deleteCharactersInRange from NSMutableString. And there is a problem that this finction deletes range in a wrong way.
Here is a sample of code that works wrong:
-(void) btnClick
{
NSRange deleteRange = NSMakeRange(0, 1);
[valueStr deleteCharactersInRange:deleteRange];
[self ShowNumber];
}
I h... | stackexchange/codereview |
CKeditor's installation instructions tell me to just unzip the whole distribution file on my webserver's production directory. But it is full of files I definitely don't want there, like source code, examples, and even server-side code in PHP. I got rid of most of these files but there is one I'm not sure about: conten... | stackexchange/codereview |
I have a mysql DB with a table that holds version information for multiple other tables. In order to link to the same family of versions I have a version_master table that holds a primary key to the family of versions that the link refers to. I was wondering if there was a more elegant solution without the need for a v... | stackexchange/codereview |
I am just diving into Heroku and have hit a bit of a snag. Whenever I attempt to create my database I am getting the following error.
$ heroku rake db:migrate
rake aborted!
no such file to load -- tasks/rails
/disk1/home/slugs/274236_54c3556_0822-55414a07-d565-459a-9412-67cc0e995790/mnt/Rakefile:10:in `require'
(Se... | stackexchange/codereview |
What is the standard way to do BDD in VS2010?
| stackexchange/codereview |
I'm working with some log files that are very poorly formatted, the column delimiter is an item that (often) appears within the field and it isn't escaped. For example:
sam,male,september,brown,blue,i like cats, and i like dogs
Where:
name,gender,month,hair,eyes,about
So as you can see, the about contains the column ... | stackexchange/codereview |
I have this code:
<meta http-equiv="content-type" content="text/html; charset=<?php echo $stigConfig['charset']; ?>" />
How can this line of code make my full page reload twice?
I've been looking through all over my site. Finally after 2 days, I narrowed the cause down to deleting this line. My site no longer runs its... | stackexchange/codereview |
I read somewhere that organizing HTML attributes in a certain order can improve the rate of compression for the HTML document. (I think I read this from Google or Yahoo recommendation for faster sites). If I recall correctly, the recommendation was to put the most common attributes first (e.g. id, etc.) then put the re... | stackexchange/codereview |
OK, so here was my original problem. You don't have to read it but in case it helps: Firefox thinks <fieldset> is a form element; Chrome doesn't
Basically, Firefox and IE count the fieldset in my HTML as an element in my array, and that screws everything up. But Google Chrome does not count the fieldset as an array ele... | stackexchange/codereview |
If I added a user-defined setting in my build configuration, how can I read that setting in my Objective-C code?
I have two files in my project, debug.plist and release.plist. I want my MainApp.m file to read one of these files based on which build configuration is running. I set up a user-defined setting named "filena... | stackexchange/codereview |
I'm trying to make this piece of code work.
<form name="myform" onsubmit="alert('1');"> </form>
<a href="javascript: void(0);" onclick="document.myform.submit();">ok</a>
However nothing happens when I click "ok". Where have I mistaken?
| stackexchange/codereview |
Has anyone successfully complied the Apache FOP v1.0 library to a .NET DLL? I am using the IKVM syntax found at http://onjava.com/pub/a/onjava/2004/08/18/ikvm.html; however, the compiled DLL seems to be incomplete. For example, I cannot instantiate FopFactory object as:
using org.apache.fop.apps;
namespace Utils
{
... | stackexchange/codereview |
I'm not sure how to better phrase this question so it's possible I missed a previously asked question. Feel free to close this and point me to the correct one if it exists.
I have a table with two important columns (that is to say it has much more but only two is pertinent to this question). First column is a GUID (an ... | stackexchange/codereview |
Is there a method for jinja2 to raise an exception when we pass a variable that is not present in the template?
PS: This is different(or opposite) from raising an exception when a variable is present in the template but it is not passed. For this I use "undefined=StrictUndefined"
| stackexchange/codereview |
I need to insert data to a combobox so i do an append as defined in this lines :
fd = open(files,'rb')
data=fd.readlines()
for i in data[]:
item=i.strip()
if item is not None:
combobox.Append(item)
fd.close
Even data insert the selection still void
please can you tell me how to set a selection a value ... | stackexchange/codereview |
Hi In Android is it possible to switch focus back and forth between an open dialog box and the main view without closing the dialog box. The preferred method of switching would be to click on the unfocused view so that it obtains focus.
| stackexchange/codereview |
I'm develpoing a network app using Bonjour service on iPhone devices.
My problem is that NSStreamEventHasBytesAvailable event speed is slow when i enable WiFi and Bluetooth both on my devices.
But strangely if i enable only one either WiFi or Bluetooth, NSStreamEventHasBytesAvailable event speed is fast normally.
Is it... | stackexchange/codereview |
Is there a library (C# preferred) to resolve what I would call multi-level cascading JSON?
Here is an example of what I mean: (Pseudocode/C#)
var json1 = @"{
""firstName"": ""John"",
""lastName"": ""Smith""
}";
var json2 = @"{
""firstName"": ""Albert""
}";
var json3 = @"{
""phone"": ""12345""
... | stackexchange/codereview |
Hello i have this forum page on my website. I want when users leave comment, the old comments should be at the bottom and new comments at the top. Please can someone help me with that please? The code for that is below:
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrin... | stackexchange/codereview |
All,
As you know, by python iter we can use iter.next() to get the next item of data.
take a list for example:
l = [x for x in range(100)]
itl = iter(l)
itl.next() # 0
itl.next() # 1
Now I want a buffer can store *general iter pointed data * slice in fixed size, use above list iter to demo my qu... | stackexchange/codereview |
I'm developing a program in C that uses a lot of memory and I need to monitor it. I know Netbeans has this option but I need to do this in Solaris Studio.
Do you know of a graphical tool to view the usage of memory, CPU and if possible, I/O?
How do you usually do these things?
PS: I know valgrind can search for memory... | stackexchange/codereview |
If I am going to use postgres triggers in a rails app, I can use execute { create trigger } for creating a trigger in migration file. But where am I supposed to write these lines? createlang plpgsql databasename;
| stackexchange/codereview |
I am trying to save a BLOB created from an integer array (that is, a packed array of integers) in an SQLite DB. The script shown below gives the following traceback. As far as I can see from the Python 2.7 sqlite3 documentation, it should be possible to insert a buffer object into a table, where it is supposed to be sa... | stackexchange/codereview |
I have a class declaration in Utils.h:
class Utils {
private:
static boost::mutex outputMutex;
};
In the cpp file:
boost::mutex Utils::outputMutex = boost::mutex();
I get:
Error 1 error C2248: 'boost::mutex::mutex' : cannot access private member declared in class 'boost::mutex'
If we look inside boost/... | stackexchange/codereview |
This page I have been developing for my app has been working fine locally (using sqllite3) but when I push it to Heroku, which uses PostgreSQL I get this error:
NeighborhoodsController# (ActionView::Template::Error) "PGError: ERROR: column \"isupforconsideration\" does not exist\nLINE 1: ... \"photos\" WHERE (neighbor... | stackexchange/codereview |
Curently sqlite is writing journal file in the same directory where is placed database file. It makes a problem with the directory permission (it has to be writable).
Is there any method to force sqlite to write journal files in other directory?
| stackexchange/codereview |
I'm using Zend Framework and the URL View Helper to create URLs
I have some lines like this in my navigation:
$this->url(array('controller' => 'index', 'action' => 'index'))
$this->url(array('controller' => 'who', 'action' => 'view', 'id' => $row->who_id));
$this->url(array('controller' => 'projects', 'action' => 'view... | stackexchange/codereview |
I'm using Charles Proxy's handy Map Local tool to develop CSS documents. This way I can immediately see my edits without having to redeploy the whole thing which in the wonderful world of enterprise-level webapps saves a considerable amount of time.
I just discovered that Map Local doesn't work with the https protocol.... | stackexchange/codereview |
I am using a navigation view controller to handle two view controllers; one each for the landscape and portrait orientations.
Now, I need to set a propery belonging to the view controller A(for vertical) that pushed the view controller B (for horizontal), from the view controller B.
Is there any way I can achieve this?... | stackexchange/codereview |
I've successfully installed clojure-mode, slime, slime-repl within Emacs.
I start a swank server with "lein swank" and hang slime to it with "slime-connect". I can use the SLIME REPL to evaluating Clojure expression within the REPL.
How can I eval a single s-exp or a whole file (a.k.a I want to run a Clojure file withi... | stackexchange/codereview |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.