instruction_seed stringlengths 1 35.8k | _source stringclasses 1
value |
|---|---|
I'm trying to make a server that can be connected to by multiple clients. Here's my code so far:
Client:
int main(int argc, char **argv) {
struct sockaddr_in servaddr;
int sock = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
if (sock == -1) perror("Socket");
bzero((void *) &servaddr, sizeof(servaddr));
servad... | stackexchange/codereview |
Is there a elegant way of using a ListProperty for storing a subclassed db.Property type?
For example, the FuzzyDateProperty from this example uses get_value_for_datastore() and make_value_from_datastore() to convert its attributes into one int that is stored in the datastore. Since that one int is a Python primitive,... | stackexchange/codereview |
I don't think my bold text in a webpage are bold enough, so I was wondering if there were any ways I could tweak bold text with CSS.
| stackexchange/codereview |
If the height of a div is 10px, then the shadow is ok:
http://jsfiddle.net/m3KYB/6/
but if the height is changed to 1px or 0, then the shadow doesn't have a good blur and is uniform in color, and is lighter too (on both Firefox and Chrome)
It can be hacked by using a height of 10px, together with margin-top: -10px, b... | stackexchange/codereview |
Am try to understand the guts of django, and i cant get any good tutorial on this.
I know django views receive a HttpRequest instance as one of the arguments when they are called, what i would like to know is what function in django internals receive the request from the browser, creates the HttpRequest instance and ... | stackexchange/codereview |
I am writing a Java Swing-based program using and JFrame that is able to display a system tray icon for quick access to most-used features. Now I want to add an option for the user to choose whether or not the normal (Windows) taskbar icon should be displayed when the program window is minimized.
A search in Google tol... | stackexchange/codereview |
This may turn out to be a simple question with a very complex answer, or something very simple which I have just missed completely, but, in libraries like Prototype and jQuery etc., how can the $ global variable be an object that contains functions, for example:
$.ajax.get(…);
and also a function itself, like:
$("…");... | stackexchange/codereview |
Often when writing file writers or parsers in c++, I would like to monitor the writer/parser's progress through the file as it gets written/read. To this end, I was thinking of implementing something like:
ostream_monitor my_monitor(&my_output_stream, &cout);
my_monitor << my_variable;
This would have the effect of ou... | stackexchange/codereview |
given the following namespace, where do I put my declspec (for dll export) i I want all the methods in said namespace to be exported into the DLL?
namespace AguiText {
void drawTextArea(AguiGraphicsManager *g, const AguiFont &font,const AguiRectangle &area,
const AguiColor &color, const std::vector<std::str... | stackexchange/codereview |
I've modified the OpenGL es 2.0 template in Xcode to render that little box to an offscreen texture (50*50), then reset the view port and render the texture to the screen using a fullscreen quad. But the FPS dropped down so much that obvious lags were seen (about 10).
I know iPad has problems concerning fillrate, but t... | stackexchange/codereview |
i'm studying C++ and, in particular,i have stopped on references. I apologize if my question will be trivial to most of you,but i would like to understand the output of this program:
#include <iostream>
using namespace std;
struct myStruct
{
int a;
int b;
};
typedef struct myStruct myStruct;
myStruct copyMyS... | stackexchange/codereview |
I have a mathematical function that takes 3 real arguments and returns
6 real arguments. I want to let people publicly evaluate this function
on my Linux server.
I could create a webform with 3 'input type="text"' boxes, but the
purest way to do this is using SOAP and REST, given my belief that
SOAP and REST are primar... | stackexchange/codereview |
I haven't attempted to work with graphs in Rails before, and am curious as to the best approach. Some background:
I am making a Rails 3 site and thought it would be interesting to store certain objects and their relationships as a graph, where each object is a node and some are connected to show that the two objects ar... | stackexchange/codereview |
I have a partial view FileUpload which contains a file control.
<ul>
<li>
<label>
<span>*</span>Select the file:
</label>
<input type="file" id="FileBlob" name="FileBlob" />
<input type="submit" value="Save" />
<input type="button" value="Cancel" onclick="window.l... | stackexchange/codereview |
i been tring to add .inc page as php page using .htaccess, but each time i add it to my existing code in the end of the line, it downloads the page rather then process as a php file.
my existing .htaccess code
RewriteEngine on
Options +FollowSymlinks
RewriteBase /
#RewriteRule (mp3|mp3/)$ audio/q... | stackexchange/codereview |
i want to run a mysql command START SLAVE; is it possible to do that?
| stackexchange/codereview |
how do I create a shortcut that runs Visual Studio with Administrator rights?
Actually I have to navigate to the Visual Studio start menu folder, click on the icon with the right mous button and choose "Run as Administrator".
| stackexchange/codereview |
For a fixed prefix length I can do it like so:
[ a${filename:0:2} = a.# ] && echo temporary emacs file
How to do it for an arbitrary prefix?
Is there a cleaner way?
| stackexchange/codereview |
I tried to "make all" zebra.tar.gz under Cygwin. I got this error:
In file included from /usr/include/sys/types.h:440,
from /usr/include/zconf.h:364,
from /usr/include/zlib.h:34,
from getcoeff.c:29:
/usr/include/cygwin/types.h:39: error: parse error before "loff_t"
An... | stackexchange/codereview |
I have this linq query :
var myQuery = from Q in myDataContext
select Q.Name
and when I try to do this :
listView.ItemsSource = myQuery
it sometimes throws an exception because there are no elements in myQuery
I tried many ways like : if(myQuery.count!=0) or if(myQuery.Any())
but nothing worked , so ho... | stackexchange/codereview |
I have a question of curiosity.
How is Int64 implemented for 32 bit processors? I can see three options
32 bit processors have some kind of extension allowing 64 bit arithmetic
Int64 is it implemented entirely in the CLR, which implements 64 bit arithmetics by using 32 bit operations
Some 32 bit processors can d... | stackexchange/codereview |
I have an existing project utilizing git and have just installed eclipse along with egit. I pointed to the git repository with egit and can see all my files, my existing branches and can switch between branches.
When I open a file from the view of the git repository it does not seem to recognize that it is a php file,... | stackexchange/codereview |
This may be a simple question, but I'm trying to call a a value from table in my back-end SQL Server database and pass it through a querystring in the URL. For example:
I'm building a mobile web site that registers a mobile device to an account on the sign up page. After the database entry is created, I want the to g... | stackexchange/codereview |
I am doing something like this:
exec up_sp1 -- executing this stored procedure which populates the table sqlcmds
---Check the count of the table sqlcmds,
---if the count is zero then execute up_sp2,
----otherwise wait till the count becomes zero,then exec up_sp2
IF NOT EXISTS ( SELECT 1 FROM [YesMailReplication].[... | stackexchange/codereview |
I am trying to train a feedforward network to work to perform an XOR operations with the Ruby Library AI4R. However,
when I evaluate for the XOR after training it. I am not getting the correct output. Has anyone used this library before
and gotten it to learn the XOR operation.
I am using two input neurons, three neur... | stackexchange/codereview |
Is it possible in BASH to do a "du" command with the byte size shown in decimals.
For example, say I have the following files (numbers are in bytes):
12345 file1
2345 file2
6491 file3
I would like to do a "du" command in linux that would output the following instead:
12.3 file1
2.3 file2
6.5 file3
Note: The "-h" flag... | stackexchange/codereview |
Given a collection of Word objects, I want to display a scrollable tag cloud similar to what is shown below. My Word class has properties for Name and Rank from which I will determine sorting and weighting of the fonts. Each word should be a selectable object (for invoking some event). Since the collection can contai... | stackexchange/codereview |
I'm trying to convert a simple chat Java/BlazeDS project over to the new Spring BlazeDS setup.
I started fresh and copied in the blazeds-spring folder contents in the blazeds 4 turnkey distro which added a few new files
web.xml
flex-servlet.xml
spring/
app-config.xml
infrastructure-config.xml
security-co... | stackexchange/codereview |
I have been developing Filemaker pro for the last four years or so for a small machine shop erp/mrp system. Through Filemaker I have learned a bit about relational data base design and data modeling but I would really like to move onto something else that is open source and extremely flexible. I'm really open to learni... | stackexchange/codereview |
This should be pretty easy but I'm having a heck of a time doing it. Basically I want to move a row in my wxListCtrl up or down. I posted this to wxwidgets forum and got the following code.
m_list->Freeze();
wxListItem item;
item.SetId(item_id); // the one which is selected
m_list->GetItem(item); // Retrieve the it... | stackexchange/codereview |
I have the following query
SELECT id AS "CLIENT CODE",name AS "CLIENT NAME",(
SELECT
count(status)
FROM
campaigns
WHERE
clientid = clients.... | stackexchange/codereview |
I have created an application containing GWVectraNotifier activity which is called from other applications to display Notification.
In the Notification dialog, there will be 'show' button and 'close' button.
Onclick of 'show' button, the corresponding activity will be started.
To check the functionality of the above ap... | stackexchange/codereview |
In java Is it possible to get consistent hash code for an object when we are running the application multiple times
| stackexchange/codereview |
I want to be able to access my SVN repositories in /usr/local/repos as a share point ... When im in the mac File Sharing panel i cant see the /usr directory in the browse screen ... can i create a directory next to Applications etc etc called Repositories and link it to /usr/local/repos so that i can add it as a share ... | stackexchange/codereview |
I want to create two partial classes for the single aspx file. I am using vs2005 dotnet 2.0. i could not able to access method from one partial class in another partial classes.
Can anybody assist me.
Partial class 1 : my main aspx page
public partial class _Default : System.Web.UI.Page
{
protected void Page_Loa... | stackexchange/codereview |
Guys i have created a properties file outside the jboss classpath
(I kept outside because i can change during runtime and the values will be reflected).
I am loading this property file (like System.getProperty("jboss.base.dir.home")) everytime to do rmi lookup .I think that everytime loading the same file, eventhough ... | stackexchange/codereview |
I've been working with Django for a while now (currently on version 1.2), but just recently started working on an app that needs to support multiple instances. E.g., the project urls.py file will include it twice, under two different namespaces, like this:
urlpatterns = patterns('',
(r'^instance1/', include('myapp... | stackexchange/codereview |
I have used AspectJ before for Java, and I recently have thought about checking which possibilities exist for the C++ language.
I heard about AspectC++, but unlike AspectJ, AspectC++ seems to be abandoned in the sense that the latest release dates from 21.12.2005, according to their website.
I wonder if there are any m... | stackexchange/codereview |
I read about using xdebug with cakephp. I renamed three .htaccess files, one in /, one in /app, one in /app/webroot, then uncommented Configure::write('App.baseUrl', env('SCRIPT_NAME')); in app/config/core.php, then typed index.php before controller name, but css broke and a captcha fonts folder broke too. Inserting /a... | stackexchange/codereview |
I'm trying to return a list of select options to a JqGrid Add feature.
I have a javascript/jquery function that does a GET to get a string preformatted to work with JqGrid. I'm having trouble returning the results to the JqGrid though. How do I return the data from the jQuery Get function?
function getDealerPoolSelectO... | stackexchange/codereview |
I use Cmake to generate VS project, based on some dll file by
if(WIN32)
MESSAGE(WINDOWS)
LINK_LIBRARIES(${***_Test_SOURCE_DIR}/../../Build/Win32/Release/***.dll)
else(WIN32)
MESSAGE(POSIX)
LINK_LIBRARIES(${***_Test_SOURCE_DIR}/../../Build/POSIX/lib***.so)
endif(WIN32)
But when I open the generated pro... | stackexchange/codereview |
I need to serve files through grails, only users with permission have access, so I cant serve them with a static link to a container. The system is able to stream binary files to the client without problems,but now (for bandwidth performance issues on the client) I need to implement segmented or partial downloads in th... | stackexchange/codereview |
Somebody tell me that in zend helper, can I call model ? And if it's possible, how to do it?
| stackexchange/codereview |
F# is giving me some trouble with its type inference rules. I'm writing a simple computation builder but can't get my generic type variable constraints right.
The code that I would want looks as follows in C#:
class FinallyBuilder<TZ>
{
readonly Action<TZ> finallyAction;
public FinallyBuilder(Action<TZ> final... | stackexchange/codereview |
Looking at this snippet of python code I wrote:
return map(lambda x: x[1],
filter(lambda x: x[0] == 0b0000,
my_func(i)
)
)
(Hoping it's self-explanatory)
I'm wondering if python has a better way to do it?
I learned python several months ago, wrote a couple scr... | stackexchange/codereview |
I want to perform a load test on a server but application sends emails as part of the testing.
I'm not interested in knowing if mails are coming through, but I don't want to get into spam blacklist while performing the test.
So, is there a way to disable outgoing emails in sendmail but still simulating load on the syst... | stackexchange/codereview |
I would like to search text for words prefiexed by $.
Sample records (table with 3 rows):
This is my string containing the $word special word.
Again $word is here.
My special $word must be found.
Example RoR (thinking sphinx):
MyModel.search '$word'
I get no results but if I search for '\$word' the word is found.
Ho... | stackexchange/codereview |
How will i go about saving the state of a listview item during scrolling, so that the recycler does not use it when displaying the next row being. i basically have a listview with 4 textviews and one of the textview is displayed based on a condition, derived from a database. For clarity sake, i will call that dependant... | stackexchange/codereview |
I'm using the UISearchBar (but not the SearchDisplayController that's typically used in conjunction) and I'd like to dismiss the keyboard when you hit the 'X' button.
I've followed TomSwift's suggestion on getting called when the 'X' is tapped and that works great. But resigning first responder from the text field and ... | stackexchange/codereview |
I checked out a couple solutions for tabbed interfaces (including jQuery UI), and the markup always follows the same ul-li-a pattern:
<ul class="tabs">
<li><a href="#tab1">Title 1</a></li>
<li><a href="#tab2">Title 2</a></li>
</ul>
Is this considered a best practice, and why? So far I have always used span or div tags... | stackexchange/codereview |
I am trying to access a web page using urllib2 and the automatic redirect in urllib2 does not seem to retrieve the entire page.
Here is my code:
request = urllib2.Request(link)
request.add_header('User-Agent','...')
opener = urllib2.build_opener()
page = opener.open(request)
print(page.code)
print(page.geturl())
prin... | stackexchange/codereview |
A problem of "value types" with external resources (like std::vector<T> or std::string) is that copying them tends to be quite expensive, and copies are created implicitly in various contexts, so this tends to be a performance concern. C++0x's answer to this problem is move semantics, which is conceptionally based on t... | stackexchange/codereview |
I have some classes looking like this:
class Base:
subs = [Sub3,Sub1]
# Note that this is NOT a list of all subclasses!
# Order is also important
class Sub1(Base): pass
class Sub2(Base): pass
class Sub3(Base): pass
...
Now, this fails because Sub1 and Sub3 are not defined when Base.subs is. But obviously I can'... | stackexchange/codereview |
There is UIWebView approach to play YouTube video inside native IPhone Application.
Does anybody tried to do the sane for vimeo?
| stackexchange/codereview |
I am new to Iphone and i want to make bar chart can some one provide basic tutorial for it.I want make Simple line and small rectangle portion to show coordinate.
Thanks .
| stackexchange/codereview |
The reason why I am asking this is because I was recommended by @Greg D (from this question) to use SetCurrentValue() instead, but a look at the docs and didn't see whats the difference. Or whats does "without changing its value source" mean?
SetValue()
Sets the local value of a dependency property, specified by its
d... | stackexchange/codereview |
I have this function which uses SSE2 to add some values together it's supposed to add lhs and rhs together and store the result back into lhs:
template<typename T>
void simdAdd(T *lhs,T *rhs)
{
asm volatile("movups %0,%%xmm0"::"m"(lhs));
asm volatile("movups %0,%%xmm1"::"m"(rhs));
switch(sizeof(T))
{
... | stackexchange/codereview |
I am trying to dynamically allocate an array of base(Student) classes, and then assign pointers to derived(Math) classes to each array slot. I can get it to work by creating a single pointer to the base class, and then assigning that to a derived class, but when I attempt to assign to the pointer to a dynamically alloc... | stackexchange/codereview |
Possible Duplicate:
Override default php function
Is there a way to detect that a function is being called and override with a separate function? I'm not sure function_exists does that.
| stackexchange/codereview |
I am using following code to detect the name of the Network Interface Card on my PC. I am using a USB Modem.
public class DetectNIC
{
public string ReturnNIC()
{
List<NetworkInterface> Interfaces = new List<NetworkInterface>();
foreach (var nic in NetworkInterface.GetAllNetworkInterfaces())
... | stackexchange/codereview |
I've wrote some application in Flash cs5, wich allow users to make their own Christmas Cards, but at the end of programming I realized, that I should to provide some function to save user's card to seperate SWF-file...
Please, anyone who knows, help me! I tried to find something in Google, but all what I understand is ... | stackexchange/codereview |
I am using Office Excel VSTO. I have a cell reference info of a cell in my workbook. say, Sheet1!$A$5. I want to get the information in this cell and its type. Is this possible in VSTO by any means?
I am now breaking this cell reference going to the sheet and cell get getting the values. I suppose more easy ways are po... | stackexchange/codereview |
I have a Ruby on Rails application that I am deploying on a computer running Mac OS X 10.6. The code where the problem arises is run by a delayed_job. The problem only occurs when it is run through delayed_job. If I run it within a console (rails console production) or call the API directly through cURL, it works witho... | stackexchange/codereview |
I need to implement the following scenario
ThreadN acquires a lock
ThreadM tries to acquire the lock and wait
ThreadX (monitor) sees that ThreadN is holding lock too long time and releases the lock
ThreadM acquires the lock and continue
Fate of ThreadN does not matter.
Which classes (from java.util.concurrent ?) shou... | stackexchange/codereview |
Why does LayoutKind.Sequential work differently if a struct contains a DateTime field?
Consider the following code (a console app which must be compiled with "unsafe" enabled):
using System;
using System.Runtime.InteropServices;
namespace ConsoleApplication3
{
static class Program
{
static void Main()
... | stackexchange/codereview |
is there possibility to retrive from NSFileManager paths without paths specified in some kind of filters without if's ? I know that there is a method includingPropertiesForKeys, but it can have only predefined keys, i would like to use custom ones...
Dose anybody encouter similar issus ?
Any sugestions are appreciated.... | stackexchange/codereview |
Im kinda new to OpenGL, but here is my problem :
I'm currently writing a world creator (for Lego Duplo Blocks) and i made my blocks in 3dsmax, then exported them to .obj file. Then i created a parser to parse the file. I basicly put everything in a glNewList. Then for every legoblock i've some parameters (containing th... | stackexchange/codereview |
My database.yml looks something like this:
# SQLite version 3.x
# gem install sqlite3-ruby (not necessary on OS X Leopard)
development:
adapter: sqlite3
database: db/development.sqlite3
pool: 5
timeout: 5000
test:
adapter: sqlite3
database: db/test.sqlite3
pool: 5
timeout: 5000
production:
adapter... | stackexchange/codereview |
I have an array inside an array and I'd like to simply print out the contents of it... the problem is what I'm trying doesn't work... ie
foreach($retval as $k=>$v){
if (is_array($v)){
foreach($v as $l=>$w){
echo $l . ' = ' . $w . '<br />';
}
} else {
... | stackexchange/codereview |
I'm allocating my pthread thread-specific data from a fixed-size global pool that's controlled by a mutex. (The code in question is not permitted to allocate memory dynamically; all the memory it's allowed to use is provided by the caller as a single buffer. pthreads might allocate memory, I couldn't say, but this does... | stackexchange/codereview |
in Python 2.6.5 with sqlite3.version 2.4.1, I use the following code:
c = conn.cursor()
# Create table
c.execute('''create table stocks
(date text, trans text, symbol text,
qty real, price real)''')
# Insert a row of data
c.execute("""insert into stocks
values ('2006-01-05','BUY','RHAT',100,35.14)""")
# S... | stackexchange/codereview |
Skip to the bottom if you just want to see the question without context
The android app I'm building has a simple table with three columns:
_id INTEGER PRIMARY KEY..., name TEXT, color INT
This table is called categories. I load my categories from the database and feed them into a SimpleCursorAdapter for use with a ... | stackexchange/codereview |
I have a containing div with an ID of "blog-container" and a set of sub-divs inside that with classes of "blog-item".
What I want to be able to do is fade all of the "blog-items" in "blog-container" out one by one, one after the other, and then fade them back in one by one in the same order.
Any ideas?
| stackexchange/codereview |
I'm working on an attempted social networking site with a relative of mine as a side project. I'm writing most of it bymyself. I have made it so each user is stored into a table with their data (mysql) and i want to do a single compare statement so that if a field is blank to change the recieved variable to "No data".
... | stackexchange/codereview |
I'm using the MVC.net framework and running into a strange issue with a jQuery ajax call.
I have a page that allows the user to enter an amount and then click ‘next’. When they click ‘next’, I make an ajax call to the server and return some updated information via JSON. This is all pretty standard stuff.
However, the... | stackexchange/codereview |
I'm using PyPy to translate some python code to C code. I wrote a very simple script as below:
def main():
print "hello world!"
def entry_point(argv):
main()
return 0
def target(*args):
return entry_point, None
Then I used translate.py --source test.py. It did generate C code successful. When I make ... | stackexchange/codereview |
Using Visual Basic .NET, how can you find the number of Saturdays and Sundays of a specific year and month?
| stackexchange/codereview |
I am using visual studio 2005 to build a c++ project. This project contains a resource file (.rc) file which includes another resource file (also a .rc).
Building this complains
fatal error RC1015: cannot open include file 'WrappedGrid.rc'
Now , I have the directory this is located in the the c++-->Additional Include D... | stackexchange/codereview |
when launching the following code in ADL, why does the square continue to rotate?
var square:Sprite = new Sprite();
square.graphics.beginFill(0xFF0000);
square.graphics.drawRect(-25, -25, 50, 50);
square.x = square.y = 100;
addChild(square);
addEventListener(Event.ENTER_FRAME, rotateSquare, false, 0, true);
function ... | stackexchange/codereview |
Is it possible to build a micro (proof of concept) web server in Javascript?
Has anyone done this before?.
EDIT: Apparently explicit clarification is needed here. The question is ultimately about how to push data from the server to the browser after the initial request made by the browser has been closed. In other wo... | stackexchange/codereview |
I have a Deep Directory Structure with the following format
/intf1/syst1/some1
/intf3/syst4/some111
/intf1/syst2/some2
/intf2/syst1/some1
/intf2/syst3/some9
/intf4/syst2/sdsds
Need the output, in the format"
syst1 syst2 syst3 syst4
intf1 x x
intf2 x x
intf3 ... | stackexchange/codereview |
I'm making a document-based application, backed by an abstract file storage system. Sometimes the files come from the local system (file://), sometimes they come from FTP, sometimes they come from SFTP, or theoretically even some non-standard scheme.
For all the local files I've been initializing NSData from the URL o... | stackexchange/codereview |
I am trying to create the following scenario...
A user logs in by inserting their user id and password.
If they don't have an email address assigned to their login details they are asked to submit one before they can continue.
They then continue to the home page in a logged in state.
The trouble I'm having is that th... | stackexchange/codereview |
The following C problem searches s1 inside s2 and returns the position that s1 was found in s2. i wrote this code and it works fine for values like s1: car s2: carnal but if i have s1:car and s2: cbrcarnal i think it enters an infinite loop or smth but it won't display nothing.Can you guys see the problem? it must be i... | stackexchange/codereview |
In answer to this question I tried to use Type.GetCustomAttributes(true) on a class which implements an interface which has an Attribute defined on it. I was surprised to discover that GetCustomAttributes didn't return the attribute defined on the interface. Why doesn't it? Aren't interfaces part of the inheritance cha... | stackexchange/codereview |
Please help me..
How to Copy all the data (only data not structure) from one excel workbook to another excel workbook using C#.
| stackexchange/codereview |
I am trying to compile a kernel module in Ubuntu 10.04 with kernel 2.6.35-22 and it is complaining about proc_root_driver missing. I did some searching and I found that is supposed to define this but in my version of the linux-headers, it isn't defined. Is there another global variable I am supposed to use in its pl... | stackexchange/codereview |
I am trying to inspect all elements of a std::set container in my C++ app, but visual studio 2005/2010 only displays the first 99 elements. How do I configure the IDE to show all elements?
Thanks..
| stackexchange/codereview |
What I want to achieve is to set background in two separate CSS classes (using CSS3's multiple backgrounds would be great). I would like to that with as little markup as possible and to be universal.
Example:
CSS
.button {
display: block;
}
.green {
background-color: #87b400;
background: -moz-linear-gradie... | stackexchange/codereview |
For a programming project, I need to read pixels from a loaded image using pyglet.
I used "pyglet.image.load('map.png')" to load the image, and I found out that you can retrieve the image data using img.get_image_data().
I use line mapImage.get_region(x,y,1,1).get_image_data().get_data("RGBA", 4)
to read the data from... | stackexchange/codereview |
I'm trying to to teach a neural net of 2 inputs, 4 hidden nodes (all in same layer) and 1 output node. The binary representation works fine, but I have problems with the Bipolar. I can't figure out why, but the total error will sometimes converge to the same number around 2.xx. My sigmoid is 2/(1+ exp(-x)) - 1. Per... | stackexchange/codereview |
Ok, this is a little weird. Ignore what I am trying to do, and look at the result of what happens in this situation.
The Code:
static string rawNumbers="1,4,6,20,21,22,30,34";
static IEnumerable<int> numbers = null;
static void Main(string[] args)
{
numbers = rawNumbers.Split(',').Cast<int>();
for (int i = 0;... | stackexchange/codereview |
Alright I have the MYSQL query code setup to pull this information out of my database. What I would like to do now is count by code but group it by name.
$sql = "SELECT m.*
FROM (SELECT DISTINCT Code
FROM Transaction) md
JOIN Transaction m ON m.ID_Transaction = (SELECT ID_Tr... | stackexchange/codereview |
I've got a search function loading results with ajax and shows the results using a slide animation. Works great! But only the first time unfortunately, the second time (and onwards) the slide down animation doesn't work.
Please have a look here:
http://jsfiddle.net/e4sQh/4/
The search is'nt performed there and no ajax ... | stackexchange/codereview |
How do i run a javascript event after a postback within an updatepanel
| stackexchange/codereview |
So I've got a web applcation in the midst of wireframing, but I've run into an issue that requires a technical solution before I can solidify this model; that being:
Fig. #1 User creates new 'text-field'
element (a div with a max-width.)
User then begins typing into said
element until...
Fig. #2 The element reaches it... | stackexchange/codereview |
What is the easiest way to do an HTTPS POST request in Delphi? I'm not having problems with making HTTP POST requests, but how can I do it using SSL? I've googled around and haven't found anything that explains this well enough.
Here's the code I tried:
procedure TForm1.FormCreate(Sender: TObject);
var
responseXML:TM... | stackexchange/codereview |
For example, I have a userControl that I want a user to be able to "Select".
Here is the code I'm using:
private void ptbImage_Click(object sender, EventArgs e)
{
SelectControl();
}
private void SelectControl()
{
this.BackColor = Color.FromArgb(235, 243, 253);
}
If I have many controls inside of this user con... | stackexchange/codereview |
I am trying to style the master page in Sharepoint Foundation 2010. I"m using the nightandday master and styles.
The design has no ribbon and I just need to turn it off. Just plain old off. When I set the ribbon div to display: none, the entire top banner disappears.
I'm not a sharepoint dev and am lost in general. Is... | stackexchange/codereview |
Before I start, I'm already aware that object immutability in Python is often a bad idea, however, I believe that in my case it would be appropriate.
Let's say I'm working with a coordinate system in my code, such that each coordinate uses a struct of X, Y, Z. I've already overloaded subtraction, addition, etc. methods... | stackexchange/codereview |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.