instruction_seed stringlengths 1 35.8k | _source stringclasses 1
value |
|---|---|
<iframe src="/demo.php" id="source"></iframe>
$('#source').delegate('*', 'hover', function() {
$(this).addClass('hover');
});
$('#source').delegate('*', 'mouseout', function() {
$(this).removeClass('hover');
});
$('#source').delegate('*', 'click', function() {
alert($(this).html());
return false... | stackexchange/codereview |
I need to show a div if two or more checkboxes are checked using JQuery only.
How can I achieve this?
| stackexchange/codereview |
I am trying to create 2 versions of the exact same app with 2 different branding?
So i created 2 folders in my project
Resources -> Folder1
Resources -> Folder2
I added Folder1 to target 1, and Folder2 to target 2.
The 2 folders contain 2 images named the same but they look different.
However, doesn't matter which tar... | stackexchange/codereview |
Is it possible to have a regex to match a string with alternating 0 and 1? It can end in 0 or 1 and length is arbitrary.
| stackexchange/codereview |
I am trying to integrate Facebook connect to my iPhone app but I have an error (code 10000):
did fail: The operation couldn’t be completed. (facebookErrDomain error 10000.)
When I try to update my wall. The code seems pretty simple (I had to struggle to find some doc though).
- (void)viewDidLoad {
[super viewDidLo... | stackexchange/codereview |
I've got an MVC web application that is used as an interface to a Console based app that exposes a bunch of ServiceHost/s using the net.pipe protocol.
I would like to use the asp.net membership/role/profile provider to manage my users and their roles and profile information (Inside the Console Application). I've done t... | stackexchange/codereview |
NSString *cel=@"text";
NSIndexPath *a = [NSIndexPath indexPathForRow:1 inSection:1];
CustomCell *c = (CustomCell *)[tableView cellForRowAtIndexPath:a];
c.yes.text = cel;
I am using these line for updating the UITextfield placed on the tablecell .....
but it giving me some error like this
RootViewContro... | stackexchange/codereview |
Sorry for the Java jargon, but how can I overload Moose constructors?
Suppose I'm representing a segment. I can either take a start point and and point, or a start point and length, or end point and length.
How can I allow for such alternative construction methods?
| stackexchange/codereview |
I'm studying the Low-Level File Management Programming Topics from Apple. In the NSFileHandle section, they say:
The scope of NSFileHandle is not
limited to files. It provides the only
Foundation object that can read and
write to communications channels such
as those implemented by sockets,
pipes, and device... | stackexchange/codereview |
How to delete the history pages in ASP.net?
In my application when the user logs out, i delete the session variables and expire the cookie(aspxauth and asp_net_sessionId) but however when user clicks on the back button of the browser, user could still see the pages with all the user information on it. However the page ... | stackexchange/codereview |
I'm trying to run a no tracking query on my entities so that I can update them outside of the context. However, when the no tracking is not working and I get an exception stating
"The ObjectContext instance has been disposed and can no longer be used for operations that require a connection."
This exception is thrown... | stackexchange/codereview |
I am creating a desktop application in C# where my code is:
private void btnLogin_Click(object sender, EventArgs e)
{
if (clsFunctions.recordExist("SELECT AtNumConstructorID, TxtConstructorName AS Fullname FROM tblConstructorDetails WHERE txtUserName = '" + txtUserName.Text + "' AND TxtPassword LIKE '" + txtPasswor... | stackexchange/codereview |
My Eclipse product has several project types.
And I extend "org.eclipse.ui.newWizards" for adding a specific file.
But the file is necessary only one of the project types.
So.. How can I enable or disable the eclipse new wizard depending on the project?
Your replay will be appreciated.
| stackexchange/codereview |
Hi I would like to know how to validate a filename in C# to check that it ends with a certain word (not just contains but is located at the end of the filename)
e.g I want to modify certain files that end with the suffix Supplier so I want to validate each file to test if it ends with Supplier, so LondonSupplier.txt, M... | stackexchange/codereview |
I have a longtable in LaTeX with a caption that doesn't fit into one line, e.g.
\begin{longtable}{lrrr}
\caption{This is a very long caption that does not fit into one line}
...
\end{longtable}
The resulting PDF looks as follows:
Figure 1: This is a very long caption that does not fit
into one line
I would like the s... | stackexchange/codereview |
I just discovered that %ws was common knowledge (to some), for formatting unicode strings, as is %wZ - however msdn does not document these in a place I can find them. There are many people who write about these usefull printf format types individually on the web, but no official catch-all that I can find, and hence le... | stackexchange/codereview |
I'm using PostgreSQL with PostGis and have shapes of all countries loaded.
How can I calculate the shortes sea route between two ports (without intersecting a country shape)
is there a 'standard solution'?
| stackexchange/codereview |
I have a radiobutton group in Android that I populate with data from a database. To get the data to show next to each radiobutton I have used the ListAdapter:
String[] columns = new String[] {DataHelper.KEY_WORD, DataHelper.KEY_ALT1 , DataHelper.KEY_ALT2 ,DataHelper.KEY_ALT3 ,DataHelper.KEY_ALT4 };
// the ... | stackexchange/codereview |
The scenario:
Start the app and load ClassPathXmlApplicationContext in main(), this starts a Jetty webapp.
dispatcher servlet then loads a XmlWebApplicationContext
dispatcher servlet then looks for WEB-INF/applicaitonContext.xml to load as the root context
I'm just trying to get my head around contexts.
Should I us... | stackexchange/codereview |
I am managing a bunch of PDF files in an android application maintaining a list of records in a SQLite database as well as storing the pdf files on the external storage.
Now I would like to present a thumbnail of the first page of the pdf in my list view as part of each cell representing a pdf.
I am aware of libraries... | stackexchange/codereview |
I have an interface
Interface:
interface IThing
{
Enum MyEnum {get;set;}
string DoAction(MyEnum enumOptionChosen, string valueToPassIn);
}
Concrete implementation:
public class Thing : IThing
{
public enum MyEnum
{
FirstOption,
SecondOption,
ThirdOption
}
string doAction(MyEnum enumOptionChose... | stackexchange/codereview |
If I have class A which has a dependency on class B, then class B could be passed in to the ctor of class A.
What about if class B has a dependency on class C, does that mean class A should receive all required dependencies upon construction ?
| stackexchange/codereview |
I have a graph in form of a rectangular grid, i.e. N nodes and 2N edges, all adjacent nodes are connected.
This means it is two-colourable, and hence it is possible to do bipartite matching on it.
Each (undirected) edge has a weight assigned to it - either -2, -1, 0, 1 or 2. No other values are allowed
How would I go a... | stackexchange/codereview |
I've created:
PhotoAlbum (id, name)
has_many: photos
Photo (id, name, photo_album_id)
belongs_to: photo_album
I want to allow a user to upload 1 or more photos. Per Upload whether it be 1 or more photos, they should automatically be added to a new album.
So the way i have it is, a user clicks upload photos:
They ... | stackexchange/codereview |
All,
I have a JsonStore backing a form panel in my extjs app. I want to have the jsonStore load a single record based on an id value, but haven't found a good way to do that yet, and still keep the url restful.
My first attempt was to add a param to the jsonstore load() method with the id in it. That only adds the id ... | stackexchange/codereview |
I am working on a project which contains two servers, one is written in python, the other in C. To maximize the capacity of the servers, we defined a binary proprietary protocol by which these two could talk to each other.
The protocol is defined in a C header file in the form of C struct. Usually, I would use VIM to... | stackexchange/codereview |
I am using ELMAH to handle expception in my MVC project. All is working fine, except for when the request is an ajax request.
The exception is captured and logged but when I do a response.redirect to the error page, the redirect doesn't happen and the error message is displayed on the same page, overlapping the existin... | stackexchange/codereview |
I have a VS 2008 C# web app with a bunch of project references to custom dlls. These are all at a relative path from the web project. Recently I've noticed that Clean Solution removes some, but not all, of the dlls from the web app's bin\debug folder. For example:
<Reference Include="TowerCo.Utilities, Version=1.0.... | stackexchange/codereview |
I'm making a program in which I need to get the time in milliseconds. By time, I mean a number that is never equal to itself, and is always 1000 numbers bigger than it was a second ago. I've tried converting DateTime.Now to a TimeSpan and getting the TotalMilliseconds from that... but I've heard it isn't perfectly accu... | stackexchange/codereview |
how can i do these on cakephp?
is it possible to copy data from a table to another table?.
here is my example. i have two tables, warehouse and showroom
my warehouse table has (product_id and stock_quantity) and my showroom table has (product_id(fk from warehouse), stock_transferred )..
for example in warehouse table
p... | stackexchange/codereview |
We can use hg in -vp to compare our local repo to the master repo.
How can you do this visually? We use the ExamDiff extension as our Mercurial visual diff tool. We figured there was a way to do the equivalent of hg in -vp but wasn't sure how to do this.
| stackexchange/codereview |
The title pretty much says it all. A cookie seems to have a few advantages to me; however, I'll wait to see what others say.
Also - assuming a cookie is better, what can be done to make passing the session by GET variable better?
Specifically I'm thinking about PHP; however, this should apply generally.
| stackexchange/codereview |
I am having trouble trying to get some replaces working with my regex.
Here is some sample data I'm working with :
$/Data:
$One
$Two
$/New:
$Four
$Five
Here is the result I'd like to obtain :
$/Data/One
$/Data/Two
$/New/Four
$/New/Five
Currently, I'm using this regex :
(\$/.*?):\r\n(?:(?:\$(.*)\r\n)*)+
This allows ... | stackexchange/codereview |
I tried getline(cin, .... ), but this cannot take input more than one line. The end of input is determined by something like #.
| stackexchange/codereview |
Is there a way to information on the camera buit into the phone?
Things like...
if there is a camera!
resolution
if a flash is present
| stackexchange/codereview |
I'm writing a jQuery plugin and something I need to be able to do is determine the width of an element that the user specifies. The problem is that .width() or .css('width') will always report exact pixels, even if the developer has assigned it e.g. width:90% with CSS.
Is there any way to have jQuery output the width ... | stackexchange/codereview |
array(2) {
["param"]=>
array(1) {
["stuNBR"]=>
string(5) "555555"
}
["data"]=>
array(3) {
[0]=>
array(6) {
["SEQNBR"]=>
string(1) "2"
["CDE"]=>
string(3) "MUG"
["NBR1"]=>
string(1) "1"
["NBR2"]=>
string(1) "0"
["NBR3"]=>
string(3) "PA... | stackexchange/codereview |
I remember using values array on good old mx:HSlider, is there any workaround for s:HSlider?!
Basically I need slider to choose values between 300 and 2500 in following steps 300,500,1000,2000,2500.
<s:HSlider id="franchiser"
value="1500"
skinClass="components.HorizontalSlider" x="0" y="0"
minimum="300" max... | stackexchange/codereview |
When I use the old Python thread API everything works fine:
thread.start_new_thread(main_func, args, kwargs)
But if I try to use the new threading API the process, which runs the thread hangs when it should exit itself with sys.exit(3):
threading.Thread(target=main_func, args=args, kwargs=kwargs).start()
How can I tr... | stackexchange/codereview |
I'm having 5 view controllers in my navigation based application, I need to support both landscape/Portrait mode in only a one view, following items displaying in the view
Navigationbar
Tool bar with two buttons
UIImageView in center.
UILabe below the navigaton bar.
Can any one help me how to support the orientation ch... | stackexchange/codereview |
How can I use is_file with a path like: /folder/file.jpg please?
Thank you!
| stackexchange/codereview |
I am having a problem in understanding the security issues with the following scenario.
I have a site that has user registration and they can create events by logging in. If I am logged in as a user and i am in a url like http://abc.com/index.php?page=edit&pageid=45. I am seeing this page after logging in other wise it... | stackexchange/codereview |
Basic c++ question here. I'm trying to read a large file on Windows 7 Pro. C++ compiler is Visual Studio 2010. (ver 16.0). I'm finding that the program runs about 5 times slower on Windows 7 than one on a virtual machine running Ubuntu on the same box. Ubuntu version 10.04 using gcc 4.4.3. The file is rather large ~900... | stackexchange/codereview |
For multiple folders provided as input from the user, I'd like to count how many of the files and folders they contain have different permission settings as the container folder itself.
I've written the following shell code. Why does it display the rights, but not count anything?
#!/bin/sh
if [ ! -d $1 ]
then echo $1... | stackexchange/codereview |
have defined different models and modelMappers in my php project.
my folders are structured as follows
-application
--models
---DbTable
----modelName
---modelMapperName
modelName.php
class Application_Model_DbTable_ModelName extends Zend_Db_Table_Abstract{
}
modelMapper.php
class Application_Model_ModelMapper
{
}
e... | stackexchange/codereview |
I have strange problem and would like to use one of yours opinion.
I am setting up servers grid, all will be based in UK at first and then expand to other countries. My problem is should I stick with GMT or use BST, what is your opinion in terms of global timezone settings?
| stackexchange/codereview |
I have 3 textarea with a default text "Write something". Let say if I click on one of them, the default text will disappear and that textarea get focus. However, if I click on another textarea, the default text of another textarea will disappear but the default text of first textarea will reappear. How can I make this ... | stackexchange/codereview |
I would open a GMarker (the openInfoWindowHtml) on Google Maps with JavaScript. How can I do that?
Thank you very much
Code of the Marker:
function createMarker(point, id, name, address, type, city, image) {
var marker = new GMarker(point, customIcons[type]);
var html = "Information";
GEvent.addListener(marker, ... | stackexchange/codereview |
I have a car rental application I am writing. I am having some issue. Basically I want a user to pick a date from dateTimePicker2 then dateTimePicker1 I then want to subtract those numbers from eachother and store it in car. I have created a button that will multiple the per day charge then display it in a label but I ... | stackexchange/codereview |
I am working on an Adobe AIR (2.0) application that contains a feature to allow users to print documents (such as salary slips). Those documents are originally in PDF format. Due to circumstances we cannot directly display those PDFs in the AIR application (for example using flash.html.HTMLLoader). Therefore we convert... | stackexchange/codereview |
I know I need to use Template Columns, but I am not clearly understanding how to use it.
I have a datasource which returns a collection, I can assign each property in the collection to a column.
But how do I:
Merge two columns? such as col.prop1 +' '+ col.prop2 ?
Execute some methods on the properties such as col.p... | stackexchange/codereview |
For a .NET solution, is there a way to get all the .dll files for each project in the solution? For example, if I make an empty .NET solution (this is Visual Studio 2010 btw), and add 3 projects called "a", "b" and "c", and build each, providing me with dll's a.dll, b.dll, and c.dll, is there any code sample in either ... | stackexchange/codereview |
I have a question about Control.DataBindings.
How can I bind Button.Enabled to whether if there is any item selected of a ListView? i.e.:
Button.Enabled = ListView.SelectedItems.Count > 0;
I know that I can use ListView.SelectionChanged event to do this.
I'm just wondering how can I use DataBinding to do the same job.... | stackexchange/codereview |
Can you find the IP address of a freinds phone using their phone number?
| stackexchange/codereview |
Hi assume that I have class A :
using namespace std;
template <class T>
class A{
private:
vector<T> my_V;
public:
// assume initializations etc are done
inline vector<T> get_v()
{
return my_v;
}
};
and some where else I have overloaded ostream of std::vector
template <class T>
ostream & operator<<(ostream& out... | stackexchange/codereview |
Is there a good algorithm for this? after an amount of searching around I haven't been able to find any conclusive answers.
Basically in a system which collects various bits of data about its users, each user is identified by a 64 bit unique Id. this Id is used as a primary key to a data set which may include any amoun... | stackexchange/codereview |
I'm trying to install Ruby Bossman, and the following exception happens:
/opt/local/lib/ruby/gems/1.8/gems/bossman-0.4.1/lib/bossman/boss.rb:10:in `initialize': undefined method `to_query' for #<Hash:0x1010f0800> (NoMethodError)
from /opt/local/lib/ruby/gems/1.8/gems/bossman-0.4.1/lib/bossman/search.rb:12:in `new'
... | stackexchange/codereview |
I am currently working on an application in which I am making a catalogue that will contain different products. So far I have made my startup menu, which includes three buttons (one for the catalogue, one for settings and one for instructions). When pressing the catalogue button, the app switches to the CatalogueViewCo... | stackexchange/codereview |
I am using the following jQuery to change classes on elements in an unordered list. It doesn't seem like it is the most effective way of achieving the effect. Is there a better way to write this?
$(function() {
$('nav li a').click( function() {
$(this).parent().siblings().children().removeClass('active');... | stackexchange/codereview |
I have a two layouts files in my app. Also I have Activity extends ListActivity. Every item of this activity looks consider item.xml layout file. I am trying to get context menu when make long presss on item, but I don't see it.
In my activity I trying to registerForContextMenu(getListView()) and override two methods
... | stackexchange/codereview |
I have a legacy msvs2005 c++ project library (dll). I opened project on WindowsXP workstation with msvs2008 installed and code compiled fine. But when I try to use it with executable module i observe "my-library.dll or one of it's dependencies were not found".
Dependency Walker tells me that MSVCP80.DLL, MSVCR80.DLL, ... | stackexchange/codereview |
I think Zend ACL is used to give permissions to user types (student, teacher). Can it be used to give permissions on per content basis. What I mean is this blog post was written by this user and they can edit it. Others can't edit it. Can Zend ACL work with this requirement?
| stackexchange/codereview |
Can anyone explain me how to integrate Wordpress 3.0.1 and the bbPress 1.0.I just want to install bbPress with my previous Wordpress site (Url : mysite.com).I just want to install it on mysite.com/forum .
I just tried doing it by creating a folder and installing bbPress there,( I skipped the wordpress integration ). Wh... | stackexchange/codereview |
I am getting an exception:
org.hibernate.MappingException: No Dialect mapping for JDBC type: -9
I found a list of JDBC Data type here Apache DB Project . How do I find out "-9" maps to one of the data types listed? From googling, people seem to say -9 represents nvarchar, but is there an authoritative source?
| stackexchange/codereview |
have this weird problem with the first click of a row item in a gridview where it doesnt fire. Im loading up a user control dynamically into a placeholder. After the first click fails, subsequent clicks are fine, and the RowCommand event fires.
Any suggestions appreciated
protected void Page_Load(object sender, Eve... | stackexchange/codereview |
I wanted to restore the position of red block which is a draggable div on the green and gray block and not in blue block it is not worked on green block but it worked on gray block please help me ... For this purpose I am using jquery revert. The code and lnk are below please help me
http://galtech.org/testing/drag.php... | stackexchange/codereview |
How to integrate module inside application? I have modules having two controllers and two respective views inside module. Now I want to integrate this module inside my application, so that views and actions can be handled by this module only.
| stackexchange/codereview |
I want to write a function in LISP that will completely remove all NILS in a list. The list may be nested, meaning it can contain other lists inside. For example the list '((state L L L L) NIL (state L L R L) NIL) should be tranformed into '((STATE L L L L) (STATE L L R L)).
| stackexchange/codereview |
Is the Lookup Time for a HashTable or Dictionary Always O(1) as long as it has a Unique Hash Code?
If a HashTable has 100 Million Rows would it take the same amount of time to look up as something that has 1 Row?
| stackexchange/codereview |
I'm working with a product that has a web-based interface. The functionality is huge and is divided into modules. Access to each module is via a drop down menu available on all pages. Each menu item has at least 2 levels of drill downs (vertically)
Problem: Too many top level menu items
Solution 1: Group Elements (Lo... | stackexchange/codereview |
Say I have the following data:
|bookID|data|
|1|a|
|1|b|
|1|c|
|2|x|
|2|y|
|3|t|
I want to select all the books that have at least X rows. So if X=3 then I'd only get all the rows with bookID=1. If X=2 then I'd only get all the rows with bookID=1 or bookID=2, etc.
Can I do this with SQLite3?
| stackexchange/codereview |
Clojure's new contrib library group has a finger tree library. What are the use cases for finger trees in clojure? When should finger trees be used instead of one of clojure's other peristent data strucures: vectors, sets, maps, persistentqueues, etc.
The Joy of Clojure mentions that Finger trees can be used for inde... | stackexchange/codereview |
I want to parse a list of arguments in a perl script, for example i have this situation :
script.pl -h 127.0.0.1 -u user -p pass arg1 arg2 arg3
How can i do for parse the list of argument that aren't option in an array, and the option parameter in scalar value ?
Thanks.
| stackexchange/codereview |
Eclipse, by default, hides files that begin with . in the Package Explorer, Navigator, and other file views (e.g. .classpath, .settings, etc). Is it possible to hide files which end in ~ (e.g. somefile.txt~).
Yes, these are Emacs backup files, created while using both Eclipse and Emacs on the same project.
| stackexchange/codereview |
This is my first time using SAXParser, (I'm using it in Android, but I don't think that makes a difference for this particular issue) and I'm trying to read in data from an RSS feed. So far, it's working great for me for the most part, but I'm having trouble when it gets to a tag that contains HTML encoded text (e.g. &... | stackexchange/codereview |
I'm trying to setup Bundler with Rails 2.3.10 to make the transition to Rails 3 easier. But I'm not sure what the instruction on this page means. Am I supposed to require all the gems that I'm using in my app? If so, where? Thanks for reading.
| stackexchange/codereview |
I'm using LightOpenID and have a test page that is a near-copy of the example-google.php that came with it (I threw some echo's in to debug). Clicking the 'Login with Google' button takes me to Google. I sign in with a valid Google Apps email address and I get returned to my page. But when it tries to validate the c... | stackexchange/codereview |
Our code-signing certificate recently expired. It's been renewed, but now whenever I try to package the app with the renewed cert (whether I attempt a migration of the expired cert or not), after installation, I get the following message any time I try to run the app:
"This installation of this application is damaged. ... | stackexchange/codereview |
I've been using sqlite3 in a python application, and when testing it, my queries sometimes cause the program to freeze up. A rough (from memory) example:
SELECT id,name FROM main_table WHERE name IN
(SELECT name FROM another_table WHERE another_table.attribute IN
('foo', 'bar', 'baz'))
Often, the first time I attem... | stackexchange/codereview |
So I wanted to get started with writing a powershell script. I wanted to start small and simply write a script that substiutes a local file folder as a drive. Pretty simple. I've done it before using the old DOS command tools.
So the script I wanted to write is:
subst d: G:\CER
Ok, so I try to execute the script in t... | stackexchange/codereview |
I'm cross-posting this from math.stackexchange.com because I'm not getting any feedback and it's a time-sensitive question for me.
My question pertains to linear separability with hyperplanes in a support vector machine.
According to Wikipedia:
...formally, a support vector machine
constructs a hyperplane or set of... | stackexchange/codereview |
I wish to add this type of graph in my datagridviewcontrol :-
Here the graph is to plotted for 12 months and I can either input percentages or comparative values in pixels for the 12 months....Please also tell how to color the graphs
Any ideas for doing this will be highly appreciated
Edit----Thanks for all the answer... | stackexchange/codereview |
This is nothing short of embarrassing to ask but I'm having no luck with searches today.
I have an image plane.png which I have added as an existing item to my project "Rem". I have map.xaml in this, but since I want to add multiple "plane.png" images to this, I am trying to create them in map.xaml.cs
The XAML code to ... | stackexchange/codereview |
I'm trying to create a multibyte safe title => url string converter, however I've run into the problem of not knowing how to allow legal asian (and other) characters in the url when removing others. This is the function set at the moment.
public static function convertAccentedCharacters($string)
{ ... | stackexchange/codereview |
This is how my code looks like.
I want to kno why is the value in the label coming as blank or null.
I want to assign the value to username at get data and use it at the button click event.
Can some1 guide me with this and why is it happening and how to solve this issue
I don't want to use a session and static.
names... | stackexchange/codereview |
I've added an Facebook Like button, but as my site is still very small I believe it is not a good idea to show that bubble-box telling everyone that this page only has 3 likes. Then, it's better visitors don't see how bad it performs so they're not blended and can decide on their own if it's cool or not.
This is how I'... | stackexchange/codereview |
I had to get the coordinate of a point where the user touch on a MKMapView.
I'm not working with the Interface Builder.
Can you give me one example?
| stackexchange/codereview |
My question is closely related to this question.
Here is a quick synopsis: My app is running in Classic Mode.
I have the following code in Global.asax
protected void Application_Error(Object sender, EventArgs e)
{
// ... boring stuff...
HttpContext.Current.Server.Transfer("~/MyErrorPage.aspx", t... | stackexchange/codereview |
Possible Duplicate:
Html validation error for property attribute
According to facebook to use their like button and the open graph meta tags you need to place something like this into your html page.
<meta property="og:title" content="The Rock"/>
<meta property="og:type" content="movie"/>
<meta property="og:url" con... | stackexchange/codereview |
I have a git setup with a shared repository. As I'm working on 2 PC's I push my personal branches.
I'm rebasing frequently with the develop branch so I need to force a push (git push -f origin feature). But when I want to pull a feature branch whith the forced changes I always get merge conflicts.
Is it possible to for... | stackexchange/codereview |
Here is my code:
trainingSet = {"0,0":0, "1,0":1, "2,0":1, "0,1":0, "1,1":1, "1,2":0, "2,0":0, "2,1":0, "2,2":1}
for k,expectedOutput in trainingSet.iteritems():
print 1
coordinates = k.split(",")
network.layers[0].neurons[0].value = float(coordinates[0])
network.layers[0].neurons[1].value = float(coor... | stackexchange/codereview |
I have a custom CALayer (say CircleLayer), containing custom properties (radius and tint). The layer renders itself in its drawInContext: method.
- (void)drawInContext:(CGContextRef)ctx {
NSLog(@"Drawing layer, tint is %@, radius is %@", self.tint, self.radius);
CGPoint centerPoint = CGPointMake(CGRectGetWidth... | stackexchange/codereview |
What are the best ways to make Zend-Framwork run faster besides Zend Optimizer?
If I remember correctly, parsing .ini files in PHP takes a long time. Therefor I cache it (the file won't change during a request)
Are there any other ways to improve ZF's performance?
| stackexchange/codereview |
I have an array of categories:
categories = computers, entertainment, products, graphics cards
The array is sometimes returned in the wrong order BUT each category has a parent which exists in the SAME array.
categories =
products[parent=0],
entertainment[parent=products],
computers[parent=entertainment],
graphics ... | stackexchange/codereview |
Can someone help me understanding Model-View-Controller method to be implemented on WebForms? I am confused on couple of things:
If we have ABC.ASPX and ABC.CS files, what is view? is it only ABC.ASPX file? or combination of .ASPX + .CS file?
do we consider ABC.CS file as controller? If no, will it be a seperate class... | stackexchange/codereview |
I want to build a wizard like multi-step input form for my model.
I want to stick to rest practices as long as possible.
The individual steps in the wizard don't have much inter-dependency so to avoid the round trip to the server, I want to store the whole data on client side using JQueryUI tabs or similar.
I have fol... | stackexchange/codereview |
EDITED: so the query does work, but on my localhost machine it took over a minute to run. Admittedly the tables are considerably larger on my localhost (about 8000 rows each), but in production the tables could have upwards of 25,000 rows each. Is there any way to optimize this so it doesn't take as long? As indicated ... | stackexchange/codereview |
I have an application that opens a port to a printer(it's a bar code printer) which works on win XP but when i switch to win7 (64bit) i have a problem. Here is the code:
I am using this method to open the port:
[DllImport("kernel32.dll", SetLastError = true)]
public static extern SafeFileHandle CreateFi... | stackexchange/codereview |
I am facing a problem with removing the textbox using JS. I am using below mentioned code:
<html>
<head>
<script language=javascript>
function addElement() {
var ni = document.getElementById('myDiv');
var numi = document.getElementById('theValue');
var num = (document.g... | stackexchange/codereview |
How can I programmatically get the number of the incoming call from Background application ?
| stackexchange/codereview |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.