instruction_seed
stringlengths
1
35.8k
_source
stringclasses
1 value
It should work like this: Fire a bookmarklet Select the first element by clicking Select the second element It outputs a series of jQuery calls which would allow selecting the second element given a reference to a first element (i.e. using relative positions of the two elements in a DOM tree). Is there such a bookmar...
stackexchange/codereview
I am using custom fields in Wordpress to contain an 'RRP' currency value. This field is text based, but I want to be able to run queries where I can bring out posts which have an RRP in a specific range. I've been looking into the MySQL CAST function and this seems to be the right thing, but I can't seem to get it wor...
stackexchange/codereview
I am having some problems using raw IPv6 sockets in python. I connect via: if self._socket != None: # Close out old socket first self._socket.close() self._socket = socket.socket(socket.AF_INET6, socket.SOCK_RAW) self._socket.bind((self._interface,0)) self._socket.sendall(data) where s...
stackexchange/codereview
I have ListBox and i need set background "Transparent". I've selected in red, then that should be transparent: style ListBox, ListBoxItem, ScrollViewer and ScrollBar: <Style TargetType="{x:Type ScrollBar}"> <Setter Property="Stylus.IsFlicksEnabled" Value="false"/> <Setter Property="Foreground" Value="{Dynamic...
stackexchange/codereview
I've programmed for a while in Java and .Net, but never really used C or Objective C. I'm still trying to understand a few concepts. I was working on a simple program just to see how I can make an array of structures. Which I believe I got right. I'm having a hard time figuring out how to access the subclasses and sto...
stackexchange/codereview
I'm using Flot and would like to associate text with each individual plot point so that when I hover over the plot point the relevant data is displayed. I have used the following example http://people.iola.dk/olau/flot/examples/interacting.html which allows me to display a tooltip but I need to associate text with each...
stackexchange/codereview
In my entity data model I have an entity with one property as the primary key and another property that will have unique values too, so I’d like to create a unique index on that other property. The situation is very similar to the Person entity with the PersonID and PersonSSN fields. Is there any way to specify in the ...
stackexchange/codereview
I got this tip from a website that "shift + right click" on a folder in explorer in win7 will give us a context menu option by which I can open command prompt right there. I am looking for a hack that can make this simpler so that whenever I "right click" on a folder in explorer, I always get that "shift + right click"...
stackexchange/codereview
I have the following markup <div id="FirstDiv"> <div class="MyClass"> <span> <a href="#">link 1</a> <a href="#">link 2</a> </span> </div> </div> <div id="SecondDiv"> <div class="MyClass"> <span> <a href="#">link 1</a> <a href="#">link 2</a> </spa...
stackexchange/codereview
Does anyone know how to detect whether an incoming request is from a search engine robot? Do HTML headers contain any specific info for that?
stackexchange/codereview
I'm trying to import a few libraries into my program (which is a google AppEngine application). Basically, I'm supposed to put all libraries in the root folder, but I've just created another folder called lib and placed them within that folder. (I've created the __init__.py) Imports regularly work fine by using the i...
stackexchange/codereview
I'm building an ASP.NET MVC 2 website and right now, I have ugly spaghetti code in my view which I would like to make into a custom HtmlHelper. The current code in the view is : <%switch (Model.fiFieldTypeID) %> <% { case 1: // Text area Response.W...
stackexchange/codereview
i want my own pascal code to be executed it also have some uses files and other complex functions just like a Delphi code can i do this
stackexchange/codereview
this is the problem: i've got this piece of code... It keeps throwing a NullReferenceException at the stamp.AlterContents(); line. i've got no clue on what's going on. Any help appreciated! public static byte[] concatAndAddContent(List<byte[]> pdf) { byte [] todos; using(MemoryStream m...
stackexchange/codereview
in many languages there can be many possibilities to assing a string to a variable: var = "some 'quoted' string" var = 'some "quoted" string' var = `some 'quoted "quoted" string` var = somestring Of course in this last variant the space is not possible and end of string is marked by some special character like ; space...
stackexchange/codereview
Have a remote git bare repo that onto which I've pushed a branch from one machine, and pulled to another machine. Made some changes on the other machine, trying to push those changes back to the remote bare repo, and I get the 'receive.denyCurrentBranch' error. What's going on? This isn't supposed to happen on a bare r...
stackexchange/codereview
Most, if not all, tutorials use CGPDFDocumentCreateWithURL(). What is the difference if using CGPDFDocumentCreateWithProvider() instead? Let's say the pdf is being taken from a local file on the device, not downloaded from some website. Will there be a performance difference? Which is better?
stackexchange/codereview
I tried to make this to work, but I got "uninitialized constant ActionWebService" error when I use standard (old) actionwebservice, but if I install datanoise's actionwebservice gem I can't settup project properly to use them (in Gemfile with gem Bundler). There is a alternative? Someone make this think to work?
stackexchange/codereview
Please, I'm having this code: $('#menu ul > li:not(#menu ul.first li, #menu ul.second li)').mouseenter(function() { $(this).find('a').addClass('active'); $(this).stop(true).find('div.sub').slideDown(500); }).mouseleave(function() { $(this).find('a.active').removeClass('active'); $(this).stop(true).find('div.su...
stackexchange/codereview
I've been working on an AES CUDA application and I have a kernel which performs ECB encryption on the GPU. In order to assure the logic of the algorithm is not modified when running in parallel I send a known input test vector provided by NIST and then from host code compare the output with the know test vector output ...
stackexchange/codereview
I want to preview a report in a Delphi 7 program that connects to a SQL database. The database can use SQL or Windows Authentication. If SQL Authentication my program do: MyReportComponent.Connect.Server:=myServer; MyReportComponent.Connect.UserId:=myUserId; MyReportComponent.Connect.Password:=myPassword; MyReportCompo...
stackexchange/codereview
i'm trying to develop my first and simple videogame. I'm using SDL.NET (wrapper .NET of famous SDL) and c#. I'm trying to rotate my sprite (my "car") when user press down array, up array .. I'm using something like this.Surface = this.Surface.CreateRotatedSurface(90); But it not work ! I've error on screen... :( I k...
stackexchange/codereview
Sp 2010 content editor is better than 2007 but it's lacking lots of functionality. Is it possible to "substitute" standard rich text editor with something like FCK or Telerik editor? Any suggestions?
stackexchange/codereview
Using the facebook graph API (or any other means) is there a way to POST a new facebook page programatically? The "Publishing to Facebook" documentation of graph API suggest to me that you cannot.
stackexchange/codereview
SQL Server 2005+ I have a view with an INSTEAD OF INSERT trigger. Inside the body of the trigger, I want to use a statement with an OUTPUT clause which references both INSERTED tables: the outer INSERTED table for the INSTEAD OF INSERT trigger the inner INSERTED table for the OUTPUT clause MSDN says this: If a state...
stackexchange/codereview
For an upcoming project, one of the requirements is to translate the web application in a few languages, one of which is in Arabic. I know plenty about dealing with multiple languages, and know plenty about unicode. What I'm wondering is if there's some basic tips and recommendations I can follow anticipating an Arabic...
stackexchange/codereview
I have several NSButtons that are attached to a single IBAction. I need to differentiate inside the method between the different buttons. I tried the following, but it doesn't work: for (int i = 0; i++; i < 7) { if (sender == [NSString stringWithFormat:@"button%i", i+1]) { NSLog(@"sender is button %i",...
stackexchange/codereview
Friend's anybody provide some sample code to send SMS from android device. Thanks in advance.
stackexchange/codereview
I'm trying to add the tag widget from the plugin sfDoctrineActAsTaggablePlugin I've added "_tag" to my configuration.yml, and in _tag.php I wrote : <?php include_component('taggableComplete','tagWidget', array('object' => $form->getObject())) ?> But all I get now is the following error : "The module "taggableComplete...
stackexchange/codereview
I know with dynamic linq you can construct expressions dynamically in the same way that you might build and execute a dynamic SQL statement - e.g. a dynamic where clause or a dynamic select list. Is it possible to do this in cases where the schema is not known at compile time? In a database I'm working with users can d...
stackexchange/codereview
What site template would you recommend to create an intranet portal site? It is going to be used by 200 employees. It probably will have the following content department calendar company news employee search weather useful links new employee list presentation video User should be able to customize the portal based th...
stackexchange/codereview
rails 3 rspec-rails 2 In controller: def index @users = User.paginate :page => params[:page],:per_pae => 5 end In view: <h1>User list</h1> <% @users.each do |user| %> <p> <%= user.name %> </p> <% end %> <%= will_paginate @users %> Now I use rspec-rails 2 to test view. require 'spec_helper' describe "/us...
stackexchange/codereview
I have already one thread that has to do following work: public class DetectionHandler extends TimerTask { @Override public void run() { bluetoothAddresses = BluetoothModule.scanAddresses(); wiFiAddresses = WiFiModule.scanAddresses(); ...//when scanning is finished, continue work } I would like that scanning to be pa...
stackexchange/codereview
I have developing apps with google map .I follow material from android developers site and some other guidelines .wen i run the program the icon only point to the location .in background no map view displayed.can any one help to me ? Thanks in advance Regards Lakshmanan. Here is my source code, public class MapPage ext...
stackexchange/codereview
Someone work with nooku framework ? with entry point defined('_JEXEC') or die('Restricted access'); if(!defined('KOOWA')){ JError::raiseWarning(0, JText::_("Koowa wasn't found. Please install the Koowa plugin and enable it.")); return; } $view = KRequest::get('get.view', 'cmd', 'hellos'); echo "<pre>"; var_dum...
stackexchange/codereview
How to check if a menu with name, for example 'topnavbar' exists in WordPress 3?
stackexchange/codereview
I just started learning Haskell and I ran into a problem in 2-adic type classes. Here's the important code: data Rectangle = NoRect | Rect (Float,Float) (Float,Float) | Pane deriving (Show) class Collision s1 s2 where collides :: s1 -> s2 -> Bool instance (Collision Rectangle Rectangle) where collides...
stackexchange/codereview
In my application, I am having following UIViewControllers; HomeViewController FirstViewController SecondViewController, and etc... My question is; How can I find out whether SecondViewController is a current UIViewController or not ?
stackexchange/codereview
Im just getting started with PHP, and I need to export a table from my sqlite database to a CSV or ideally XLS. I have found an example using mysql, but i cant convert it to work with sqlite. Here is what i have so far: <?php $db = new PDO('sqlite:../ccm.sqlite'); $query = $db->query('SELECT * FROM Emails'); $expo...
stackexchange/codereview
In my Rails application I am able to upload only up to 1.5GB when using Internet Explorer, but when I use Chrome I am able to upload 10GB without a problem. Why is this? I am running Mongrel as my web server.
stackexchange/codereview
I have a python class/object as follows. class Hello: def __init__(self): self.x = None self.y = None self.z = None h = Hello() h.x = 10 h.y = 20 # h.z is not set I need to check if all the member variables are set (not None). How can I do that automatically? for value in ??memeber varia...
stackexchange/codereview
I'm certain that there must already be a many tools "out there" to do this, but I'm not having much luck tracking them down. I'd greatly appreciate your help. We have pretty big MySQL database, with many tables and some complex table relationships enforced via foreign key constraints. What we need is, to create another...
stackexchange/codereview
I have recently been prototyping an application using WPF and Client Application Services. I am trying to use all three features of the Client Application Services : Forms Authenticiation, Role Security, and Client Profile. I have managed to get everything working, but I feel like my solution is a kludge and want a b...
stackexchange/codereview
I have a nice CamelCase string such as ImageWideNice or ImageNarrowUgly. Now I want to break that string in its substrings, such as Image, Wide or Narrow, and Nice or Ugly. I thought this could be solved simply by camelCaseString =~ /(Image)((Wide)|(Narrow))((Nice)|(Ugly))/ But strangely, this will only fill $1 and $2...
stackexchange/codereview
How can i pass enum parameter by reference in java? Any solution?
stackexchange/codereview
The above UIActionSheet is thinner than the normal one. I took the screenshot from Safari when I try to bookmark some website. Mine or the default UIActionSheet in iPad looks like the following. It is thicker than the one in Safari, especially the border. How can I make my own UIActionSheet look like the one in Safar...
stackexchange/codereview
We have to implement the import procedure. The quantities of data is about 100 megabytes for one CSV files (the files already resides on server, so no upload necessary). Any advice on whether to implement the bulk "LOAD DATA LOCAL INFILE" or row-by-row "INSERT/REPLACE" on importing data into database. I've checked tha...
stackexchange/codereview
It is easy to see that G is between A and Z, but if I have a user enter a range of serial numbers from 56AAA7105A25 to 56AAA71064D6, how can I determine if another serial number or range falls between the two serial numbers specified before. In order for me to know if it falls between them, wouldn't I need to know ho...
stackexchange/codereview
I have an existing website and I would like to install blog with the same header and footer layout. Is it possible to place a blog in the middle/body of the page, incorporate into an existing web page? Or do I have to build it from scratch? Any suggestions would be helpful. Many thanks.
stackexchange/codereview
I am trying to make a control that displays a news item. There is an image that will be given in any size, but the control can crop to a square. There is also a headline and teaser. The headline and image will be on the same vertical level. The teaser will be beneath them: I want the control to stretch vertically to ...
stackexchange/codereview
This compiles and runs okay, but the results are totally different from what they should be. I've snipped irrelavent code: bool grid[1280][1024]; // hardcoded to my screen res for now for (int x = 0; x<1280; x++) //init grid to false { for (int y = 0; y<1024; y++) { grid[x][y] = false; } } gri...
stackexchange/codereview
I'm having some problems defining some operator overloads for template classes. Let's take this hypothetical class for example. template <class T> class MyClass { // ... }; operator+= // In MyClass.h MyClass<T>& operator+=(const MyClass<T>& classObj); // In MyClass.cpp template <class T> MyClass<T>& MyClass<T>::ope...
stackexchange/codereview
I know you can do something like this: $('#item').fadeOut().delay(1000).fadeIn(); which will fade the element with the id of item out, then wait a second before fading it back in again. But is there a way to fade one item out and a different one back in with a delay inbetween. I've tried this but it didn't work: $('#i...
stackexchange/codereview
Can anyone point to some resource which shows how the tables are set up ( for MySQL for example ), on each of the Rails associations ( one to one, one-to-many, many to many ). I understand how the associations work from a Rails point of view, but I don't understand how they work from the database's side.
stackexchange/codereview
I am trying to write this: post_view.id = 1 Comment.find(:all, :conditions => "post_parent_id = 'post_view.id'").size The second statement does not work because that is not an appropriate way to write post_view.id . Anyoone know the proper syntax?
stackexchange/codereview
I am getting strings from a database and then using the strings to build a URL. My issue is, some of the strings will have characters like < > & { } * general special characters, but the string may also have strings in. How would I replace the spaces with dashes and totally remove and special characters from the strin...
stackexchange/codereview
I hope you will reply to this: I once had this kind of array: NSArray *array = [NSArray arrayWithObjects:@"Object1", @"Object2", @"Object3", nil]; NSDictionary *arrayDictionaryDict = [NSDictionary dictionaryWithObject:array forKey:@"Key"]; [listOfItems addObject:arrayDictionaryDict]; Now I have this: NSDictionary *di...
stackexchange/codereview
All, I'm aware that by default an activity will be killed and restarted when the screen orientation changes, or a keyboard is slid in or out. (See Activity restart on rotation Android). My question is, what is the correct way to handle this from a Native code perspective? e.g. if I have a static block loading a nati...
stackexchange/codereview
I need to host Excel spreadsheet in our WinForms app. It looks loading the excel file into WebBrowser control is the way to go. There are several articles on the Internet about this. However, they mostly use Excel 2003 (I guess). Excel 2007 presents some new problems: By default, the Excel spreadsheet is opened up in ...
stackexchange/codereview
I have some code that if I'm at home; it will display at popup saying that if you are at home. If you are not at home it will display a popup saying you are not at home. As the script is located on a server to give an IP address, how can I get it to say if you are not connected to the internet, as it will fail to load ...
stackexchange/codereview
I can write a predicate that is satisfied when two lists are equal e.g. equal([2,3],[2,3]) would be true and equal([2,3],[4,5]). would be false. However, what if I want to have a list and try and match it with any list in a list of lists e.g. match([2,3],[[5,6],[4,6,2],[2,3]]). would be true because of the last list in...
stackexchange/codereview
Or I have to glDeleteTextures, glDeleteTextures one by one them? Or is there some kind of glDeleteAllTextures like function?
stackexchange/codereview
I am using onClick event for the image. When I am disable for the particular case, I didn't know exactly how can disable the onClick functionality using JavaScript. Sample code: <td> <a onClick="fun()"> <html:img src="/caleder.jpg ... /> </a> </td> calling fun: function fun() { // in fun I want to ...
stackexchange/codereview
I am learning ASP.NET MVC, and ran across a video on the asp.net/mvc website that showed how to retrieve a value from a textbox after a postback. In the video the author simply grabs the value from the Request object in the controller. It seems like this breaks the separation of concerns concept? By doing this the ...
stackexchange/codereview
Reading it at http://blog.programmableweb.com/2007/04/02/12-ways-to-limit-an-api/ I wondered how to accomplish time based limits (ie. 1 call per second). Well, if authentication required, the way is to compare the seconds tracked by PHP's time function (for instance, if ($previous_call_time == $current_call_time) { ......
stackexchange/codereview
Is it possible to change the header font color in Latex?
stackexchange/codereview
I want to configure ASP.NET Website Project using WCF Service[NetTcp] (both in c#) for web-farm (for website) and NLB Load balancing (for service). I would like to configure following options for same. NetTcpBinding.maxConcurrentCalls, NetTcpBinding.ListenBacklog and NetTcpBinding.MaxConnections Note: During single ma...
stackexchange/codereview
My environment is: WindowXP, IE8, VS2008, WatiN-2.0.20 When i try to execute the follow code: IE _browser = new IE(); _browser.GoTo(_url); _browser.Eval("alert('hello!');"); I get the following error: Message: "Access denied. (Exception of HRESULT: 0x80070005 (E_ACCESSDENIED))" Source: "Microsoft.mshtml" Partial Sta...
stackexchange/codereview
I am struggling to find a way to synchronize operation on IPhone app. I have three main NSOperation. NSInvocationOperation *showSpinner = [[NSInvocationOperation alloc] initWithTarget:self selector:@selector(spinnerOn:) object:YES]; NSInvocationOperation *reloadDatasource = [[NSInvocationOperation alloc] initWi...
stackexchange/codereview
I am improving a Delphi program... There is a procedure that expects a TFormClass argument (class of TForm). I passed in TForm1 or like and it did not like. E.g. procname(TForm1); There are other forms in the program that are passed in similarly in the program, yet there is no such compilation errors for them. E.g. the...
stackexchange/codereview
Hi I am new to iphone development. I want to obtain string from url path For example, the relative path: 90-000000-General_Motors i want to extract: General Motors if path is 90-000000-General_Motors/5.jpg i want to extract: 5 How can i acheive using simple coding
stackexchange/codereview
I'm creating a web application wherein users should be able to specify their weekly schedule. Here's my DB model for that: id user_id day from to day is an enum of 0-6 (0 for Sunday, 1 for Monday, and so on). from and to represent minutes from midnight. So, 0 means midnight, 1 means 12:01am, 2 means 12:02am, etc. Is t...
stackexchange/codereview
Is there a way to display external images with PHP having cache? I want display images like: www.domain.com/safe_image.php?url=external.site.jpg Basically like what Facebook does. What's best way to achieve this? Thanks. Edit This is my code now: $image_url = $_GET['url']; $ch = curl_init(); $timeout = 0; curl_set...
stackexchange/codereview
recently I encounter a problem. I am using two programs A and B, developed by someone else, which use TCP sockets to communicate each other, A is server, B is client. That is what I observed: when I start both A and B, they run and communicate with each other, if I first kill A, then restart A again, now by checking th...
stackexchange/codereview
I find this whole GetSchema thing awfully complex. Is there any decent documentation for all this at all? One would expect that normal use is to get data for table: indexes and columns(name, type, allownulls) and then have method(s) to ask these properties. One might also expect that these properties would be enum or e...
stackexchange/codereview
I am software engineering student, and we have assignment to create a system, which should be cross-platform, and should be implemented as a desktop app, and moreover, same interface and capabilities should be ported to internet(though I can choose the we server's OS). I have decent skills in python/django and ruby/rai...
stackexchange/codereview
Well heres my question. In my project im using a rest service to authenticate clients. That part is ok as I have used a simple authentication by hashing a user id and a password together. After the authentication I want to open to the users few other rest services through the modular scheme in zend framework. I am curr...
stackexchange/codereview
I am working on a uni assignment, which is to be done in C. This is my firs time programming in C, and I am VERY close to having a workable solution, but my code is throwing a Segmentation Fault during runtime and I simply cannot locate the cause. Here is my code: #include "./shared.h" #include "./scheduler.h" PCB_en...
stackexchange/codereview
Usually 'git log' shows all the commits contributing to the current point, even those commits that came from branches merged into the current branch. Is it possible to issue a command to only see the commits in a particular branch? That is, if there is an integration branch where everything is merged just before shipp...
stackexchange/codereview
The following code throws an exception when invoking "em.refresh(p)": 1: EntityManager em = emf.createEntityManager(); 2: em.getTransaction().begin(); 3: 4: Product p = new Product("J&D", 35.0,"Whisky"); 5: em.persist(p); 6: 7: em.refresh(p); 8: em.getTransaction().commit(); 9: em.close(); When debugging the code, we ...
stackexchange/codereview
So this question is (somewhat distantly) related to this previous question: Best way to be able to pick multiple colors/designs of symbols dynamically from flash I have a "person" so to speak, in flash, with a few different parts; head, pants, shirt and hat. There can be, for example, 10 different colors of shirts for...
stackexchange/codereview
I have three queries that I'm running through SQLite. These are what I'm running; the first is the table declaration and then the next 3 are the actual queries. Declaration: "CREATE TABLE IF NOT EXISTS items (busid INTEGER PRIMARY KEY, ipaddr TEXT, time TEXT DEFAULT (NOW()));" Queries: (Works) "INSERT INTO items...
stackexchange/codereview
I'm trying to use RelativeLayout to display a map tile, surrounded by directional buttons, in a simple dialog. I've tried a few variations, but inevitably, some of my buttons are missing. In this version of the example, the up and left buttons are missing. If I declare the up button first and place the tile button rela...
stackexchange/codereview
Invoking on a child a method defined in parent, where parent is a host object, gives EcmaError: method called on incompatible object. Host object defined in Java: public class HostObject extends ScriptableObject { public HostObject() {} @Override public String getClassName() { return "...
stackexchange/codereview
I have created my own cutom control in combination of two : button and a autocompletebox in silverlight. On a click event of a button i bind the itemsource of a autocompletebox and do this : acb.ItemsSource = p.ToArray();//list of an object of a class(person) acb.MinimumPrefixLength = 0; acb.IsDropDownO...
stackexchange/codereview
I am trying to show a simple text RSS feed from a CodePlex project in a window. My problem is that the feed text contains a lot of character sequences that looks like: &#58; &#45; etc.. I know that they represent the punctuation and some special chars, with some kind of encoding, but I do not know how I can convert th...
stackexchange/codereview
Hi I have this update statement UPDATE OPENQUERY(linkedServerToOracle ,"SELECT T$TDAT FROM BAAN.TTDSLS031010 WHERE T$CUNO='003098' AND T$CPGS=' 4AN00'") SET T$TDAT=CONVERT(varchar, '4712-01-01 00:00', 121) and the current setting in linkedServerToOracle (10g) is supposed to take the value '4712-01-01 00:00' as ps...
stackexchange/codereview
I've opened a repository on github, and am now trying to clone it using TortoiseGit 1.5.3.0. I'm getting these cryptic error: can't open pageant program git have not installed When I'm trying to follow the instructions on github, I'm getting the following error after doing "git commit -m 'first commit'" error: pathspe...
stackexchange/codereview
I have a form that on action: action="javascript:DoWallInsert($idf );".. Now on this form i have this submit button. I want onclick that it should be disabled, and then enabled again on success (the ajax call inside the function). <input name="submit" type="submit" id="submit" value="Send"> function DoWallInsert(BuID, ...
stackexchange/codereview
In the method of the class urllib2.HTTPDefaultErrorHandler what so the arguments - self, req, fp, code,msg, hdrs - refer to?
stackexchange/codereview
I want to programatically modify the widget attributes of a field in a Django ModelForm's init() method. Thus far, I've tried the following def __init__(self, *args, **kwargs): super(MyForm, self).__init__(*args, **kwargs) self.fields['my_checkbox'].widget_attrs(forms.CheckboxInput(attrs={'onclick':'return fal...
stackexchange/codereview
I need to make a function with the signature diffFolge :: (Integer, Integer) -> [Integer], which when applied to the argument pair (m, n) (m, n> 0) returns a descending list of numbers, the difference between the numbers beeing n. The first element of the Result list is m, the last but one element is always greater tha...
stackexchange/codereview
Is there a way to set the blending parameters so the whole scene renders in grayscale? (without using GLSL, only pipeline functions) Thanks
stackexchange/codereview
This is my HTML template. <div id='main'> <div id='1'>one</div> </div> I want dynamically create a new div with inside of main div and also it (new div>) will come to top of the main div. The answer look likes <div id='main'> <div id='new'>new</div> <div id='1'>one</div> </div> How can this be achieved?
stackexchange/codereview
I have had several contexts where table names or schemas were not hard-coded, but rather configured by the administrator, or, worse, generated from user input. Since cases were easy (schemas and table names in plain English, without numbers nor symbols), it was easy to avoid SQL Injection by just forbid any character o...
stackexchange/codereview
I'm using C# / .NET 4. I have a form with a WebBrowser component on it. I have loaded an external web page to the WebBrowser component. I have an event handler attached to the Navigating event. This works for most things. however, one part of the web site I'm loading executes a window.open(url) javascript command. Thi...
stackexchange/codereview
I have the System below one server 20 clients (could increase) the clients display a webpage that has the flex swf file. it will display a list. it will poll server every 1sec for any changes in the data. if there's any, it will refresh the data. the polling is handled using a url that returns json object. Now i want t...
stackexchange/codereview
My basic goal here is writing a .NET remake of Kingdom of Kroz. For those not familiar with the game: http://www.indiefaqs.com/index.php/Kingdom_of_Kroz http://www.youtube.com/watch?v=cHwlNAFXpIw Originally it was supposed to be a quick distraction project to give me a break from all the generic enterprise WCF/WF/LINQ2...
stackexchange/codereview
I was wondering, do I need to call DeleteObject in the following case? CFont* oldFont = label.GetFont(); LOGFONT oldLogFont; oldFont->GetLogFont(&oldLogFont); oldLogFont.lfWeight = FW_BOLD; CFont newFont; newFont.CreateFontIndirectW(&oldLogFont); label.SetFont(&newFont, true); // Do I need to call oldFont->DeleteObject...
stackexchange/codereview
I made a windows app and I need to add a "sort" by selected column. The grid has 4 columns and lot of records (paged of course). The question is: Should I consider to add an index for every column that need sorting in the grid? thanks in advances. Regards
stackexchange/codereview