instruction_seed
stringlengths
1
35.8k
_source
stringclasses
1 value
I have experience using Netbeans with Java but am new to using it with Javascript. I know how to open javascript files within a Java Project but is there a way to open javascript in a "javascript project" where I might be able to "compile" the code and see possible errors. Is this possible or am I asking too much?
stackexchange/codereview
Hi all: I'm writing a class that inherit from TextView, and override its onDraw() method, but in the method, my invoke of canvas.drawText() doesn't seems to work, the code just like below: protected void onDraw(Canvas canvas) { // super.onDraw(canvas); Paint paint = new Paint(); paint.setColor(android.gr...
stackexchange/codereview
Which would be the best way to validate an upload form? Using the mime type at the moment, but that's not quite working - can't upload mpegs even though am looking for video in the mime type. Thank you Tom
stackexchange/codereview
i can generate random number between two numbers in c using this.. arc4random()%(high-low+1)+low; then now my requirement is...i want to make a number rare....thats mean if high=5, low=1, and rare=3, than 3 will be appeared much rarely than 1,2,4 and 5... Thanks
stackexchange/codereview
Im a bit curious about this Facebook's useful functionality. When I paste a URL on the 'What's on your mind?' box, it almost perfectly gets the body of the article. How does Facebook do this? Thanks!
stackexchange/codereview
i have been struggling with this for a few days, i even re-wrote half the code to try it another way. i have my annotations imported from a csv, and placed onto the map with tile and subtitle, i am trying in vain to add a tag to disclosue buttons so i can see which one was tapped, but having problems, whatever values ...
stackexchange/codereview
I've created an entity model using Entity Framework 4, which I've exposed via a WCF Data Service. One of my entities needs to have properties defined that are not persisted to the database, but the Entity Model designer doesn't allow you to do this. To get round this I've defined all my objects as POCO objects, which a...
stackexchange/codereview
Is there a way to find the day of the week in php with a particular date. I don't mean date('D', $timestamp); I mean if I was to supply a date like 2010-10-21 it would return "third thursday".
stackexchange/codereview
How can I from a ViewModel, find out what is the selected text? What I am doing wanting to accomplish is similar to the WMD Markdown Editor here on StackOverflow when you bold/format text. Work on the selected text and modify it
stackexchange/codereview
I'm creating tables using phpMyAdmin and want to define two different columns as indices. I'm not trying to create a multi-column index but phpMyAdmin creates them as such. Are there any possible issues with that? The fields don't relate to each other directly and both fields will not be used in WHERE clauses simultane...
stackexchange/codereview
i have created a plist file other than the default one that exists. Can i upload this plist file onto the server I tried ASIFormDataRequest. I was able to upload the image and text file but when i try it with plist it throws error at point shown in bold: Code: networkQueue = [[ASINetworkQueue queue] retain]; NSString ...
stackexchange/codereview
I am currently working in small chat app in iPhone. I am call to web services; one for data sending, and other for get friends response. I am implementing the code as follows: NSMutableData *webData; NSXMLParser *xmlParser; NSMutableString *xmlParsingResult; NStimer *timer; -(IBAction)send:(id)sender { //req includ...
stackexchange/codereview
I want an nginx location directive that would match all urls with "xyz" and not match ".php" I tried this location ~* /(.*)xyz/(.*)(?!\.php)(.*)$ {} but for example it always seem to match both /xyz/1 and /xyz/1.php but it should have matched only /xyz/1
stackexchange/codereview
public class ElapsedTime { public int hours; public int minutes; public void ElapsedTime(int h, int m) { hours = h; minutes = m; } } from another event i am doing this: ElapsedTime BeginningTime = new ElapsedTime(); how would i initialize the h and m? when i try to do this: Beg...
stackexchange/codereview
At a certain stage, I am applying CSS to a section of my page. Is there an event one can get once the re-layout has completed?
stackexchange/codereview
Javascript (ECMAscript) supports the Array.prototype.forEach method since version 1.6 (ECMAscript edition 3, 2005). So quite a lot of browser already support that method and it's incredibly fast in comparison to jQuery's $.each() method for instance. (Actually it beats all implementations, regardless which Javascript l...
stackexchange/codereview
C# question. Say I have a customers class that has a bunch of props for storing string only data such as name postal data and phone numbers. I don't use this entity for ORM as I'm only adding it to some type of collection for use during app life cycle. Additionally I don't need to add any entity specific methods to it...
stackexchange/codereview
I am using dcramer's version of django-paypal(but i think it shouldnt matter whether it is dcramer or johnboxall's). 1) How can i specify multiple items in my paypal_dict(to be used in PayPalPaymentsForm)? 2) Also, i need to suitably specify the shipping cost and the individual quantities in the Summary that appears in...
stackexchange/codereview
I need to accept values (username and password) from the user, when he clicks menu button and one of the button that says login. When the login button is clicked, a pop up should show up that accepts the values and should have an ok button. Expecting a pop something like when we try to download an app from apple store ...
stackexchange/codereview
I'm coding in ASP.Net on a local machine through visual studio. So when I run the code it starts an ASP.Net service for me. So now I'm wondering how I setup an SQL server for local development purposes? I need it to have data in it constantly so that when I stop running the ASP page it doesn't just empty.
stackexchange/codereview
System.Windows.Forms.dll is located in the folder C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727. I want to download the latest System.Windows.Forms.dll to replace the old one on my machine. Does anyone know where can I download it?
stackexchange/codereview
I want to know how I can allow only five (5) words on text input using PHP. I know that I can use the strlen function for character count, but I was wondering how I can do it for words.
stackexchange/codereview
If so, please explain how. Re: what is distance -- "The distance between two strings is defined as the minimal number of edits required to convert one into the other." For example, xyz to XYZ would take 3 edits, so the string xYZ is closer to XYZ and xyz. If the pattern is [0-9]{3} or for instance 123, then a23 would b...
stackexchange/codereview
I have the following XAML: <Button Name="btnJeans" Click="btnJeans_Click" Padding="-1" > <StackPanel Orientation="Horizontal" Margin="0,0,0,17" Name="jeansItem"> <!--Replace rectangle with image--> <Image Height="119" Width="82" Source="{Binding Image}" Margin="12,0,9,0"/> <StackPanel Width=...
stackexchange/codereview
I have a custom user control that exposes a DepenencyProperty (ImageData). I've placed this user control on a page and I bind it's ImageData property to a property of my page's ViewModel (photo). <localControls:PhotoPicker ImageData="{Binding Path=Photo, Mode=TwoWay}"/> When the user interact with the control setting ...
stackexchange/codereview
I am calling a .NET WCF service from Ajax like this: result = $.ajax({ type: "POST", // async: false, contentType: "application/json; charset=utf-8", url: BaseUrl + "Services/YucataService.svc/SetGameStatusSecure", data: "{'gameID':'" + gameID + "','pid':'" + pid + "','status':'" + newStatus + "','...
stackexchange/codereview
I use the Kohana3's Profiler class and its profiler/stats template to time my website. In a very clean page (no AJAX, no jQuery etc, only load a template and show some text message, no database access), it shows the request time is 0.070682 s("Requests" item in the "profiler/stats" template). Then I use two microtime()...
stackexchange/codereview
If I have an protocol (say UIPickerViewDataSource) and I implement its required methods, do I need to declare those methods in the header file of my class? At the moment I'm not doing so and I get a warning of incomplete implementation (although everything works fine). If I do add the required methods in the then I don...
stackexchange/codereview
I want to implement a Home button in my Android App which will terminate the all the Activities but the first one. Instead of user pressing the Back button again and again, I want to give user a single button which will take him/her on the first (Home) Activity. Please help how to implement it.
stackexchange/codereview
Quick Background: $ ls src file1 file2 dir1 dir2 dir3 Script: #!/bin/bash for i in src/* ; do if [ -d "$i" ]; then echo "$i" fi done Output: src/dir1 src/dir2 src/dir3 However, I want it to read: dir1 dir2 dir3 Now I realize I could sed/awk the output to remove "src/" however I am curious to know if th...
stackexchange/codereview
Can anybody tell me the site from which I can download Visual Studio 2008? Because Visual Studio 2010 is now able to be purchased I can't find Studio 2008.
stackexchange/codereview
What happens when a thread cannot acquire a Semaphore (due to lack of permit). Will it be moved to the wait state? EDIT:Will the thread start resume the previous execution sequence, when the semaphore becomes available.
stackexchange/codereview
Not exactly sure how to go about this. My app's database.yml development: adapter: mysql encoding: utf8 reconnect: false database: application-dev pool: 5 username: root password: angles123 socket: /tmp/mysql.sock I was thinking that it would be wise to go ahead and mysqladmin -u root --password=angles...
stackexchange/codereview
I am getting java.lang.OutOfMemoryError: GC overhead limit exceeded error when reading from a text file.I am not sure what is going wrong.I am running my program on a cluster having sufficient memory.The outer loop iterates for 16000 times and for each iteration of the outer loop the inner loop iterates for about 300,0...
stackexchange/codereview
I have an AJAX web part which is working properly in my local windows 7 environment, but when I deployed in the real environment which is running win server 2003, it doesn't work as I expected. Does anybody have an idea to resolve this? I am using MOSS 2007 Thanks in advance.
stackexchange/codereview
I know there's a if/then in the matching of regular expressions, but is there one in the replace? ie. I want to do in one regex "I have Foo Bars under $5 for sale" to be "Foo Bars~$5" "I have Foo Bars for sale" to become "Foo Bars" and NOT "Foo Bars~" I have an expression a bit like this at the moment: preg_replace("...
stackexchange/codereview
I am trying to find out the frequency of appearance of every letter in the english alphabet in an input file. How can I do this in a bash script?
stackexchange/codereview
I have a HTML DIV element: <div class="obj" height="this is attr 1" rel="this is att2" width="this is att3"></div> I've a new Variable: attArray: var attArray = new Array(); I want to get step by step each att in div.obj into attArray. How do I do it? attArray[0] = "this is attr1" attArray[1] = "this is attr2" attArr...
stackexchange/codereview
I have a group of Events that occurred at some Dates. Each event has a Date field. Now I'd like to create a Map where for each Date (taken from all dates of events) I will assign List of Events that occurred on that date. So in pseudocode : public Map<Date, List<Event>> function(List<Event> list){ Date[]dates = ne...
stackexchange/codereview
On a onetomany associations I am attempting to delete all the many associations and see that multiple delete statements are being executed. // The entities class Users{ ... public void setPhones(Set<Phone> phones){ this.phones = phones; } @OneToMany(cascade=CascadeType.ALL, fetch=FetchType.EAGER, m...
stackexchange/codereview
API-level Unicode GUI Native apps in C++ for Windows / Linux / Mac OS X. I am looking for writing a simple Unicode, GUI, Native, application, that can be run without need any non-standard library, written in C++ compiled with GNU-GCC (g++). NOT I don't mean one-code-source run-anywhere, but 3 (Win/Linux/Mac) code sourc...
stackexchange/codereview
I'm trying to cache lat/lon address pairs from Google Maps, so I need a data structure where the key is two ints (lat and lon). What's the simplest data structure for that? I thought of two ways so far: Nested hash: {37.734608 {-121.913019 "San Ramon, CA" -121.6 "Tracy, CA"}} Concat the two to make the key: {"37.73460...
stackexchange/codereview
If I run gem server and go to localhost:8808, one of the entry is haml and it says it depends on maruku and yard haml 3.0.22 [rdoc] [www] - depends on maruku, yard. An elegant, structured XHTML/XML templating engine. Comes with Sass, a similar CSS templating engine. Executables are css2sass, haml, html2haml, sass, s...
stackexchange/codereview
I am using HCS08 and Code Warrior. I am calling a C function from assembly. How can I pass parameter to this C function?
stackexchange/codereview
Is there any way to access a Windows "hidden share" from Cygwin? I've tried: cd //server/c$ cd //server/c'$' cd //server/'c$' cd //server/c\$ Cygwin doesn't like the '$'. EDIT: I have also tried mounting a drive to the network share and accessing that from Cygwin (as djondal suggests below), but no joy. For a drive m...
stackexchange/codereview
I want to add a QPushButton inside ListItm, so I have implemented the code as given below. But the button comes in the middle of the list, actually I want it at the lower end of the list item. How is it possible. Also that button click event is not working. Actually I want to disable the item click event directly and b...
stackexchange/codereview
I am gettting SQL time out error in my .net service. As the service is already installed on the production, is there any way I can increase the timeout for the service from App.Config file. At present, I am getting this exception after one minute, I have to make it to around 10 hours because the stored procedure we are...
stackexchange/codereview
I have codes below. elem.onkeypress=function(e){ if( (e.which===undefined?e.keyCode:e.which)==13 ){ //dosomething } } at IE8, it occus erros: 'which' is null or not an object how to fix this problem.
stackexchange/codereview
In PHP I can do this: $list = array("element1", "element2"); foreach ($list as $index => $value) { // do stuff } In C# i can write: var list = new List<string>(){ "element1", "element2" }; foreach (var value in list) { // do stuff () } But how can I access the index-value in the C# version?
stackexchange/codereview
When I first launch the apps, I want it not to show the tab bar. Then after the user logins, it brings the tab bar. So how can I do this? Do I just hide the tab bar at first place then after the login succeed I will show the tab bar or I should have a UITabBarController inside the UIViewController for the first time?
stackexchange/codereview
I have created an example below to illustrate the problem I'm having. Basically, when I separate a template class into separate .h/.cpp file, I get unresolved symbols for the constructor. Using a single file, it compiles fine. What is causing this? fruits.cpp: #include "apple.h" class FruitsDB { public: ...
stackexchange/codereview
I'm building an iPhone app that communicates with an external server via JSON. The JSON library I'm using parses the response string from the server into a dictionary. Currently I've got a method that I've written that just uses hardcoded strings as keys for the dictionary in a constructor I've written called initWithD...
stackexchange/codereview
It is common that programmers will need to interface with virtual-machines in their day-to-day workflows, and one popular way of doing so on Linux and Windows systems is with virt-manager. Is their a way to get virt-manager or a similar alternative running on a MacOS machine?
stackexchange/codereview
This is my first Silverlight app and my first go at C#. I have a C# class library that I access from Silverlight using COM. The C# library has a method that takes a Bitmap as an argument, however from what I can see Silverlight only has a WritableBitmap. Is there a way to convert a WritableBitmap to a Bitmap in Silve...
stackexchange/codereview
I want to implement a generic, thread save class which takes the RessourceId of an ImageView and the Url (http) where the desired image file is stored. It'll download the image and fills the src of the ImageView in the UiThread. I thought AsyncTask would be the best thing for me. However I noticed that I only can pass ...
stackexchange/codereview
I have a question connected to this code: t = -20:0.1:20; plot3(zeros(size(t)),t,-t.^2); grid on hold on i = 1; h = plot3([0 0],[0 t(i)],[0 -t(i)^2],'r'); h1 = plot3([-1 0],[0 0],[-400 -200],'g'); for(i=2:length(t)) set(h,'xdata',[-1 0],'ydata',[0 t(i)],'zdata',[-400 -t(i)^2]); pause(0.01); end In this co...
stackexchange/codereview
I'm developing a mobile web application and I have a home screen with a number of icons on it, so I tried to use a sprite to serve all the images in one swoop. I noticed, however, that the iphone4 scaled the images in my sprite fairly well (they looked a little dithered), but on my HTC Evo the sprite rendered images lo...
stackexchange/codereview
Environment is MySql 5.1.5. This is a snippet from a larger stored procedure. Assume the variables are properly declared and set before this code is reached. When I run the following loop, something seems to be failing in the CONCAT. @columnName and @xmlQuery are both VARCHARs. When I "SELECT @xmlQuery" at the end o...
stackexchange/codereview
I need some assistance from the Flex experts. I have an mx:Menubar, which I need to be able to open/expand based on the key pressed. For e.g., if Shift + R is pressed, it needs to open the 'Request' topmenu. Then if Shift + N is pressed, it should load the 'New request' module in the module loader. I've already impleme...
stackexchange/codereview
Please let me know the Big Oh of the above.
stackexchange/codereview
Say I have a project with two branches master and dev. I have a bunch of commits on dev for a special event which once tested are merged into master. Then after the event is over I want to remove the event specific code. However a git reset won't do since other commits have been made since the event code was added. Cur...
stackexchange/codereview
I am new to Android and I want to develop 2D/3D games in Android. Can you suggest me good books and/or tutorials on the subject?
stackexchange/codereview
I'm trying to use the jquery :contains (or .contains()) selector inside a function, however I can't seem to get it to work. Basically I'm passing a string to a function and I want to check the variable if it contains X, do something else do something else. If that makes sense. Here's my code. function checkMe(myVar) { ...
stackexchange/codereview
I recently watched one of the WWDC 2010 videos: Session 311 - Advanced Memory Analysis with Instruments. The link is here. There is an interesting example in the video on finding Abandoned Memory. They say that it is often more important to debug than leaks but can be more difficult. Abandoned Memory is defined as "Ac...
stackexchange/codereview
I am using form_for, but I'm not sure how to create the password and password confirmation using the helpers? I have so far: <%= form_for :user, @user, .... do |f| %> <%= f.text_field :user_name, :class .... %> password?? <% end %> Also, when posting to the /user/create action, how to do I prevent certain fields...
stackexchange/codereview
I am reading DrRacket document http://docs.racket-lang.org/guide/binding.html There is a function (define f (lambda (append) (define cons (append "ugly" "confusing")) (let ([append 'this-was]) (list append cons)))) > (f list) '(this-was ("ugly" "confusing")) I see that we define function...
stackexchange/codereview
If I have a parent and a child table filled with data, is it trivial to add a new table between them? For example, before introduction the relationship is: Parent -> Child Then: Parent -> New Table -> Child In this case I'm referring to SQLite3 so a Child in this schema has a Foreign Key which matches the Primary Key o...
stackexchange/codereview
So I am using one third party library which is not very well documented. It has a method which takes a picture with camera and this is what it returns: 'E{\x7fM{\x7f;\x89\x89:\x89\x89=\x81\x87<\x81\x87O\x90\x7fJ\x90\x7fB\x87\x80I\x87\x80<{\x81={\x81A\x81\x82A\x81\x82E\x81\x81:\x81\x818\x80\x81?\x80\x81?\x8c\x85C\x8c\x8...
stackexchange/codereview
I am learning Python and just had this question. It possibly has no practical worth, I'm asking this out maybe because of a pedantic curiosity. I have a function: def f(): x = 12 #this is a local variable global x #this is a global I declared before x = 14 #changes global x <How can I return the...
stackexchange/codereview
I want have the info window content for a marker just a s below My code so far is loadEmbeddedMap : function() { var script = document.createElement("script"); script.type = "text/javascript"; script.src = "http://maps.google.com/maps/api/js?sensor=false&callback=initEmbeddedMap"; docu...
stackexchange/codereview
function bind_single_select() { if (!$("input#single").length > 0) { $("span.single_select").prepend("<input type='checkbox' name='single' id='single' checked='checked' style='vertical-align:middle' />"); } $("table#gridTable").find("tr").click(function () { if ($("input#single").attr("checked")) { ...
stackexchange/codereview
im doing this query on mysql, but its giving me duplicate results sets: this is my query: SELECT u.username, u.picture, m.id, m.user_note, m.reply_id, m.reply_name, m.dt, m.votes_up FROM user u, notes m WHERE m.topic_id =14 ORDER BY m.dt DESC i dont understand why its doing it? please help :)) EDIT: table schema notes...
stackexchange/codereview
Can you check this page and let me know why the menu doesn't work on IE7? It shows up all the way on the right, almost out of view. The page works okay in other browsers (including IE8 and IE9). Thanks.
stackexchange/codereview
If you do a join that looks like this SELECT T1.KeyField1, T1.KeyField2, T2.Field3 FROM T1 JOIN T2 ON T1.KeyField1 = T2.KeyField1 AND T1.KeyField2 = T2.KeyField2 Is there a way to not allow NULLS to match similar to the results this query would return SELECT T1.KeyField1, T1.KeyField2, T2.Field3 FROM T1 JOIN T2 ON T1...
stackexchange/codereview
I have an ANSI C code that is about 10,000 lines long that I am trying to use in an iPhone project. When I compile the code with gcc on the command line, I type the following: gcc -o myprog -O3 myprog.c This program reads in large jpeg files and does some fancy processing on them, so I call it with the following ./myp...
stackexchange/codereview
How can i convert the datetime format below 2010-10-25 11:13:36.700 into 25-Oct-2010 or 2010-10-25 00:00:00.000
stackexchange/codereview
I am using Visual Studio 2008 and Crystal Reports that is shipped with it. I would like to set certain properties of a chart such as Chart Title at Runtime. I have tried via ChartObject but there are only limited properties such as top, width, height etc. and not the properties I'm interested in. I included "craxddrt...
stackexchange/codereview
My program is crash intermittently when it tries to copy a character array which is not ended by a NULL terminator('\0'). class CMenuButton { TCHAR m_szNode[32]; CMenuButton() { memset(m_szNode, '\0', sizeof(m_szNode)); } }; int main() { .... CString szTemp = ((CMenuButton*)pButton)->m_szNode; // some...
stackexchange/codereview
To illustrate my question more clearly, let's suppose I have a include.html template with content: {% block test_block %}This is include{% endblock %} I have another template called parent.html with content like this: This is parent {% include "include.html" %} Now I create a templated called child.html that extends...
stackexchange/codereview
how can I change screen resolution programmatically in WPF? And how can I get a list of available resolutions for display? I tried have a go at the example described in this article: http://www.c-sharpcorner.com/UploadFile/Joshy_geo/changescreenresolution10102006112110AM/changescreenresolution.aspx But Screen and Reso...
stackexchange/codereview
I have a Brush Colour which I would like to change every so and so on a thread. static SolidColorBrush myBrush; Thread changeColourThread = new Thread(changeColour); static void changeColour() { myBrush = new SolidColorBrush(Color.FromArgb(255, 33, 96, 22)); } This returns an UnauthorizedAccessException, what...
stackexchange/codereview
I'm using the pretty fullCalendar jQuery plugin. I'd like to be able to have a title AND a detail on each event as in the screenshot below: Here the details are the participants for each session. (overflow hidden on the detail)
stackexchange/codereview
Does anyone know a way to convert a month, year, and day into the day's name for any year? Example: function convert(day, year, month) ... return "Monday" end Thanks in advance!
stackexchange/codereview
Trying to configure NUnit 2.5.8.10295 in Cruise Control.NET on Windows Server 2008 R2, .NET 4.0, my NUnit task times out, and nunit-agent.exe seems stuck running. It works fine from the command line. The only solution I've found is to define the environment variable COMPLUS_Version. Is there a better solution to this ...
stackexchange/codereview
I was recently trying to help a friend get started with Flash, and ran into a very weird bug. It looks like AS3 isn't being evaluated. Something as simple as a trace statement on the first frame of the movie doesn't produce any output. When I switch over to AS2, the trace statement works. What's going on here? Is it a ...
stackexchange/codereview
anywhere I read that values in select boxes (or anything else in the html code) should not be the primary key of the database table. For example: <select> <option value="1">Value 1</option> <option value="2">Value 2</option> </select> In the database there are lookup tables with these values as primary k...
stackexchange/codereview
I got a code from a client to fix the bug (code was written by some other programmer), So when I open the xib file it simply hang my computer, i restarted my computer 3 times because of that and finally decided to see what's happening by opening the Activity Monitor and it turn out it is opening something with name "In...
stackexchange/codereview
I want to get nearby cities from current location depending upon distance, e.g, cities in radius of 100km,200km etc using the gps of iphone. How can i determine these cties as gps only gives the details of the current location. Thanks in advance
stackexchange/codereview
Does anyone know how I can query the database to find what devices a database uses? There is the sysdatabases table and the sysdevices table but I don't know how to link them Anyone know?
stackexchange/codereview
I noticed that boost does not seem to support semaphores. What's the easiest way to achieve a similar effect?
stackexchange/codereview
Hello i'm trying to create an algorythm that finds out how many ways i can get change back. But i just can't get the implemtation right, i keep getting 4 where i should get 6 and i just can't see why. This is my implementation in C#, it is create from the pseudocode from http://www.algorithmist.com/index.php/Coin_Chang...
stackexchange/codereview
$foot = mysql_query("SELECT count(*) FROM tblQA WHERE intResponseID = '' AND cCategory = 'Football' as qcount, (SELECT max(dPostDateTime) FROM tblQA WHERE intResponseID = '' ...
stackexchange/codereview
I everyone i have a JSON Array that is construct like this for (var i = 0; i < count; i++) { var record = myDataStore.getAt(i); if (record.dirty){ submitRecords[currentIndex] = record.data; //alert(s...
stackexchange/codereview
I'm using the local database functionality in Chrome and Safari and what I do when I want to save this to a remote database is to create a hidden textfield and then using JSON to stringify each row. In the code behind I then parse each JSON object and insert it into the list. What I want to do now is to delete these ro...
stackexchange/codereview
I've tried lots of solution that posted on the net, they don't work. >>> import _imaging >>> _imaging.__file__ 'C:\\python26\\lib\\site-packages\\PIL\\_imaging.pyd' >>> So the system can find the _imaging but still can't use truetype font from PIL import Image, ImageDraw, ImageFilter, ImageFont im = Image.new('RGB',...
stackexchange/codereview
Because I didn't create textmate link when installing, so it can not find 'mate' command. who can help me to deal with this? thanks
stackexchange/codereview
I'm creating a forum website, where each registered user can write many posts and each post can have many comments. Also each user can comment on any posts created by any-other user. has_many has_many user ------------> Posts -------------- > Comments | ...
stackexchange/codereview
Below function working ok but I want to make it simple. if (list.Exists(delegate(string s) { return s.Contains(str); })) { string name = list.Find(delegate(string s) { return s.Contains(str); }); } I am using delegate(string s) { return s.Contains(str); } two times Is there any way to make this simple. I know h...
stackexchange/codereview
I recently started working on a web project which was already in progress; the guy who built the foundation for it had the signup page sending the form fields to a formmail Perl script, so that he could get an email when a user signs up. I'm not familiar with Perl, and my inclination is to just use the PHP mail() fun...
stackexchange/codereview
I am learning AJAX and I am trying to recreate this fairly simple example: http://www.w3schools.com/php/php_ajax_database.asp I created this database: So now to recreate the example I just basically copied and pasted the code: index.html <html> <head> <script type="text/javascript"> function showUser(str) { if (str==...
stackexchange/codereview