instruction_seed
stringlengths
1
35.8k
_source
stringclasses
1 value
The following code opens the document specified by the 'app' parameter and then waits until the particular document has been closed. This works fine for all document types, except when you have an Excel workbook open and open another Excel workbook. The code thinks the document has closed when it is actually still open...
stackexchange/codereview
In short I am unable to access all the pixels of a bitmap image. I have used an intent to fire the native Camera app and returned a Bitmap image to my application activity. The data is definitely a bitmap object and I am able to display, get the height/width etc and access some pixels using getPixel(). However when I u...
stackexchange/codereview
I've already done it quite easily in the past with Silverlight, by declaring a BusyIndicator as my root element, and binding the IsBusy property to the IsLoading property of the domain context generated by RIA Services: <toolkit:BusyIndicator IsBusy="{Binding Context.IsLoading}" > Since there seems to be no IsLoading ...
stackexchange/codereview
I need to write a fiddler "lite" Windows forms application to perform some HTTP tracing of messages. Specifically I need to show the request/response XMLs to a server as they are occurring, highlighting certain elements etc. Could anyone point me to a F/OSS application doing something similar as a starter, or perhaps ...
stackexchange/codereview
I am trying to implement a simple plist example from "Beginning iPhone 3 Development book". I looked into the code but my data was never saved to a plist file. Actually my project site map is as follows: Whenever you launch the app it fires in TestViewController. On the TestViewController, there is a button. When you c...
stackexchange/codereview
I have this snippet of Scala code: def prologList(l: List[ScalaObject], sep: String) = "[" + (if (l isEmpty) "" else l.reduceLeft(_ + sep + _)) + "]" def neighbors(s: State) = prologList(trans(s).toList, ", ") def labels(s: State) = prologList(labeling(s).toList, ", ") The next-to-last line compiles fine, but on ...
stackexchange/codereview
I need a "shuffle albums" algorithm for my audio player like in foobar2k. So the problem is: I have a list of tracks, sorted according to some criteria so that tracks with same album are all adjacent. Now I need to be able to play songs from the playlist in "shuffle albums" mode, that is, if the next track is from the ...
stackexchange/codereview
Why I can write information to plist on simulator But can't do this on real iphone/ipod device ???? Is there exist an absolute path to put a .plist file in xcode project ??? Thanks for all reply and answers ~ code : this how I write text to plist from textfield NSString *plistPath = [[NSBundle mainBundle] pathForReso...
stackexchange/codereview
Just started playing with knockout.Js which is a fantastic framework Steve's really done well with that one. One thing I can't seem to do at the minute is impliment it with my Html Helpers. So for exmaple I've got : <%: Html.TextBoxFor(model => model.Division) %> but I'd line to use the databind on that but at the ...
stackexchange/codereview
greetings all i am using spring security 3.0.2 and my login form doesn't use the spring login configuration, it's a custom login form (i have to make it this way) i was wondering how to make a user remembered programmatically if he checked the remember me checkbox note: we have another login form that uses spring logi...
stackexchange/codereview
I am using BTrace 1.2 and followed user guide from BTrace website. I have no problems using BTrace on running programs with command: btrace <pid> AllMethods.class but when I try to start application with BTrace agent using either: java -javaagent:btrace-agent.jar=noServer=true,debug=true,script=AllMethods.class,script...
stackexchange/codereview
I am using the Rails auto_complete plugin: https://github.com/rails/auto_complete problem is when i submit a GET form containing this line <%= text_field_with_auto_complete :post, title %> the value of the text field gets wrapped in a :post in the url http://myapp.com/posts?post%5Btitle%5D=help I would much prefer ht...
stackexchange/codereview
I've got a Flash projector which I plan to distribute on CD. I'm making a projector for Mac and Windows. I know how to do Autorun on Windows, but I want to do so on Mac as well. How does that work?
stackexchange/codereview
I am on SQL Server 2008 R2 dev, server default collation is Cyrillic_General_CI_AS Executing in SSMS SELECT 'éÉâÂàÀëËçæà' COLLATE Latin1_General_CS_AS or SELECT 'éÉâÂàÀëËçæà' COLLATE Latin1_General_CI_AI outputs eEaAaAeEc?a on(in ocntext of/use dbName) of database with default collation Cyrillic_General_C...
stackexchange/codereview
I'm modifying "Randy Drisgill" blank master page template( publishing ) . I've added a combo box like, When I preview on web , everything looks fine as below, But I noticed upload document form is getting the same combo box header , Am I missing something ?
stackexchange/codereview
I want to display a UIProgressView indicating the amount of data received as I request JSON data using touchJSON. I was wondering if there was a way to listen to the size of the data being received. I request data using the following: - (NSDictionary *)requestData { NSData *data = [NSData dataWi...
stackexchange/codereview
For example you have the following string: $text = "word1:text1@atpart/foo/do/myfood$textfinal"; The function will work like: $parts = array(); extract( $regular_exp, $text, $parts ); In the parts array we will get this: $parts[0] = "word1"; $parts[1] = "text1"; $parts[2] = "atpart"; $parts[3] = "/foo/do/myfood";...
stackexchange/codereview
I have two .net 2 winforms, each has its own project. project 1 is main form and project 2 is a child form. and now I would like to know how to make the child form close it self if main form is no longer active. killing child form on exit doesnt work, because main form can be killed by task manager.
stackexchange/codereview
Greetings, I'm developing an Android app and need to open a url (with POST parameters) over https and get the response. There's the added complication that I have a self-signed certificate. I also need to accept cookies. Anyone have any ideas about where to get started? Many thanks in advance,
stackexchange/codereview
Since the Brazilian government does not have a public API for postal codes, I am trying to reverse engineer the code that correios.com.br uses to generate the image below so I can generate my own images to train the OCR program. I believe that I have already got almost everything right besides the text spacing and the...
stackexchange/codereview
I'm having trouble determining a way to parse a given text file. Here is an entry in the file: type = "book" callnumber = "1" authors = "a" title = "t" publisher = "p" year = "2023" each entry is separated by a line of whitespace (newline character). so i have these variables (type, callnumber, authors, title....), an...
stackexchange/codereview
My entity model was generated from the existing database. There is a many-to-many junction table picked up and hidden by EF. The relationship is definitely working because this query returns 2 users as expected. public IQueryable<User> FindUsersByGroupID(int group_id) { return db.Users.Where(u => u.Gro...
stackexchange/codereview
I am pulling two values from a MYSQL database. I have one int and one decimal...how do I add them? Currently, my code is: orderTotal += cartItem.Count * storeDB.Designs.Select(p => p.Price); // countItem.Count = int // storeDB.select = decimal How do I add these? I've tried type casting every which way. Any help is ...
stackexchange/codereview
I am trying to debug the Home Sample application(To change the theme of home) provided in android sdk. but I am not able to do so. No error is shown but no breakpoints are encountered either.I am confused.Can somebody suggest something?
stackexchange/codereview
I need to get all the objects in my application that implement a given interface. How can i achieve this? Thank you To clarify I'm looking for instances NOT for Types. To clarify again, i guess ill need to do something evil like get all the threads associated with my AppDomain and walk their stacks. Again- my boss's i...
stackexchange/codereview
Is it any keyboard shortcut or free addon in Visual Studio 2010 that allows to switch between header (C/C++ .h file) and implementation (C/C++ .cpp file)?
stackexchange/codereview
I am trying to replace the deprecated API PBHCopyFileSync with PBFSCopyFileSync as recommend in Files.h header. Surprisingly, Apple only says several lines for this new API: PBFSCopyFileSync Duplicates a file and optionally renames it. OSStatus PBFSCopyFileSync ( FSRefParamPtr paramBlock ); Availability Available i...
stackexchange/codereview
I have a table view set up in IB. It's delegate/datasource are connected to this class: @interface EditPlayersViewController : UIViewController <UITableViewDelegate, UITableViewDataSource> { I'm trying to call the reloadData method. If I use [self.view reloadData]; it doesn't respond, I guess because technically self....
stackexchange/codereview
I have a file structure like so: app.yaml something/ __init__.py models.py test.py I have URL set up to run tests.py in app.yaml: ... - url: /test script: something/test.py test.py imports models.py When I try to navigate to http://myapp.appspot.com/test/ I get the following error: Error: Server Error ...
stackexchange/codereview
Sometimes this (relatively strange looking) syntax is required to avoid a type mismatch. But what's the name of that syntax actually? Usage example from Google Guava (r07): ImmutableMap defines a method public static <K, V> Builder<K, V> builder() It can be used like this: ImmutableMap<String, String> map = I...
stackexchange/codereview
How to iterate the json data in jquery. [{"id":"856","name":"India"}, {"id":"1035","name":"Chennai"}, {"id":"1048","name":"Delhi"}, {"id":"1113","name":"Lucknow"}, {"id":"1114","name":"Bangalore"}, {"id":"1115","name":"Ahmedabad"}, {"id":"1116","name":"Cochin"}, {"id":"1117","name":"London"}, {"id":"1118","name...
stackexchange/codereview
get_class() will give me the eventual class of an object. I want to know all the chain of parent classes. How can this be done?
stackexchange/codereview
Recently while I was explaining the basic difference between pointers and references(in context of C++ programming) to someone, I told the usual explanations which talk about different function argument passing conventions - Call by value, Call by pointer, Call by reference, and all the associated theory about referenc...
stackexchange/codereview
I want to prevent users the ability to unlike my page having clicked they like it because I have it prominently displayed next to my site's header. I am afraid that people will accidentally "unlike" my page having already clicked it once to like it. So far I have explored a php proxy so I can use a custom css page. A...
stackexchange/codereview
I am working on a network project which uses TCPListener and TCPClient. I have two almost identical instances of my program running on two different computers, but for some reason one of the instances works fine while the other one blocks somewhere. What I'm wondering is if there is any way to debug what exactly is go...
stackexchange/codereview
I have a page that is written in HTML, I want to add a \ before every " and remove them before writing the code to the page. How can I perform this? NOTE: I use file_get_contents("file.php"); to get the contents of the file to be added to the database.
stackexchange/codereview
I have a hardware class having a pointer to a TLB class object, and initialising that in the constructor. However, Codeblocks (GNU GCC) is giving me the error "proj3_hardware.h|15|error: 'TLB' does not name a type" "proj3_hardware.h|15|error: expected ';' before '*' token" I just cannot see where is the error in the co...
stackexchange/codereview
I am trying to make a row of buttons which can be scrolled horizontally. Like the news items in a feed in the Pulse News Reader app. I've successful made enabled paging on UIScrollView with the page size same as the width of a button. i.e. 3 buttons on the screen at once, | 1 | 2 | 3 | , if I swipe left, it becomes | ...
stackexchange/codereview
I have a div I want to hide when clicking outside it. It almost works, except the button class is only changing once every two times. I click on the button, the active button class is added and the dropdown slides down, I click somewhere outside the dropdown, it slides up and the button class returns to it's original...
stackexchange/codereview
I am studying the source code for "The Elements" sample app and I see that in AtomicElement.h there are four properties declared as readonly: @property (readonly) UIImage *stateImageForAtomicElementTileView; @property (readonly) UIImage *flipperImageForAtomicElementNavigationItem; @property (readonly) UIImage *stateIma...
stackexchange/codereview
I'm starting a project where I need to ensure that a large volume of users can obtain a promotional code for multiple promotions. The codes have a monetary value attached to them so it is vital that only one code goes out to each user and no two users can ever receive the code. My plan so far is to create a table in SQ...
stackexchange/codereview
Following on from this question: What is causing urllib2.urlopen() to connect via proxy? I'd like to know which operating system & environmental settings can affect urllib2.urlopen? For example, I've noticed that on some machines within our very large corporation urllib2.urlopen insists on connecting via a proxy. This ...
stackexchange/codereview
I have a string "{'datetime': datetime.datetime(2010, 11, 21, 0, 56, 58)}" and I want to convert this to the object it represents. Using ast.literal_eval() gives: ValueError: malformed string; because it does not allow for construction of objects (i.e. the datetime call). Is there anyway to either get ast to process...
stackexchange/codereview
Does anyone know of any node.js style webserver framework for java? I realized that having nonblocking callback behavior while handling a web request will require deep support at the webserver level. I am interested in node.js, but when I have a web server that ends up persisting data, I would like to take advantage of...
stackexchange/codereview
If I have a mysql database on my own pc, I would use the following cnxn string to connect it to my java program : String url = "jdbc:mysql://localhost:port/dbname"; But if my database is made over phpMyAdmin, what would be the connection string ? one other note, the phpmyadmin database is not on my local pc now, it is ...
stackexchange/codereview
I'm trying to create a strongly-typed Dictionary class in VB.NET. I'm tired of typing Dim people as Dictionary(Of String, Person) and want to make a PersonDictionary class so I can say Dim people as PersonDictionary My reference material says to create a new class that inherits the DictionaryBase class. Then overr...
stackexchange/codereview
There's got to be a better way! I have a bunch of log records stored in a List. Each log record has a CreateDate field and what I'm trying to do is find an efficient way to query the List object to find the day of the week with the most log records (Monday, Tuesday, etc...). I'm thinking that this can be done using Lin...
stackexchange/codereview
I have spent a while going over all of the examples on http://www.silverlight.net/learn/quickstarts/ And I'm still pretty lost about Silverlight. I'm not understanding exactly how it gets 'on' to the website. Like... is there any kind of tutorial that shows how you make an HTML webpage that retrieves a silverlight page...
stackexchange/codereview
I threw down this code because it worked, but I really need to refactor to something acceptable. It accepts a set of query objects (strings that look like productid = 3) then adds them to my query. This only works for logical AND, but I will eventually need a few different logical operators (OR, NOT). -- Idea here is...
stackexchange/codereview
How can I capture a change in the URL on IE from a Browser Helper Object? An obvious way would be to use any of the common browser events such as onbeforenavigate, but how to capture a change like: url.com#hello changes to url.com#byebye Does this kind of change triggers any event on Internet Explorer?
stackexchange/codereview
i want to know how to configure haproxy and rabbitmq.i want to make my rabbitmq more scalable and available.... any link any idea anyone have
stackexchange/codereview
There was the Unladen Swallow project that aims to get a faster python, but it seems to be stopped : Is there a way to get a faster python, I mean faster than C-Python, without the use of psyco ?
stackexchange/codereview
I have a html file saved in memory and this file have some images (tag ). I can't load these images because they are in the assets folder and I don't know the absolute path. What is the absolute path to assets folder? I think that with the absolute path of the images I could to load these images in my html file into my...
stackexchange/codereview
I'm currently studying indexers chapter, but I'm unable to understand "this[int pos]" and "this[string data]" of the following code. Could anyone help me in this? class OvrIndexer { private string[] myData; private int arrSize; public OvrIndexer(int size) { arrSize = size; myDa...
stackexchange/codereview
I am getting an "translation missing" error message from Rails 3: activerecord: notices: messages: success: create: "Something was created" models: user: success: create: "Thanks for registration" I18n.t("activerecord.notices.models.user.success.create") # => "Thanks fo...
stackexchange/codereview
I have 2 tables, words and lists. words belong to lists and are references by listId field. lists contain a username field. I need to delete a word via it's id but first need to check that the username is correct also, therefore I need to reference the lists table. This is what I have so far but it does not work. DELE...
stackexchange/codereview
Typically an eclipse p2 update site is created inside eclipse through the process of creating a feature project containing one or more plugins/bundles and adding this feature to an eclipse update site project. Finally the update site is build and can be referenced through the update manager in eclipse. But is it possib...
stackexchange/codereview
From time to time I encounter this issue. Let's say that I did following to read the source code of rails because I am running into some issues. git clone git://github.com/rails/rails.git During the research I tested something and now I have a fix I would like rails core team to take a look at. How do I push my change...
stackexchange/codereview
I'm making a custom tumblr theme. I'm displaying one post per page. How can I get the title of the next page. For example, when using pagination: {block:Pagination} {block:NextPage} <a href="{NextPage}" class="nav">Next &#187;</a> {/block:NextPage} {/block:Pagination} This will create a link as such Next » wher...
stackexchange/codereview
I would like to add basic documentation content to the front page of PYPI of my module like it's done, for example, here: http://pypi.python.org/pypi/Jinja2. Right now the askbot download page has a default look and does not have much useful info, how can it be added? That is - which parts of the distribution package f...
stackexchange/codereview
I'd like to understand which is the best solution to draw custom interface for IOS application. I know that it's not easy to answer this question directly with code, but i think that it would be great get generic answers... only to understand in which direction i have to go! I use as example this Ipad RSS reader : ht...
stackexchange/codereview
The following is the code fragment : #include<sys/types.h> #include<stdio.h> #include<signal.h> #include<stdlib.h> #include<unistd.h> #include<string.h> sig_atomic_t child1 ; sig_atomic_t child2 ; void child1_handler( int sig_num ) { int ret ; if(sig_num == SIGUSR2 ) { printf("\n Recieved sigusr2 for ch...
stackexchange/codereview
I got a problem in querying an information in mySQL, here's the code: SELECT avatar FROM amcms_users WHERE username='admin' and the result is '59da6ceb5c74ac98f317a4b4af3c72f6.jpg' which is correct. Now when I load it on php page using these php codes... <?php $locAvatar = mysql_query("SELECT avatar FROM amcms_users W...
stackexchange/codereview
How can I translate this Java code: private List<MPoint> classes = new ArrayList<MPoint>(); // MPoint is my own class to C#? And what does final keyword mean in Java? What analogue there is to it in C#? I am newbie in C# and Java and I need help :)
stackexchange/codereview
I'm wondering how to make the effect of the tan rectangle as you scroll it follows (some kind of absolute positioning?), check it out: https://stackoverflow.com/questions/ask When scrolling downwards it sticks on the screen. Me like and me want :D I'd prefer JS targeting an elementID over CSS. If anyone can provide a t...
stackexchange/codereview
I am a newbie to NLP and trying to figure out how a Named Entity Recognizer annotates named entities. I am experimenting with Stanford NER toolkit. When I use the NER on standard more formal datasets where all naming conventions are followed to represent named entities such as in newswires or news blogs, the NER annota...
stackexchange/codereview
I have an apk file that I would like to run in the emulators but outside of eclipse.I see in the tools directory of the android sdk there is an emulator app but is there a way to test outside of eclipse? Thanks
stackexchange/codereview
I almost always work remotely, so i've been using netrw to work over ftp. I can set bookmarks, query bookmarks and even delete them... but i can't actually go to bookmarks ie. {cnt}gb throws this error: E121: Undefined variable: b:netrw_cur E116: Invalid arguments for function 21_NetrwBookHistHandler [ macvim snapshot ...
stackexchange/codereview
Hey, I am trying to get the current GMT time in vb.net and can't seem to figure it out. A lot of google threads pointed to using DateTime.UtcNow but that gives an incorrect GMT time. Any ideas? MsgBox(DateTime.UtcNow) 'outputs 11/21/2010 14:46:41 http://wwp.greenwichmeantime.com/ gives a time of 11/20/2010 11:46:41
stackexchange/codereview
I am doing a project in Java for my COSC 117 class and I get an error on my code saying that my boolean type of "done" is never read in. I cannnot figure out how to fix this. Thank you. import java. util.Scanner; public class PlayCraps { /** * This program will play the game of craps. The user will roll the...
stackexchange/codereview
Possible Duplicate: How to do relative imports in Python? How do I import from a higher level directory in python. For example: I have project/lib/lib.py project/stuff/main.py i want to import lib.py in main.py Thanks in advance
stackexchange/codereview
Assuming I start my java VM with the following parameters: -Xms1024m -Xmx1024m -XX:PermSize=512m -XX:MaxPermSize=512m Do the 512m PermGen space add to the 1024m memory or are they part of it? Or in other words, do I have a total memory consumption of 1536m or of 1024m? In the latter case, does that mean that the appli...
stackexchange/codereview
Suppose you have an arbitrary closed curve (endpoint returns relatively close to first point) generated through a bunch of dataset coordinates, how do you find the centerpoint and the boundaries of the resulting shape?
stackexchange/codereview
Im new to C# programming. Can someone please explain the following code: Console.WriteLine( "{0}{1,10}", "Face", "Frequency" ); //Headings Console.WriteLine( "{0,4}{1,10}",someval,anotherval); I understand that this prints two columns of values with the headings given, and {0} refers to the first argument given. But w...
stackexchange/codereview
So I have this hash below: a_hash = { "1" => "one", "2" => "two", "3" => "three", "4" => "four", "5" => "five", "6" => "six", "7" => "seven", "8" => "eight", "9" => "nine", "10" => "ten", "11" => "eleven", "12" => "twelve", "13" => "thirteen", "14" => "fourtee...
stackexchange/codereview
How can I sort an array as the one shown below with jquery's own functions? I assume that grep() is the one that I should be looking at? Thanks! The array: array ( array( 'id' => 0, 'name' => 'myName', 'weight' => 100 ); array( 'id' => 1, 'name' => 'myName2', ...
stackexchange/codereview
I'm trying to replicate many of the practices we use with NHibernate in EF CTP4. Currently we have a generic repository interface (CTP4 actually makes this quite easy with DbContext.Set). We are passing in the context and using StructureMap to scope it per HttpRequest. With NHibernate we pass in ISession (again created...
stackexchange/codereview
I am just starting to learn about mongo db and was wondering if I am doing something wrong....I have two objects: public class Part { public Guid Id; public ILIst<Materials> Materials; } public class Material { public Guid MaterialId; public Material ParentMaterial; public IList<Material> ChildMateri...
stackexchange/codereview
Originally posted on the Grails mailing list... I'm not generally a database guy but with the release of the latest mongodb plugin for grails, I wanted to see what the big deal is with noSQL databases. MongoDB seems pretty interesting. I was reading the information on Document oriented storage and came across the fol...
stackexchange/codereview
I don't have the PHP code sorted yet but I'm hoping someone will have a solution with any code as an example. Example of MySQL Tables: Pages Trash etc I want to create a delete page which will once the delete link is clicked the page is moved from the pages table into the trash table. So the file is not completely de...
stackexchange/codereview
I want to know if controller can fully replace http handler when no view involved. The function looks similar.
stackexchange/codereview
I need to catch the following tags + content in html source of the page: <li class="someClass someClass2"> ... some html code ... </li> I'm not very good at regular expressions, so I'll also appreciate comments containing links to a good tutorial. I've been checking http://www.regular-expressions.info/ out, but I'...
stackexchange/codereview
Is there a difference between method invocation time and method execution time. I think we can easily measure method execution time. But how can i measure the method invocation time. Would it be different each time. (Java)
stackexchange/codereview
I don't understand this line of code: if ([@"+/-" isEqual:operation]) where operation is an NSString (and that operation can be either a "+" a "-" or a "/"). How is it possible to check for them all at once without getting an error? Thanks, -z
stackexchange/codereview
I want to put a button next to a EditText and I want their heights to match. For example, from the built in Android browser: The Go button is the same height as the EditText field. I know I could wrap both these views in a parent layout view, and set both of their heights to fill_parent, and that would make them mat...
stackexchange/codereview
Is it possible to take two Sound objects and combine them into one Sound object so that one Sound plays, and then the second plays right after it? I can just play the first Sound and then the next right after it, but it would be much cleaner to combine them before playing the audio.
stackexchange/codereview
I've got a Rails 3 app (using Mongodb and Mongoid if that makes a difference), and in one of my models I have a field defined as a Date type. class Participant include Mongoid::Document field :birth_date, :type => Date end My controller is using the find_or_initialize_by feature of mongo: class ParticipantControl...
stackexchange/codereview
Environment: MSSQL standard edition – 2008 / Windows server 2008 (64 bit) I have lots of tables with merge publication (filtered) on windows 2008 server and it takes few seconds to insert/ delete single row on that database. This is what execution plan shows. Delete single row: 7 sec. It shows 47 queries. Insert single...
stackexchange/codereview
I have xml with header xml-stylesheet that indicates to xsl <?xml version="1.0" encoding="utf-8"?> <?xml-stylesheet href="1.xsl" type="text/xsl"?> <root> ...... </root> In a browser this will transform to html. How to see ready HTML after xsl-transformation in the browser? If I choose View Source I see XML of course. ...
stackexchange/codereview
This isn’t the original code (I stripped things back in trying to simplify for debugging), but it does display the problem. On the face of it, looks simple enough: - (void) testMethod: (TouchData) toi { TouchData newToi = toi; NSString *test = @"test string"; NSLog(@"string: %@", test); // in ‘re...
stackexchange/codereview
I have 2 buttons, when I click each button a timepicker comes out and return the time in the button. I have 2 text field and 1 label. In textfield 1 I put a number that will be subtracted to the difference between the time in button 1 minus the time in button 2. My second text field will have a number that I will mult...
stackexchange/codereview
I'm sure this question has been asked before, but I'm too frustrated to find it. All I want to do is add X amount of minutes to X o'clock. So, in my case for example I have a time 7:30am that I want to add 2:20 (two minutes and 20 seconds) to. (specifically in those formats). I've even done this before, but it seems ...
stackexchange/codereview
I have just read through lots of articles about how to create thumbnail screenshots and haven't found anything reliable. Is there an api I can simply enter the url of the website I want to take a screenshot of and have it returned as an image using PHP?
stackexchange/codereview
I have the following skeleton of a class. As you can see in the TODO: comment I will be implementing an AsyncEnumerator construct here. This method will grab a request and pass the data off to another method to be proccessed. Based on the process I would like to call the events, either SendMilestoneReached or SendFaile...
stackexchange/codereview
Is there a possibility to use mit scheme as a simple compiler (without runing Edwin) in Windows? I want to edit code in wditor of my choice and compile it, but I haven't found and option to do this. When I execute... mit-scheme < file.scm ...I get a window with: "can't find a readable default for option --band. se...
stackexchange/codereview
I have a c# source file. Is there any way to put something like #!/usr/bin/env mono, so it will be compiled and then run as executable: For python for example, i'll do like this: #!/usr/bin/env python In fact, what I want is to run the script without calling "mono the.exe", after compiling. I want something like "./th...
stackexchange/codereview
Update: i wrote some wrong statements about the use of header in php; so forget that part :) What i want is to fetch and display a controller's view (with controller's data) from another controller, without have url change in browser. Some details: Redirect doesn't do the job because is a direct redirect (via browser)...
stackexchange/codereview
I'm trying to fetch some webpages using the code below: public static string FetchPage(string url) { HttpWebRequest req = (HttpWebRequest)WebRequest.Create(url); req.Method = "GET"; req.UserAgent = "Mozilla/5.0 (Windows; U; Windows NT 6.0; sv-SE; rv:1.9.2.12) Gecko/20101026 Firefox/3...
stackexchange/codereview
Where to get started if I want to design a web service with RESTFul API? Any built-in support from .Net Framework or any 3rd party tool recommend?
stackexchange/codereview
In Kohana's core class, there is a constant FILE_SECURITY. string(60) "<?php defined('SYSPATH') or die('No direct script access.');" Now obviously if you place this at the start of your files, and if it is accessed outside of the Kohana environment, it will die(). But what is the purpose of this constant? We can't eva...
stackexchange/codereview