instruction_seed
stringlengths
1
35.8k
_source
stringclasses
1 value
I'm facing a little issue with Spring Security 3.0.x (3.0.2 in particular at the moment). The whole application I'm working on is working perfectly except when someone who doesn't have the authorities tries to log on. When it occurs, the users is redirected to the "welcome" page, since his username/password are valid, ...
stackexchange/codereview
What does ipython have that bpython lacks and vice versa? How do the two differ?
stackexchange/codereview
OK, this one has me stumped. I use the CLLocationManager services (iOS 4.1) in my application. The delegate gets called as it should at first. Then (some arbitrary time interval later), the delegate stops getting called. It almost looks like that RunLoop is getting blocked somewhere. I have even reduced the callback to...
stackexchange/codereview
<?php $im = new imagick('vui.pdf[0]'); $im->setImageFormat( "png" ); header( "Content-Type: image/jpeg" ); echo $im; ?> I am using heliohost, but when i run this script, it show me a 500 Internal Server Error (http://iamsnoob.co.cc/open.php ), why?
stackexchange/codereview
I am attempting to create a custom web browser based on the WPF Web browser control. I have implemented the IWebBrowser2 com interface and implemented the handlers for Navigating(), NavigatedTo() and LoadCompleted() events. But these event callbacks are fired only once for the top level page. Now suppose a page has so...
stackexchange/codereview
I have following MySql dependent code ( ORDER BY RAND() ) . I would like to know if there is hibernate HQL alternative for it (admin is boolean tag indicating that the user as an admin). This is working code: public long getRandomAdmin() { Session session = getSession(); Query selectQuery = session.createSQLQue...
stackexchange/codereview
I need to backup an access database from within VB6 code when the user clicks on a commandbutton named "Print". I am thinking that a seperate batch file would be ideal. How would one cause the batch file to run from VB? Once the batch file can be activated, I should be able to use a simple xcopy command to copy the dat...
stackexchange/codereview
Is there a reason the back-end PHP code could affect the layout of a page? This only happens in IE. In Firefox and Chrome, everything looks fine. Thing is, we have this HTML code, then a back-end code for the functions on that page is inserted by <?php include "[name of file]";?>. The php file we included has no styli...
stackexchange/codereview
I noticed from Android API, they have this method getPassword(Account account). accountManager = AccountManager.get(this); Account[] allGoogleAccounts = accountManager.getAccountsByType("com.google"); for (Account account : allGoogleAccounts) { System.out.println(accountManager.getPassword(account)); } But I hav...
stackexchange/codereview
I have an array of objects, like this: var companies = [ { "name" : "Company 1", "logo" : "/logo.gif" }, { "name" : "Company 2", "logo" : "/logo2.gif" }, { "name" : "Company 3", "logo" : "/logo3.gif" } ]; I want to filter this array to get only values which have a name which exists in ano...
stackexchange/codereview
I'm implementing a rasterizer for a class project, and currently im stuck on what method/how i should convert vertex coordinates to viewing pane coordinates. I'm given a list of verticies of 2d coordinates for a triangle, like 0 0 1 2 0 1 0 1 1 and im drawing in a viewing pane (using OpenGL and GLUT) of size 40...
stackexchange/codereview
Here is my formula, Not getting the right output.... I am looking for the monthly payment someone would have to contribute (with a rate of return %) to get their "Future Value"!! I am doing something wrong.. I believe it is really simple.. Thanks. //set default input text var loanText = 100000; var interestText = 10; ...
stackexchange/codereview
I just bought and downloaded Tom's Terrain Tool but I can't find instructions for how to install it. I've looked in the downloaded file - it's a compiled file. I've looked on his website and only find instructions for what to do after it's installed. I've googled around for instructions and can't find them anywhere. In...
stackexchange/codereview
I'm having some problems with the control focusing. My interface definition below has: source (RadioGroup/optional) destination (EditText) quantity (EditText) transfer (Button) I'm changing the visibility of the "source" into my code. When the times I don't display it, focus is automatically goes to "quantity" which I ...
stackexchange/codereview
why the below javascript code always returns null (mean alert) ? <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="WebApplication3.WebForm1" %> <%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Trans...
stackexchange/codereview
i write the script to generate the image and i write the text on the image. my doubt is if i send the header then only the image is displaying ... without sending header i can't display the images? I want to display 20 dynamically generated images with different text in one page. so when i create first image and displa...
stackexchange/codereview
My last experience with WCF 3.0 was pretty bad, because of this I reverted to using ASMX. I now see that WCF 4.0 seems to provide a better configuration model, my only concern is that with WCF 3.0 I had a lot of timeouts on extended service calls, however with asmx these timeout values can be configured through IIS and...
stackexchange/codereview
Possible Duplicate: How to send sms I need to send some sms to my customers regarding my site ..how can i achieve this ...
stackexchange/codereview
In my code im often adding some import statements like e.g.: using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Windows; using System.Windows.Controls; using System.Windows.Data; using System.Windows.Documents; using System.Windows.Input; using System.Windows.Media; using...
stackexchange/codereview
Let's say we have a method that mostly wires together various other methods; doesn't do a whole lot of its own logic. Let's say it's a typical member of a service class in a Service Layer, calling methods in domain model (business) classes, data access classes, and an email utility / service class. I'm finding that wr...
stackexchange/codereview
I found the following in an article: "DAO classes should never be called directly from the client (Services and other consumer classes). The clients should always call the domain objects which in turn should call the DAO's for persisting the data to the data store. ". This is not how I have seen things done before when...
stackexchange/codereview
I want a MouseListener for a JPanel inside a JTabbedPane in a JFrame... I want it to print something, whenever the mouse is clicked/pressed. I've tried looking around but when I try and implement it I got an error on this line: public class GUI implements ActionListener, MouseListener And this is the error: GUI is no...
stackexchange/codereview
I have set :precision => 8, :scale => 2 in decimal of migration but when i input 1923.423453 it is still 1923.4 . It should be 1923.42 ... right? t.decimal :value , :precision => 8, :scale => 2 , :default => 0
stackexchange/codereview
I've read many ODBC tutorials for C# on the net, and this code is the only one that didn't give me error. But the problem is, it doesn't do anything -.- How to fix ?? using System; using System.Collections.Generic; using System.Linq; using System.Windows.Forms; using System.Data.Odbc; using System.Data.Sql; namespace W...
stackexchange/codereview
How can I sort the below array by any of the child values (i.e: post_id, username, etc...)? Array( [0] => Array ( [id] => 10 [post_id] => 398 [user_id] => 0 [view_date] => 2010-11-20 15:26:00 [views] => 4 [username] => <em>guest</em> ) [1] => Array ( ...
stackexchange/codereview
When looking at mscorlib.dll via Object Browser in Visual Studio 2008, the IDE indicates that Int64 (as well as the other data types) has a base type of ValueType. In C#, I am aware that structs (which Int64 is) do not support object inheritance. I even checked the type metadata of an assembly in which I declared a ...
stackexchange/codereview
Consider I've two numbers 1023232 & 44. I want to generate a unique number representing this combination of numbers. How can i generate it? Requirement f(x,y) = f(y,x) and f(x,y) is unique for every (x,y) or (y,x)
stackexchange/codereview
So.. I thought I knew mssql fairly well but this one query asked of me today has me perplexed. Basically a piece of code somewhere uses the LIKE clause to determine how to filter certain values. I must point out that this cannot be changed, we cannot modify the query to use NOT LIKE. But what if that's what I want t...
stackexchange/codereview
I'm so used to working just with rectangles for collision detection that I'm a bit stumped right now. I'm working with diamond-like shapes, and for the past few hours, have been trying to figure out how to check for collision. I tried checking to see if the first objects four points are inside the points of the second...
stackexchange/codereview
I have a named cache and simply want to return (programmatically) its object count. I have a DataCache object: cache = factory.GetCache("cacheName"); I'm currently trying the following: cache.GetObjectsInRegion("cacheName").Count(); I realize that a region is different than a named cache, but I don't see any other me...
stackexchange/codereview
I did it but It did not work. I created: propel.schema.xml propel.schema.yml # config/propel.schema.yml propel: article: id: ~ the other db configuration is orgdb.schema.xml <?xml version="1.0" encoding="UTF-8"?> <database name="orgdb" defaultIdMethod="native" noXsd="true" package="lib.model"> <t...
stackexchange/codereview
BACKGROUND What I'd like to be able to do is create "packages" (simple ZIP files) of my Visual Studio solutions and projects. For example I want to be able to do the following: Create a "source" package of an entire solution (stripped of any source control settings or built binaries) Do the same as above except for a...
stackexchange/codereview
I want to test my Jersey resources with the Jersey Test-Framework. I followed the descriptions provided here http://blogs.oracle.com/naresh/entry/jersey_test_framework_makes_it http://zhanghaoeye.javaeye.com/blog/441759 to create a simple example. My example is hosted as git repository on http://github.com/rmetzler/J...
stackexchange/codereview
I'm trying to develop a basic program for editing audio and I'm having the following problem. I would pick two songs - separate files, no matter the format - and joining them into one. In this case, do a merge of these two files. Where would a responsible and sound with the lowest and one with the loudest sound in the ...
stackexchange/codereview
I am using Carbide.C++ 2.3 and S60 3rd FP2 SDK In Container's OfferKeyEventL function I am receiving all the key events but how can I identify key map/key group? I mean to ask how to identify is it Alpha key event or Numeric Key event or special key event?? Please guide me...
stackexchange/codereview
Can anyone tell me what is wrong with this? I'm getting a syntax error after the 2nd quote on the print line... It seems like this should work perfectly fine. Thanks def main(): print "blah" return main()
stackexchange/codereview
I would like to have several subplots in a row in a plot. However the apprearance of each subplot is narrow. How can I adjust the aspect ratio so that each subplot will become wider? Thanks! par(mfrow=c(1,3)) for (i in 1:3){ dest=density(out[,i]) hist(out[,i], xlim=range(dest$x),xlab=paste("x[",i,"]"),y...
stackexchange/codereview
<s:VGroup horizontalAlign="center" horizontalCenter="0" verticalCenter="0" gap="0"> <mx:ViewStack id="view" width="450" height="300" /> <!-- NavigatorContent dynamically gets added to view on appComplete--> <s:TabBar dataProvider="{view}" skinClass="skins.CustomSparkTabBarSkin" /> </s:VGroup> The Custom Sk...
stackexchange/codereview
What I have right now for file upload is: move_uploaded_file($filetemp, "files/$filename"); With filetemp referring to $_FILES['fileupload']['tmp_name'], filename referring to $_FILES['fileupload']['name'], and files referring to a folder of that name inside the folder where the PHP file is. However, this does not move...
stackexchange/codereview
Any recommendations on how to best access the Google App Engine Datastore? Via JDO, JPA or the native API? The obvious advantages of JDO/JPA are portability to other database engines, but apart from that, any reason not to work directly with the Datastore API?
stackexchange/codereview
So here is my program for receiving UTD messages. I am planning to use it to receive 640*480 YUV images over wifi. How big buffer should I set? Is it possible to set buffer after receiving first image to find out the actual size? Bellow is my whole code but basically my question is related to this line: memset(&(my_add...
stackexchange/codereview
I'm trying to work with mod_rewrite without particular problems but this: RewriteRule ^(product/)([^/\<\>].+?)(/)([^/\<\>].+?)(/edit)/?$ php/prd_edit.php RewriteRule ^(product/)([^/\<\>].+?)(/)([^/\<\>].+?)(/components/edit)/?$ php/prd_comp_edit.php the first URL is for this kind of contents when I'd like...
stackexchange/codereview
I am currently doing this but it isn't working: var tempArray=new Array(); var number = 15; tempArray[number]='blabla'; for (var key in tempArray) { alert(tempArray[key]); } the output that I get is: in_array function (element) { var retur = false; for (var value...
stackexchange/codereview
I want to be able to show the list of models on the page, and allow the user to select a few of them at the same time. For example, say I have a user selection screen, for the model: class User(model): first = # char field last = # char field birthdate = # date Then I want to show the users and let them sele...
stackexchange/codereview
This is what I have done so far: Created a class that has my overridden Execute function Added the needed strongly named assemblies to the GAC Created a Feature.xml file (see it below, this could be the problem...) Created a folder for my Feature.xml file in Program Files\Common Files\Microsoft Shared\Web Server Exten...
stackexchange/codereview
So I have built a small application that has a physics engine and a display. The display is attached to a controller which handles the physics engine(well, actually a view model that handles the controller, but details). Currently the controller is a delegate that gets activated by a begin-invoke and deactivated by a c...
stackexchange/codereview
I'm trying to reuse code, I have some tutorial view controllers / views, which I would like to call from an action sheet. However, the calling views are different. Sometimes the tutorial view(s) would need to be added as a subview and sometimes they would be added to the navigation controller. How can I expand my stand...
stackexchange/codereview
I'm launching the path C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Administrative Tools\IIS Manager.lnk via Process.Start, but it fails with The system cannot find the file specified. The link shows up on a dir, so it exists. Can it be permissions? Notes: The path is auto-discovered by iterating over the Star...
stackexchange/codereview
In a C switch-case flow control, it's required to put curly braces { } after a case if variables are being defined in that block. Is it bad practice to put curly braces after every case, regardless of variable declaration? For example: switch(i) { case 1: { int j = 4; ...code... } break; case 2: { //No ...
stackexchange/codereview
Under my parent component are three sub-components - a website and two window services. A hidden sub-feature also has the database scripts that are executed using SQLCMD. When I deselect any of the sub-features, it doesn't change size of parent component i.e. the size of the parent component doesn't decrease, it remain...
stackexchange/codereview
Hello I have setup visual studio express c++ project, with paths to included headers and libs Now I like to duplicate this project to be with the same paths to included headers and libs But with different name , I don’t what to go manually into .vcproj file and start to changes names Is there better way?
stackexchange/codereview
I would like to know if calling a method in the following format is any reason for LEAKS? [userLookupWS initWithUsername:[NSString stringWithUTF8String:(char *)sqlite3_column_text(select_system, 2)] andPassword:[NSString stringWithUTF8String:(char *)sqlite3_column_text(select_system, 3)] andURL:[NSString stringWithForm...
stackexchange/codereview
i am creating a web application that contains 4 important id's and to speed up identification of which auto incremented id is for what i was hoping to set limits on the autp incremented number. example: orderid = 10000000 so would generate a number between 10m - 19999999 palletid = 20000000 20m - 29999999 productid...
stackexchange/codereview
Say we have a single-producer-thread single-consumer-thread lockless queue, and that the producer may go long periods without producing any data. It would be beneficial to let the consumer thread sleep when there is nothing in the queue (for the power savings and freeing up the CPU for other processes/threads). If the ...
stackexchange/codereview
I want to play sound onclick event. I have code in which i can play sound in Firefox and other browser but not in safari. Below is the code. Safari gives me the error like "thissound.Play" [undefined ] is not a function. function EvalSound(soundobj) { var thissound= eval("document."+soundobj); thissound.Play(); } ...
stackexchange/codereview
I have a large file, so I have created a filter for removing invalid utf-8 characters from XML. class ValidUTF8XMLFilter extends php_user_filter { protected static $pattern = '/([\x09\x0A\x0D\x20-\x7E]|[\xC2-\xDF][\x80-\xBF]|\xE0[\xA0-\xBF][\x80-\xBF]|[\xE1-\xEC\xEE\xEF][\x80-\xBF]{2}|\xED[\x80-\x9F][\x80-\xBF]|\x...
stackexchange/codereview
is something like node.Attributes["name"].InnerText the good way?
stackexchange/codereview
I manually built Ruby 1.9.2 on Snow Leopard. Now I can’t find my old GEM files. I’m guessing they're in a different path now or something. So I have three questions: What is the "old" gem path, where gem install sinatra puts the sinatra gem? What is the "new" gem path, which is set when I build Ruby manually? How do I...
stackexchange/codereview
I have some simple HTML which I need to strip simple formatting. A nice house was found in <b>Toronto</b>. I need to remove the bold, but leave the sentence intact. How is this possible in jQuery?
stackexchange/codereview
I need to add a scroll for linear layout.I use the following code to create the linear layout.But it's not working LinearLayout llay=new LinearLayout(context); llay.setVerticalScrollBarEnabled(true); If i use the following lines i will get the Scrollbar. ScrollView sc=new ScrollView(context); sc.addView(llay); Bu...
stackexchange/codereview
I have a controller that instantiates a model and then calls a method to build associations. I tried to use this method to also set the properties of the model, but it didn't work and I'm wondering why. here is my code: #my controller user = User.new user.apply_omniauth(omniauth) debugger #my model def apply_omniau...
stackexchange/codereview
I tried compiling my personal contacts database program, but I have nothing but "cannot find symbol" errors Should I be instantiating an object more often than once? If not, what is wrong with this code? I moved writetoFile and readFile initializations to outside try block, and declared them inside, and it helped! Now...
stackexchange/codereview
I know this has been sort of answered before ( iPhone "touchesBegan" and "touchesMoved" message ... do not move to centre of touch ), but I'm very new to iPhone development so don't understand the answer. Essentially, what I want to do is have a UIImageView which responds to touches, to move it around the screen. The ...
stackexchange/codereview
I'm using GetPixel() from gdi32.dll in a .NET app to sample the colour of a pixel anywhere on the screen. It works ok but it is a major performance bottleneck for me. Is there a faster way of doing it?
stackexchange/codereview
Im writing stuff to an XML file using VB .net´s XmlTextWriter The code to start the xmlwriter is: Dim XMLobj As Xml.XmlTextWriter Dim enc As System.Text.Encoding enc = System.Text.Encoding.GetEncoding("ISO-8859-1") XMLobj = New Xml.XmlTextWriter("C:\filename.xml", enc) Is it possible to add param="on" to the first...
stackexchange/codereview
Once in a while it's difficult to write C++ code that wouldn't emit warnings at all. Having warnings enabled is however a good idea. So it is often necessary to disable warnings around some specific construct and have them enables in all other pieces of code. I've seen two ways of doing that so far. The first one is to...
stackexchange/codereview
Hi I found that there are some strange symbol in the invoice's PDF(Sales > Orders > Action > PrintAll). I am using Chinese language, could this be an encoding problem? How should I fix it? Thank you
stackexchange/codereview
Say I have a site with user profiles that have publicly accessible pages (each profile has several pages each). I'd like to show the users page view statistics (e.g. per page, for a certain time period, etc.). What's a good way to store page views? Here's what I was thinking: Table Page Views ================ - Id (PK)...
stackexchange/codereview
Hello World! Currently I'm writing a simple Client/Server application which uses sockets to do the communitcation. My Client and my Server application are working fine with each other but if I try to query my Server application with a real web-browser (like Mozilla Firefox), then it comes to an exception. I think that ...
stackexchange/codereview
unset($item_row); $item_row = array(); if ($row[1] == "BCP-Prod1"){ $row[1] = "BCP-Product1"; $item_row['nid'] = 71; $item_row['title'] = 'Product1 - This is the title'; } elseif ($row[1] == "BCP-SILLYNECK"){ $row[1] = "BCP-Prod2"; $item_row['nid'] = 77; $item_row['title'] = 'Products2 - This is...
stackexchange/codereview
Is there a way to encode bitmap data into PNG for use with a FileReference.Save() method in AS3? I assume I need an encoder library. Where can I get a library that encode BitpmapData into PNG?
stackexchange/codereview
I'm making a application with a main JFrame and some threads. I use a windowslistener on my frame to detect for the closing event. But sometimes when i close the application (closing the mainframe), there is delay due to the threads. it appears that swing wait for all thread finish before calling the windowsclosing() f...
stackexchange/codereview
I am having problems with my regex. It's returning the first match when I want it to return the last match. Regex Pattern: (?si)&chg_id= *?(.*?)\" String being searched: Display charges for the period 2010-05-04 11:21:00 to 2010-06-10 23:59:59 <A HREF="index.php?function=view_all_mobile&plan_id=224158&chg_id=1861161">...
stackexchange/codereview
What is the easiest way to create and save string into .txt files?
stackexchange/codereview
I have registered a custom MembershipProvider class in my Web.Config file. I'm using Inversion Of Control using Castle Windsor and I have registered my custom MembershipProvider class as transient (because it's using a service that's transient as well). This means that I want the Membership provider instance recreated ...
stackexchange/codereview
I want to watch videos from YouTube at a faster playback rate. A while back I asked if there is a utility that can speed up video playback. The only thing that was mentioned was some closed source project for Windows. I'm not a fan of either Windows or closed source. Another answer mentioned that you can download vi...
stackexchange/codereview
I have a Monotouch app which uses a sqlite database. I want to encrypt the database so I am doing this: _mainConnection = new SqliteConnection("Uri="+finalDB); _mainConnection.Open(); _mainConnection.ChangePassword("mypassword"); However, its not working (on simulator and iphone). It gets this error: at (wrapper mana...
stackexchange/codereview
[A follow up to this question: Possible to instantiate object given its type in C++? In Java, you can have a method parameter of type Class, and callers can pass in Foo.class. I don't consider this aspect reflection, though what you can do with the passed-in Class obviously is. Does C++ have any mechanism for passing...
stackexchange/codereview
Is it possible to record a sound clip directly on a linux server using a flash script without having a flash media server?
stackexchange/codereview
How do I add HTML5 placeholder attributes to Spring webmvc's form:input, form:password and form:textarea elements?
stackexchange/codereview
How do I disable the green icon on specific 'manytomany' or 'foreignkey' fields in automatically generated forms. Using css as follows: .add-another { display: none; } disables all of them which I don't want. An example would be the weekdays model (storing days from monday to sunday). A foreign key pointing to thi...
stackexchange/codereview
I just began the process of setting up a new Mac as a Rails development machine, but the thought occurred to me: do I have to do all this again from scratch or can I somehow copy/clone my development environment from my existing machine (also a Mac). Could I, for example, clone my machine using SuperDuper? Or are there...
stackexchange/codereview
I'm using GWT 2.1.0 I have a CellTable populated with Columns that use different Cells to edit different types of values (e.g. date, string, etc). I want the user to be able to click in a cell, type a value, and hit enter to go directly to editing the next cell down, or tab to go directly to editing the next cell over...
stackexchange/codereview
I am having trouble setting a orthographical projection matrix of dimensions 4x2 with (0,0) being in the center, (-2, -1) being at the bottom left corner, and (2, 1) being at the top right corner. I use glutInitWindowSize(600, 300); to initialize the window size. In my reshape function, I use glViewport(0, 0, w, h); to...
stackexchange/codereview
I have 100 sets of A objects, each set corresponding to a query point Qi, 1 <= i <= 100. class A { int id; int distance; float x; float y; } In each iteration of my algorithm, I select one query point Qi and extract from the corresponding set the object having the minimum distance value. Then, I have t...
stackexchange/codereview
I am using assembla and github and I have set up the correct Post-Receive URLs (Service hooks) to link the two services together and use powerful commit messages. I have the following issue. I have have 3 spaces with Post-Receive URLs (Service hooks) set up on github, all 3 spaces successfully receive the commit messag...
stackexchange/codereview
Integer[] ints = list.toArray(new Integer[]{}); If I remove "{}" the compiler asks to fill in a dimension for the array. What do the two braces mean as a command?
stackexchange/codereview
i created a Razor partial view in visual studio 2010 it added it as .cshtml file. It actually works, but development in it kind of sucks because the whole file is black on white, like notepad. no colors for html markup, and no intellisense. I also looked at the sample views that were added when i created a new Razor p...
stackexchange/codereview
I have custom SPlist with some fields that I'd like to bind to a repeater inside a visual web part. I can't use a SPDataSource as I have to do some custom stuff with the list before binding. How do I bind a custom column in this way? When I use Eval on a custom column I get an error If I do a test with the datasource i...
stackexchange/codereview
i have a table named IMAGES in which there is attribute name img_ID which is the primary key, there is another table called Favorites in which there are two attributes 'img_ID' & user_ID ... img_ID serves as the foreign key to an image and user_ID serves as foreign key to the user NOW i need details of from IMAGES of ...
stackexchange/codereview
I am using a simple mail sender class that uses the System.Net.Mail. I need to update my application so various users can send email via it (using the same smtp account) but the "From" address should be of the user who is causing it to be sent. I tried setting the From property of MailMessage, and sending the from addr...
stackexchange/codereview
public class fraktal extends JFrame { public fraktal (String args[]) { calc = new Calculator(632,453,raster, this); } calc.start(); } public static void main(String args[]) { new fraktal(args); } } class Calculator extends Thread { public Calculator(int sx, int sy, WritableRaster r, JFrame p) { ...
stackexchange/codereview
I am trying to login to a website and grab content from a page you must be authenticated to see. I have done some research and have seen some examples using both cURL and stream_context_create but I cannot get either way to work. I have the url for the page to login to, and the page that contains the data I need to get...
stackexchange/codereview
I have an email template in a view and I want to write a process that is ConsoleApplication that prepares emails to be send. Becouse it is ConsoleApplication I have no access to controller. Is it any way to render a view?
stackexchange/codereview
** Please people, this question is not meant to begin any flame war. ** I am trying to understand what happens to existing libraries implementing some functionality when the same functionality that was not previously there in the language now comes in as part of the language? For e.g. C++ would soon have std::thread as...
stackexchange/codereview
I'm just getting started with my first Ruby on Rails webapp. I've got a bunch of different models, views, controllers, and so on. I'm wanting to find a good place to stick definitions of truly global constants, that apply across my whole app. In particular, they apply both in the logic of my models, and in the decisio...
stackexchange/codereview
Here are the tables I have: employee -id project -id -employee_id role -id -project_id -start_date -end_date role_skill -id -role_id -skill_id skill -id -name So basically an Employee hasMany Projects, a Project hasMany roles, a Role hasMany RoleSkills, and a RoleSkill has a Skill I am trying to query for...
stackexchange/codereview
I am working on some MIPS assembly code, and am unsure how to allocate memory during runtime. So far, I've been using the stack or the data segment to store anything I may need, but what if I want something more persistent? To be specific, how do I know what memory address to choose when allocating? How do I know that ...
stackexchange/codereview
I have a class (MiddleMan) talks to a system and this talk is initialized by the MiddleMan's clients. If a 'talk' is successfully completed, MiddleMan will generate a token and return it to its client. The class design I have at the moment is like below: class MiddleMan{ private String token = null; privat...
stackexchange/codereview
I've seen ModelState.AddUnhandledError in a few code samples, but it doesn't seem to be part of the ModelStateDictionary class. Presumably it's an extension method? Is this a standard part of MVC? Anyone know where this is defined?
stackexchange/codereview