instruction_seed stringlengths 1 35.8k | _source stringclasses 1
value |
|---|---|
I have tried to get this to work a million times. I have lef it alone for a week and come back. I have Googled and read every post pertaining to this. I have let insecure morons belittle in messages groups without ever finding the answer. I just want this to work. When I am following along in part three of the the Djan... | stackexchange/codereview |
How do I get a reference to a "get"-function for a specific tuple instance?
My best try is given below but does not compile against g++4.5.1
#include <tuple>
#include <string>
typedef std::tuple<int,std::string> Tuple;
auto t=(std::string& (Tuple&))(std::get<1,Tuple>);
The compiler error is:
a.cc:5: error: invalid ca... | stackexchange/codereview |
Basically, I have created a custom post type and a custom taxonomy for that custom post. The custom taxonomy is hierarchical and the client plans on adding hundreds of categories. Because of this, they want the main page to display only the top level parent which is easy enough. However they want a drill down menu whic... | stackexchange/codereview |
Possible Duplicate:
py2exe - generate single executable file
Hi,
I have a python project and wanted to make a exe for windows.
In my project I am using pyqt,python and MiKTeX , xlrd.
How to bundle the project so that user in windows can run the exe and every package get install.
I am not able to find any reading ma... | stackexchange/codereview |
OGRE3D for example uses strings to identify objects, so each time the code does something on an object using its name (a string), it has to do string operations, and since a 3D engine is very sensitive on speed, how can it be a good way on doing it ?
When a computer has to do operations on a string, it does it sequenti... | stackexchange/codereview |
Here's the code snippet:
XDocument themes = XDocument.Load(HttpContext.Current.Server.MapPath("~/Models/Themes.xml"));
string result = "";
var childType = from t in themes.Descendants()
where t.Attribute("name").Value.Equals(theme)
select new { value = t.Attribute("type").Value };
foreach (var t in childType) ... | stackexchange/codereview |
My context is MSVC 6.
Starting with a successfully compiled program, with browse information built, I can go into a existing function and hover over a variable, and the IDE will show me the data type, and variable name. One could well imagine that the information is coming from the browse file.
In practice, If I crea... | stackexchange/codereview |
Window -> IFRAME -> DIV
I have a window, that has an iframe, that has a div. The div has the ability to scroll the content within but not having full control of the parent window, I have to decide how large the div needs to be from within the iframe.
To do this, I have the following code JavaScript (please pardon the... | stackexchange/codereview |
I know it is possible to use optional arguments as follows:
function doSomething($do, $something = "something") {
}
doSomething("do");
doSomething("do", "nothing");
But suppose you have the following situation:
function doSomething($do, $something = "something", $or = "or", $nothing = "nothing") {
}
doSomething("d... | stackexchange/codereview |
When I execute the following Common Lisp program by calling (play), I get the error: Argument X is not a NUMBER: Guess
;;;; number-game.lisp
;;;;
;;;; Andrew Levenson
;;;; 10/25/2010
;;;;
;;;; Simple number guessing game. User has
;;;; five guesses to determine a number between
;;;; one and one hundred, inclusive (1-10... | stackexchange/codereview |
So, I have a UIView with a UIWebView inside serving up a local HTML file (a document preview). I also have "Accept" & "Reject" UIButtons. I need these buttons to only appear after the user has scrolled to the bottom of the web page. Is there a way to capture an event for scrolling to the bottom of a UIWebView?
I h... | stackexchange/codereview |
I am crossposting this in the groups.google because I find it so very difficult to get answers on Three20
I can see from other posts that it is hard getting some newbie/starter help on Three20, but it is really hard to get started with Three20 with the lack of documentation and examples, so I will try :) Bear with me, ... | stackexchange/codereview |
I am using some jQuery to toggle the visibility of some div's. The toggle occurs on click and should only affect one div. The problem is that if there are multiple divs, they are all toggled on/off instead of just the one a user is trying to toggle. I think I need to use the 'next' function but can't get it working. ... | stackexchange/codereview |
I have an aspx webpage in which an user control is added dynamically as follows:
UserControl testUsrControl = LoadControl("TestUsrControl") as UserControl;
testUsrControl.ID ="test";
Then I tried adding an event handler of user control inside aspx like below:
testUsrControl.Drpdatafield_SelectIndexChanged += new Event... | stackexchange/codereview |
Assuming I have some data in the form of
Customer1
Name
Address
Order1
ID
Products
Product1
ID
Product2
ID
Customer2
...
Using the following class to represent it
class Customer
{
public String name { get; set; }
public String Address {get; set;}
public List<OrderInfo> Orders { get; set; }
}
... | stackexchange/codereview |
I have a database in SQL CE (sdf file) and I need to get all names of the tables.
How to do it?
| stackexchange/codereview |
I'm making a small program that uses a if else statement, but instead of using numbers to control the flow i want to be able to make the control work with with yes and no;
for example:
cout << "would you like to continue?" << endl;
cout << "\nYES or NO" << endl;
int input =0;
cin >> input;
string Yes = "YES";
string No... | stackexchange/codereview |
I made a new view by CCRC CLI. Now I'm trying to set a new tab for it inside the CCRC dashboard, under "My Views". Do you know how to?
Thanks!
| stackexchange/codereview |
they both seem to accomplish the same things with different syntax, whats the point of using two different technologies. Please highlight every possible benefit of using mxml. Also are there scenarios when one is more beneficial than the other and why.
Please clarify this runtime behavior of mxml vs AS3 as discussed in... | stackexchange/codereview |
I wan't developers who embed my webapp to be able to pass a param in the url like ?style=dark which will alter the css accordingly. Is there a better way to keep this setting as the user navigates than appending ?style=dark to all links?
I've considered cookies etc. but if one user is viewing two pages which embed my a... | stackexchange/codereview |
I have a Mercurial repository with four branches in it. One is the "common" branch, the other three are "specific" branches which consist of some cosmetic changes applied to the common branch. One of those cosmetic changes consisted of renaming some files.
So the common branch has "file.txt", and the first specific bra... | stackexchange/codereview |
I have a hierarchical MySQL table setup using the Nested Set model. I have created a stored proc which allows me to delete an organization.
When I try making consecutive calls to the stored proc, I get the following error referring to the second CALL command:
2014 - Commands out of sync; you can't run this command no... | stackexchange/codereview |
I want to prevent a specific record from being deleted. This trigger works fine for that specific record. However, other records still remain when they're being deleted. Why?
ALTER TRIGGER [Globalization].[CountriesTracker]
ON [Globalization].[Countries]
INSTEAD OF DELETE
AS
BEGIN
SET NOCOUNT ON;
IF ((Select CO... | stackexchange/codereview |
uTidylib is crashing and giving me a segmentation fault every time I try to use it.
Here's some info about the crash:
Process: Python [432]
Path: /System/Library/Frameworks/Python.framework/Versions/2.6/Resources/Python.app/Contents/MacOS/Python
Identifier: Python
Version: ??? (???)
Code... | stackexchange/codereview |
When I run my Clojure programs and get an error during execution, I notice that the message printed by the REPL only contains the top level line number from the script I executed. Can I get it to dump a call stack (which references the various line numbers of Clojure code)?
For example:
user=> (load-file "test.clj")
j... | stackexchange/codereview |
I have this weird gridview problem in .net, I haven't found what can be the issue so far.
Here is what is it about:
I have a stored procedure which is consumed by sqldatareader.
Then I do have reader read all the values and display from the stored procedure.
Problem is happening now. When I am entering some specific v... | stackexchange/codereview |
I have the model
public class PersonViewModel
{
public Guid Id { get; set; }
public string Firstname { get; set; }
public string Lastname { get; set; }
}
which is nested in an other view model:
public class ApprovalModel
{
[UIHint("MyDisplayTemplate")]
public PersonViewModel User { get; set; }
... | stackexchange/codereview |
What is the best solution so far for a strike out text on the iPhone?
I heard of multiple solutions:
Something with three20
Image as a subview
UIWebView
And something with a NSAttributedString, but I don't find a working example for that.
| stackexchange/codereview |
Tell me the easiest way to encrypt an XML file. It is a file used for some configurations and don't want people mucking around with it. Security is not an issue as it is a private tool.
| stackexchange/codereview |
See title. I'm using Code::Blocks. Googling results in info involving the sdl-config sh script, which I obviously can't use on Windows.
| stackexchange/codereview |
I'm not awfully knowledgeable about HTTP, but my understanding is that an HTTP request consists of a bunch of headers and then the body.
Is it possible for PHP to receive the request headers, make a decision based on what's been received, and then either abort the request or continue to accept the body?
This would be u... | stackexchange/codereview |
How do I express this in javascript?
9H squared plus
3H
all over 2
times L
I'm working on something like:
function calculator (height, len) {
var H = height, L = len;
total = (((9 * H)*(9 * H)) + 3*H)/2)*L;
return total;
}
calculator(15, 7);
I don't care if it's terse or not, but I'm not sure the best way to handle m... | stackexchange/codereview |
I am trying to create a jquery questionnaire but my little jquery knowledge doesn't help me.
What I have until now is the following http://valogiannis.com/stackoverflow/quest.html
When you click Questions a popup open with two questions.
I want the following: when the user click one of the two answer, the script check ... | stackexchange/codereview |
I'm learning Django and trying to get the hang of querying foreign keys across a bridging table. Apologies if this is a duplicate, I haven't been able to find the answer by searching. I've got models defined as follows
class Place(models.Model):
id = models.IntegerField(primary_key=True)
name = models.CharField... | stackexchange/codereview |
The divs below appear in that order in the HTML I am parsing.
//div[contains(@class,'top-container')]//font/text()
I'm using the xpath expression above to try to get any data in the first div below in which a hyphen is used to delimit the data:
Wednesday - Chess at Higgins Stadium
Thursday - Cook-off
The problem is I... | stackexchange/codereview |
I was browsing thru the docs of APC (Alternative PHP Cache) and I've seen that it has a function called apc_compile_file. The Docs say that this function is to:
Stores a file in the bytecode cache,
bypassing all filters.
Is this like HipHop's idea, to store PHP code in more optimized code? If is not, can someone ed... | stackexchange/codereview |
can anyone help me with this F# code? I am a F# beginner and I have a problem with it.
Big thanks
let rec rem l xs = match xs with
| [] -> []
| x::xs -> if x>l then rem l y
else x::(rem l y)
let rec minfree1 l:long xs = match xs with
| [] -> 1
| _ -> let nxs = rem xs l
let l1 = L... | stackexchange/codereview |
I'm looking to create a form in C# that cannot accept focus, i.e. when I click a button on the form, focus is not stolen from the application that currently has the focus.
See the Windows on-screen keyboard for an example of this. Note that when you click a button, the focus is not taken from the application you're cur... | stackexchange/codereview |
i read in some articles DAO is not mandatory with hibernate and its implementation is by "it depends", in other words, we can choose between ORM vs DAO pattern.
Ok, let's assume that i don't want use a DAO pattern, so im using only session CRUD and query operation provided by hibernate(my ORM).
Especially for the "sear... | stackexchange/codereview |
I am using fluent Nhibernate. This code Loads an instance of type T from the DB based on its ID.
public T GetById(IdT id, bool shouldLock)
{
T entity;
if (shouldLock)
{
entity = (T) NHibernateSession.Load(persitentType, id, LockMode.Upgrade);
}
else
{
... | stackexchange/codereview |
Say I have a template class that takes msgs from source, does something smart to them, and then sends them to a sink:
template <typename Source, typename Sink>
class MsgHandler
{
MsgHandler(Source* pSource)
: m_pSource(pSource)
{
m_pSource->setHandler(this);
}
};
//Now the definition of the Source:
template <typena... | stackexchange/codereview |
One of the new mechanisms available in JavaScript 1.7 is yield, useful for generators and iterators.
This is currently supported in Mozilla browsers only (that I'm aware of). What are some of the ways to simulate this behavior in browsers where it is not available?
| stackexchange/codereview |
I started out looking at the JAX-RS plugin for grails and thought that was the way to go mainly because it was based on JSR-311 and I figure following standards is usually the smart thing to do. However, using Grail's UrlMappings it seems I basically achieve the same thing. I figure I'm missing something, however, we... | stackexchange/codereview |
I'm trying to find a Selenium/PHP XPath for matching a table row that contains multiple elements (text, and form elements).
Example:
<table class="foo">
<tr>
<td>Car</td><td>123</td><td><input type="submit" name="s1" value="go"></td>
</tr>
</table>
This works for a single text element:
$this->isElementPresent(... | stackexchange/codereview |
I'm writing a class that does essentially the same type of calculation for each of the primitive numeric types in C#. Though the real calculation is more complex, think of it as a method to compute the average of a number of values, e.g.
class Calc
{
public int Count { get; private set; }
public int Total { ge... | stackexchange/codereview |
I am trying to figure out how to route my application to a default controller/task/id when none is specified in a request.
Here is my one routing instruction...
routes.MapRoute(
"Default", // Route name
"{controller}/{action}/{id}", // URL with parameters
new
{
controller = "LML",
action = "T... | stackexchange/codereview |
I want to write an app to send an sms from a shortcut on a home screen. That is all.
I just can't understand within the framework how I can write such an app. Here's what I've tried so far and what my ideas are:
I wrote an activity that sends an sms using SmsManager within the onCreate() however, this just keeps on se... | stackexchange/codereview |
So I have an application that creates VOBs as a step for DVD creation. I am using StandardMPEG encoder, and it works like a charm.
Burning actual .ISO isn't my concern here, but building it is. I need a library that is able to create simple menu, mark some chapters for the VOB, and finally create an ISO that should be... | stackexchange/codereview |
I have an SQL table as such
name | engins| frank
---------------------------+-------+------
John Smith | 8422| 854
(1 rows)
And need to make a query such that only return the row john smith when engins is more than 2000
| stackexchange/codereview |
Is it possible to use python's standard libs xmlrpclib with gevent? Currently i'm tried to use monkey.patch_all(), but without success.
from gevent import monkey
monkey.patch_all()
import gevent
import time
import xmlrpclib
from SimpleXMLRPCServer import SimpleXMLRPCServer
import urllib2
def fetch(url):
g ... | stackexchange/codereview |
We have two stored procedures in Microsoft SQL Server that return data that is conceptually of the same type. One returns an ID as SCOPE_TDENTITY() (a numeric), while the other returns 0 (an int32). We have a complex type with a property ID. If this property is a nullable decimal, we receive the following error when en... | stackexchange/codereview |
There what I am trying to do :
I am calling a WebService that send me back an image.
I get it from the entity.getContent() method.
Further in my code I try to use de BitmapFactory.decodeByteArray(myImage, 0, myImage.lenght) but the Bitmap that it returns me is always null
Does someone have an idea ?
| stackexchange/codereview |
Back-Story
On a current project, I am using MySQL and SQLite in combination with each other. I'm currently giving each user their own SQLite database to get around my provider's 1GB MySQL DB limit. It's worked out alright and the performance is good, but I know for a fact that continual maintenance of these flat-file d... | stackexchange/codereview |
I have a little trivial problem in my application. I have a dialog (d1) that inherits from Form. And in Main, if I call
d1.ShowDialog
,it works fine. But calling
d1.Show()
opens a bad form with pale labels and textboxes, and when I try to drag that window form it says "Not Responding."
What's going on? I think I need... | stackexchange/codereview |
I have a nested form that instantiates as this :
- 2.times { @organization.referrals.build }
- form_for @organization do |f|
= f.error_messages
- f.fields_for :referrals do |f|
Except, the nested forms are supposed to be always new and unique. Where as this form shows previously created objects as well.
So I trie... | stackexchange/codereview |
I have a complex mathematical C++ function. I want a translated and easy to read graph out of it. Is there any software which can analyze special mathematical functions and draw an easy to read graph? Assume it's an encryption algorithm code.
I have tried a lot of software like Understand, WizGraph, etc. Is there some... | stackexchange/codereview |
I need to pass an array from C#.net application to oracle stored procedure.
Can anyone please let me know how to go about it?
Also, which OracleType type do I use in C# when passing input parameter to stored procedure?
FYI, am using System.Data.OracleClient in my C# app.
Thanks.
| stackexchange/codereview |
I am using IIS7 URL rewriting with my website which is written in ASP.NET. I am not sure the best way to deal with / in the rewritten URL because currently, when one is present it breaks the parameters because the engine thinks it needs to split it at the wrong place. For example, a url like:
www.test.com/myscript.aspx... | stackexchange/codereview |
I am trying a file operation using python.Aim is to continuously read a file of size(100bytes),pack and send them through socket. These files are read from a directory.
Problem: when i run the program continuously, execution time is increasing. Initially, execution time is less than a second; later it reaches till 8~10... | stackexchange/codereview |
I'm populating a textarea with previous input of a user. This is pulled from a database and set as the content of the textarea server side.
It seems we are having an issue with a typo and a combination of special characters. if the user inputs  originally, when I try to populate my textarea with that it just rende... | stackexchange/codereview |
My work project needs to be compiled and run under JDK1.5 and I'm on a Mac. I followed the instructions here to get 1.5 back on Snow Leopard, and it works fine when building from IntelliJ IDEA, or if I'm just in the same directory as the build.xml and try "ant CleanRebuild" When I "Run Target" in NetBeans they're all... | stackexchange/codereview |
How can I include doxygen perlmod in my perlscript?
I've noticed that you can generate a alternative output with doxygen that is called perlmod,
but I can't find any examples on how to use this part.
I've found 2 nice files in there DoxyDocs.pm and DoxyStructure.pm,
and they contain some kind of nice structure that r... | stackexchange/codereview |
I would like to able to loop through past events in a template:
{% for page in m.search[{past cat='event'}] %}
{% if forloop.first %}<ul>{% endif %}
<h2>{{ m.rsc[page].date_start|date:"M j, Y" }} {{ m.rsc[page].title }}</h2>
<p>{{ m.rsc[page].body|show_media }}</p>
<p><a href="{{ m.rsc[page]... | stackexchange/codereview |
When to set kAudioUnitProperty_StreamFormat (and kAudioUnitProperty_SampleRate too)? For each AU in my AUGraph ? Or is it enough to set it jus for the AU Mixer ?
André
| stackexchange/codereview |
I've been asked to create a solution where people log in and are able to upload and download off of our work server. So John uploads a photo, and Jen can download it, for example. They also have to authenticate themselves.
Can someone give me a rough overview of how to implement this? I'm familiar enough with MySQL,... | stackexchange/codereview |
How can I update an Apex Tabular Form with pl/sql instead of using a multi-row update(MRU), is it even possible?
Thanks in advance.
| stackexchange/codereview |
I am wondering if the following scenario would be amenable to CouchDB? I am building a web-based flashcard application. Users can create flashcards (question on one side, answer on the other). Flashcard authors and other users can tag flashcards with keywords/phrases. Users can retrieve/generate virtual stacks of card... | stackexchange/codereview |
I have some issues running any project in visual studio.
Even with new websites, I get the error in title.
If I visit the website using internet explorer and localhost/project it works. However, I cannot debug it in visual studio
Any ideas?
| stackexchange/codereview |
I was just watching the Wilderness Downtown video - http://www.thewildernessdowntown.com/ - and I couldn't quite work out how the folks behind it did the Google Map which scrolls along and rotates, all on an HTML5 canvas.
I've looked through the Google Maps Javascript API - http://code.google.com/apis/maps/documentatio... | stackexchange/codereview |
i'm looking for an intent filter for when you are at the contact list and you long press a contact so a menu comes up
| stackexchange/codereview |
In Qt, there is a nice idiom to have each object associated with a thread, so that all its event handlers will only run in that thread (unless called directly, of course).
Is there anything even remotely like that in C#/.NET? If not, how would you start writing your own?
Example:
// threaded.h
#include <QThread>
#incl... | stackexchange/codereview |
I want to build an app for the Mac / iPad that allows to assign semantic roles to sub phrases of every sentence of a text. So basically I have a text with n sentences and for every sentence the user selects one or multiple words and assigns it a semantic role (e.g. agent or patient). Then, I want the according phrases ... | stackexchange/codereview |
Lets say, we're calculating averages of test scores:
Starting Test Scores: 75, 80, 92, 64, 83, 99, 79
Average = 572 / 7 = 81.714...
Now given 81.714, is there a way to add a new set of test scores to "extend" this average if you don't know the initial test scores?
New Test Scores: 66, 89, 71
Average = 226 / 3 = 75.3... | stackexchange/codereview |
I'm new to iOS development. And i can't find an answer to a question how does application update system work. I want to write a game which will have a set of levels. Then i want to be able to add new levels to the game (after it was uploaded into app store). So my game should be updated. And i don't understand how to d... | stackexchange/codereview |
I have to make a ioctl call to the 64 bit driver code from a 32 bit application. I have send a structure as an argument to ioctl call. I see lot of alignment and padding issues because of difference in architecture of user and driver code. Is there any way to solve this structure and padding created due to difference i... | stackexchange/codereview |
When I post a JSON to the server and return a normal View string from the Spring controller, my jQuery is not hitting the "success" function.
My Controller:
@RequestMapping(value = MappingConstants.RULE_ASSIGNMENT, method = RequestMethod.POST)
public String saveRuleAssignment(@RequestBody RuleAssignmentCO ruleAssignmen... | stackexchange/codereview |
$sql="SELECT * FROM Reg_Stud WHERE Username='$var1' AND RegID=$var2 ";
this is the code...
i tried the input
Username =anything' OR 'x'='x
ID =12 or 1=1
no sign of sql injection...but when i just give the 1st argument and end it by commenting the rest...it gives sql error i.e anything' OR 'x'='x;--
| stackexchange/codereview |
Here's my full markup:
<%@page Title="" Language="VB" MasterPageFile="~/Master Pages/MasterPage.master" AutoEventWireup="false" CodeFile="Statistics.aspx.vb" Inherits="Statistics" %>
<%@ Register Assembly="System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" Namespace="Syste... | stackexchange/codereview |
I'm working on a drupal website. I've been keeping an svn repository of my custom modules which I've recently ported to github to work with another developer.
Coming from SVN I'm used to just being able to update my custom modules folder on the staging website directly from my SVN repository. But from what I've read... | stackexchange/codereview |
i am working with C# windows form application i developed project in that.i like to make project design into more stylish and modern.is it possible to do like this by using WPF,if yes i like to apply WPF code without change Existing code and design,Is it possible to do like this.
For Example i am putting one button nam... | stackexchange/codereview |
I am referring this : http://haacked.com/archive/2007/07/24/securely-implement-elmah-for-plug-and-play-error-logging.aspx
Just asked :
My question is what about those who are not using form authentication and just using Custom-Authentication, Authenticate site visitors by Sessions etc. By allowing all registered member... | stackexchange/codereview |
Groovy has a nice operator for safe dereferencing, which helps to avoid NullPointerExceptions:
variable?.method()
The method will only be called, if variable is not null.
Is there a way to do the same in Python? Or do I have to write if variable: variable.method()?
| stackexchange/codereview |
I'm trying to play L1.wav which is in my resources folder. Previously I have pulled images from the resources file using the line btc.Properties.Resources.noImg which worked perfectly but if I try and do the same for the wav file I get a '...does not contain a definition for L1. Its there, works fine if I double clic... | stackexchange/codereview |
I'm trying to deploy a rails app to Heroku and I'm running into some basic git problems. I'm new to this all -- rails, git, heroku -- so I'm afraid I'm getting lost on what's probably a fairly basic concept.
I've pushed the app to Heroku, but when I'm migrating the db ($ heroku rake db:migrate), I keep getting the foll... | stackexchange/codereview |
I'm in the midst of writing a Python library API and I often run into the scenario where my users want multiple different names for the same functions and variables.
If I have a Python class with the function foo() and I want to make an alias to it called bar(), that's super easy:
class Dummy:
def __init__(self)... | stackexchange/codereview |
I`m a little confused about this point.
Everything that I found in books, blogs, forums and even in OpenGl specs just talk about a very abstract techniques. Nothing about real world examples.
And I`m going crazy with this: How to put and manage multiple objects (meshes) with OpenGL ES 2.x?
In theory seems simple. You h... | stackexchange/codereview |
I created a custom AQGridViewCell.
By using UIImageView everything works. The image appears and is clickable, but when I change the UIImageView to TTImageView I can't click on the image.
The same example as here below by just changing the imageview to UIImageView and the the setter message to an image, everything work... | stackexchange/codereview |
I'm using the entity framework code first CTP4.
Is it possible to lazy load non navigation properties like you can in NH 3.
A common example would be having a table containing a binary column. I only want to retrieve this column's data when I explicitly ask for that property in my code e.g. image.ImageData
Thanks
Ben
| stackexchange/codereview |
i hav an html file which displays table view ,how to load this on the ipad view ..
and i want to enter the values to the fields of table view in html o/p....
any ideas ..
Thanks in advance...
| stackexchange/codereview |
I am trying to change the link for an object in the django admin list display. Here is what I have so far:
class FooModelAdmin(admin.ModelAdmin):
fields = ('foo','bar')
list_display = ('foo_link','bar')
def foo_link(self,obj):
return u'<a href="/foos/%s/">%s</a>' % (obj.foo,obj)
domain_link.all... | stackexchange/codereview |
My target is to open many .csv files, each of them in a new workSheet in the same excel workBook, without opening a workBook for each.
I noticed that the Open() or OpenText() methods belong to the workBook class and using them means opening a new workBook.
To be more clear, a regular user would simply do this in Excel ... | stackexchange/codereview |
I am a MSC IT final year student and I am thinking to develop a proxy blocker.
Proxy blocker is like if any one is accessing my site (mysite.com) via a proxy site, then the site should not be opened.
Please if any one can give me some guide lines to start this project.
I am actually confused that from which phase shoul... | stackexchange/codereview |
I have two tables in my entity framework, objects, and parameters which have a foreign key pointing to the object to which they belong. I want to populate a tree with all the attributes of a certain object. So in order to find those I want to do this:
String parentObject = "ParentObjectName";
var getAttributes ... | stackexchange/codereview |
can anyone explain what happens when you use javascript to insert a javascript based widget?
here's my js code:
var para = document.getElementsByTagName("p");
var cg = document.createElement("div");
cg.setAttribute("class", "twt");
cg.innerHTML='<a href="http://twitter.com/share" class="twitter-share-button"
data-coun... | stackexchange/codereview |
The schema is as follows:
Student(Snum, Sname)
Course(Cnum, Cname)
Professor(Pnum,Pname, Dept, Office)
Class(Cnum, Term, Section, Instructor)
How can I join the two selects below to get Instructors who taught both CS160 and CS340?
SELECT DISTINCT Instructor FROM class
WHERE Term = "99F" AND Cnum = "CS160"
SELECT DISTI... | stackexchange/codereview |
I would like to create a custom made menu on the bottom of the screen, This menu will be as buttons and, it will always be visible first, if the user scrolls down, it will be visible, and scrolls upp.
How is this possible?
| stackexchange/codereview |
I have a bunch of data in a table that serves as the parent (primary key in foreign key relationship) to several other tables. I basically want to go through this table and try and delete records that do not have children. I have already deleted the children, so there are parents that are childless.
If a record can ... | stackexchange/codereview |
Nearly done my first titanium developer app however, the biggest issue (and lack of documentation of) is the ability to execute a function in the background.
I have a function that basically just queries an external json file and then loops through it inserting about 150 records in the database. This completely hangs t... | stackexchange/codereview |
I have a table with two columns {FlatContent, HashedContent}. Now I want to automatically compute the hash value of FlatContent when new row was inserted or an existing row was updated. To date, I've never used from trigger, so I can't do this by trigger or another approach which is exist to solve this issue.
Thanks if... | stackexchange/codereview |
It would be extremely helpful for developing Firefox extensions if I could see the source of, e.g., chrome://browser/content/browser.xul with overlays applied. Is there a way to do this? Chrome List and "View Source" show only the base structure, ChromeBug requires restarting the browser and isn't too easy to get worki... | stackexchange/codereview |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.