instruction_seed
stringlengths
1
35.8k
_source
stringclasses
1 value
I have code that sends a message into a MessageQueue. _queue.Send(new Message(myData)); This queue is on the local machine and the threads that Receive() from it are in the same process. What happens if the messages are inserted faster than they are extracted? Will Send() block? Is there a way for me to know if the Me...
stackexchange/codereview
After installing sharepoint server 2010 on server 2008 64 bit . every thing goes well no errors,but after clicking sharepoint server 2010 central administration from the program menu i got this message The version of this file compatible with the version of windows you you're running .Check yourf computer system infor...
stackexchange/codereview
I have a image drawn in an winform app and i designed a brush that moves after the cursor. The Brush is drawn every time so the image keeps flashing because the image is also redrawn . How can i avoid this ? Regards, Alex Badescu
stackexchange/codereview
I understand #div:hover:not(.class) works. However, how can I achieve a "hover" effect for a "LI" element , but exclude the hover effect when the mouse is over a certain "DIV' inside the LI? E.G. <li>Hello <div id="#no-hover">Bye</div> </li> I would like to get a hover effect for the li: li:hover{ text-color:#CCC; ...
stackexchange/codereview
Hey, I have simple 16-bit PCM player that I made using DirectSound. But when it plays, it seems that it plays only one speaker instead of both. I don't know what code to post exactly, so you'll have to tell me if you need any. I can say that I create the sound buffer using, and lock the stream using: WAVEFORMATEX wfx;...
stackexchange/codereview
Can anyone brief me the difference between Component object Model and Document Object Model and Elaborate what they are and how to use them thanks a million
stackexchange/codereview
Would it be possible to bind to Validation.HasErrors on any child control of a panel, without explicitly binding to every named control? Specifically i want to fire a trigger on a general style of a panel if any child control is in error state. Thanks.
stackexchange/codereview
I am trying to run this query: ALTER TABLE table DROP PRIMARY KEY, ADD PRIMARY KEY( `CUSTNO` , `DEPTNO` , `PRODNO` , `DT` ); I get Incorrect table definition; there can be only one auto column and it must be defined as a key
stackexchange/codereview
I want to use the UIPopoverController for a floating toolbar, as it does well at displaying in the best possible location. However it looks really ugly, with that thick black bar around it (and also the logic of using it for a toolbar is a bit hairy). So I am going to have a custom view for the toolbar. But I don't wan...
stackexchange/codereview
run("if [ -d data.bak ];then mv data.bak data;fi;") sudo('....') sudo('') I am using fabric deploy for my web project. I want to find a way that will stop the rest of the execution of the command, if it doesn't find the data.bak directory. Any way to achieve this in fabric?
stackexchange/codereview
Using AIR for Android, is it possible to call from Flex into an NDK library? If so, how can this be done? I have a large C library that I need to use. I know that I can do this from an Android Java app (through JNI), but I have a large Flex codebase that I'd like to reuse.
stackexchange/codereview
I am trying to use nginx as a simple load balancer for django per Jacob Kaplan-Moss' example: http://github.com/jacobian/django-deployment-workshop http://python.mirocommunity.org/video/1689/pycon-2010-django-deployment-w If I stop nginx and have apache listen on port 80 everything works fine. If I have apache listeni...
stackexchange/codereview
I've finally managed to add an Like button to my website, using the OpenGraph protocol and that FBXML thing, similar to this: <script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script><fb:like href="http://mywebsiteURL.com" layout="button_count" colorscheme="dark"></fb:like> In my iPhone app there's an U...
stackexchange/codereview
Is it possible to setup NHibernate to load/persist a non-public property of a class? For example I may have an Item class as follows. public class Item { public int ItemID {get; set;} public string Name{get; set;} } With the following mapping: <class name="RCL.Item" table="Items"> <id name="ItemID" type="I...
stackexchange/codereview
Let's say I have table foo, table bar, and table zoo. foo has a member bar and there is a one to one relationship between them. bar has a list and there is a one to many relationship between them. the list is not initialized automatically when bar is read (ie it is lazy) Using hql I would like to get a list of the foo ...
stackexchange/codereview
This works great for files. I marked the location needing refactoring to get it to work with a bitmap. I can't seem to find a compatible ContentBody for .addPart. The problem I am trying to solve is that I already have the image in an ImageView within an Activity, so rather than read it again from the SD cara, I want...
stackexchange/codereview
I'm having a problem with Drupal forms. Can't think of a way to solve it and I was wondering if any brain out there has the solution to my problem. I have this form: <?php function mymodule_myform(){ $form['#action'] = url('search/cards'); $form['whatwhere']['what'] = array( '#type' => 'textfield', '#title'...
stackexchange/codereview
I am working on a project which requires different validation sets for the same model, and we're trying to find the best solution to handle it. A simplified example could be using our Customer DTO: public class Customer { [Required] public string FirstName { get; set; } [Required] public string LastNam...
stackexchange/codereview
I've built a simple panorama photo viewer in jquery, see live example here: http://alafiariver.org/alafia/view/aldermans-ford How can I prevent this from being dragged too far? These photos vary in width, so the solution needs to be dynamic.
stackexchange/codereview
One of my Entity Framework Models contains a MS-SQL View. The View is called User and contains various properties for users. When I right click on the model and select Update Model from Database, I get the following error: "An exception of type 'System.InvalidOperationException' occurred while attempting to update from...
stackexchange/codereview
If a member function is defined inside the class, it is an inline function. E.g. struct X { void mem_f() {} //mem_f is inline }; My question is whether a nonmember friend function defined inside the class is also automatically inline. E.g. struct Y { friend void friend_f() {} //is friend_f inline? }; A relev...
stackexchange/codereview
In big enterprise projects which objects qualify to use as a spring bean and which are not ? The types of classes I can think of are requests, responses, services. helpers, registries, business objects, factories, validation rules, adapters and many more as per app requirements. Can all of them can be springified ? If...
stackexchange/codereview
I have a view that returns my sales summary grouped by sales_date e.g. [{'sale_date':datetime.datetime(2010,10,5,0,0), 'salesum':2, 'item':1}, {'sale_date':datetime.datetime(2010,10,5,0,0), 'salesum':10,'item':3}, {'sale_date':datetime.datetime(2010,10,6,0,0), 'salesum':1, 'item':1}] I have done the grouping inside ...
stackexchange/codereview
Does any one have any idea about multiproject area support in asp.net mvc 3? As it was degraded to future status in mvc 2. If it is still not included then should we look forward for ASP.Net MVC Portable Areas via MvcContrib. Can you share your expreriences? What are the recommended way for managing a large application...
stackexchange/codereview
My javascript is function changeImage(imgID) { var baseurl = "media/images/"; if (document.getElementById(imgID).src == baseurl+"selection-off.png") { alert('Success'); document.getElementById(imgID).src = baseurl+"selection-no.png"; } else { alert('Fail'); } } and my HTML is <div id="mustard" class="check...
stackexchange/codereview
I am currently working on WPF touch-screen application. I am developing it on Windows XP machine. I have tested it on this machine and it works perfectly fine. But when I deploy it to Windows Embedded machine I start to get strange behaviour: all pop up messages, drop down list, context menus appear behind the main win...
stackexchange/codereview
So i recently learned this new trick of using Func Delegate and Lambda expression to avoid multiple validation if statements in my code. So the code looks like something like public static void SetParameters(Dictionary<string,object> param) { Func<Dictionary<string, object>, bool>[] eval = ...
stackexchange/codereview
I have the databases name in following format username_databasename Now I want to put separate database backups in username directory like /backups/username/backup How can I get the usernamae from that string I also want that if string does not contain underscore (_) then the backup should go to /backups/others/backu...
stackexchange/codereview
I had created the script below but the cordinate is not working right. please see my scripts and let me know what is wrong with my scripts. thanks /*mcc is the Instance name*/ var myMovieClip:Sprite = new Sprite(); trace("x" + mcc.x + "y" + mcc.y + "width" + mcc.width); myMovieClip.graphics.lineStyle( 1, 0xFF0000 ); m...
stackexchange/codereview
I am creating table with AjaxFallbackDefaultDataTable. I want to add image to each column and when user clicks any column for sorting, I want to change this image. Is this is possible?
stackexchange/codereview
I have a video element set to 100% width in a container div. That div has a max-width of 800px and min-width of 400px. When resizing the browser I need the video element to resize while retaining its original aspect ratio. Currently it resizes in width but remains its original height, adding letterbox bars above and be...
stackexchange/codereview
I have a classified website, and I recently changed the insertion of classifieds to use php Session variables instead of alot of POST and FORMS... So first BEFORE changing to Sessions, it worked nice and all special characters showed up correctly. Now that I changed to SESSIONS, I get funny characters instead of the sp...
stackexchange/codereview
I am creating an android application in which there are two activites. One activity contains a button. On the button click, i want to switch to other activity which displays a list view containing few options. Two switch between the screens or activities , i am using the following code Intent intent = new Intent(Activi...
stackexchange/codereview
In other languages like C++, you have to keep track of the array length yourself - how does Delphi know the length of my array? Is there an internal, hidden integer? Is it better, for performance-critical parts, to not use Length() but a direct integer managed by me?
stackexchange/codereview
Currently the autocomplete action when pressing the Enter key on a selected element is to put that elements value into the input box. How can I modify the behavior so that pressing the Enter key on an element triggers that elements embedded url. To simplify I'd like to make the Enter key have the same behavior as a mou...
stackexchange/codereview
I'm using jQuery with jsdom in my node.js app. Moreover, I want to use jQuery plugins(e.g. jQuery.diff), but I cannot find how to do this. Is there any way out?
stackexchange/codereview
hi i have two classes in android and in one class i have write an array and i want to access it in the main class but the error is give me that "force closed" here is my code package com.semanticnotion.DAO; import android.app.Activity; import android.content.Intent; import android.os.Bundle; import android.view.View...
stackexchange/codereview
So I have a table (person), that contains columns such as persons name, age, eye-color, favorite movie. How do I find the most popular eye color(s), returning just the eye color (not the count) using SQL (Microsft Access), without using top as there might be multiple colours with the same count. Thank you
stackexchange/codereview
I have a phpBB forum and would like to write an external class which can be used to send private messages to some of the users of the forum. Also, I'd like to automate the process of sending a post on the forum since some automatic notifications can thus be included in it. Something along the lines: PhpbbControl::sendP...
stackexchange/codereview
Is there a way to get a registered name if you have a PID?
stackexchange/codereview
I'm new to testing and rails but i'm trying to get my TDD process down properly. I was wondering if you use any sort of paradigm for testing has_many :through relationships? (or just has_many in general i suppose). For example, i find that in my model specs i'm definitely writing simple tests to check both ends of a r...
stackexchange/codereview
Hi I have installed a Team Foundation Server 2010, and it works perfectly over my Lan, but I need it to work over the internet too. My problem is that when Im connected to my team server over the internet, I get the following error, when I try to create a new Team project. TF218027: The following reporting folder could...
stackexchange/codereview
I have a date in(string) in dd-mon-yyyy format and I want to compare this date with system date. eg. I have 12-OCT-2010 and I want to compere this with system date in same format
stackexchange/codereview
What is the fastest way of converting an array of floats into string in C#? If my array contains this { 0.1, 1.1, 1.0, 0.2 } Then I want each entry to converted to a string with value separated by a white space, i.e. "0.1 1.1 1.0 0.2"
stackexchange/codereview
Python newbie getting a bit frustrated with the csv module. At this rate, it would have been easier if I wrote the file parser myself, but I want to do things the Pythonic way .... I have written a little python script that should save my data into a CSV file. Here is a snippet of my code: import csv wrtr = csv.writer...
stackexchange/codereview
I'm trying to configure log4j in an Eclipse plugin project using the following XML property file, that includes a custom appender called EclipseLoggingAppender: <?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE log4j:configuration SYSTEM "log4j.dtd"> <log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" ...
stackexchange/codereview
How can I get the description from an WMI class using vbscript? I found this example but it's in C#: // Gets the class description. try { // Gets the property qualifiers. ObjectGetOptions op = new ObjectGetOptions(null, System.TimeSpan.MaxValue, true); ManagementClass mc = new ManagementClass(namespace, ...
stackexchange/codereview
I could not find any info on the web and stackoverflow on how to get the first matching character subsequence from a Lucene Document. ATM i'm using this logic to retrieve results from Lucene: Document doc=searcher.doc(hit.doc); String text=doc.get("text"); if (text.length() > 80){ te...
stackexchange/codereview
I'm a novice at regexs and am currently trying to come up with a simple regex that searches for a serial number in the following format: 0217103200XX, where "XX" can each be a numeric digit. I'm using SQL Server Management Studio to pass the regex as a parameter in a stored procedure. I'm not sure if the syntax is an...
stackexchange/codereview
Rails 3 turns off the html_safe option by default. I want to revert this thing. I have a rails 2.3.8 app getting converted to rails 3. Almost every page breaks because of the rails3 default html_safe setting. Is there any way I can revert this to where it was in previous versions of rails ? Please help
stackexchange/codereview
First, sorry for my poor English. Second, my problem. I trying convert to JSON and back this structure: class Revision{ private String auth; private HashMap<String, List<HashMap<String, Object>>> rev; public String getAuth(){ return auth; } public HashMap<String, List<HashMap<String, Object>>>...
stackexchange/codereview
Something that's really bothered me about XHTML, and XML in general is why it's necessary to indicate what tag you're closing. Things like <b>bold <i>bold and italic</b> just italic</i> aren't legal anyways. Thus I think using {} makes more sense. Anyway, here's what I came up with: doctype; html { head { title "my w...
stackexchange/codereview
i have been asked to write a function which should be called in this way foo("Hello") This function also has to return values in this way: [Hello( user = 'me', answer = 'no', condition = 'good'), Hello( user = 'you', answer = 'yes', condition = 'bad'), ] the task has clearly asked to return string values. can anyone...
stackexchange/codereview
We have a web application that is well established and has a few hundred screens. Some clients on slow connections are annoyed that when they submit a page, or when a page is loading, there's no indication that anything is happening (the cursor just remains a pointer). This particularly seems to be an issue on Firefox...
stackexchange/codereview
I have a really heavy database, with multiple large tables, and lot of indexes. We keep constantly adding new indexes, and sometimes the old queries which ran ok at that moment, they come up to use a new index, the wrong for that query. I am wondering if there is some unit testing out there for MySQL queries, that can ...
stackexchange/codereview
I develop an GWT applicationwith HTTP basic login type. I have a "Logout" button that calls a server side method logout() public void logout() { getThreadLocalRequest().getSession().invalidate(); } after the call it executes Cookies.removeCookie("JSESSIONID"); Window.Location.reload(); in order to reload the pag...
stackexchange/codereview
I have a JavaScript string containing "true" or "false". How may I convert it to boolean without using the eval function?
stackexchange/codereview
as im using different email clients to read/send my mails i want to setup procmail to move my emails to a the folder which is normally done by Thunderbird filter feature. I know that i can do it by using the following code for procmail in my email users .procmailrc file: :0: * ^From:.test@host.name.com myfolder But i ...
stackexchange/codereview
I get an error <: cannot begin a template argument list on g++ compiler. Code template<typename T> class SomeClass; class Class; SomeClass<::Class>* cls;
stackexchange/codereview
does anyone know how to load a UTF8-encoded string using WebBrowser.NavigateToString() method? For now I end up with a bunch of mis-displayed characters. Here's the simple string that won't display correctly: webBrowser.NavigateToString("ąęłóńżźćś"); The code file is saved with UTF-8 encoding (with signature). Thanks....
stackexchange/codereview
My Situation: I implemented an apache Rewrite Map to redirect incoming requests based on a database RewriteEngine On RewriteMap dbapp prg:/usr/local/somewhere/dbapp.rb RewriteRule ^/(pattern)$ ${dbapp:$1} [R] So far everything works fine, but I want to decide in the dbapp.rb script weather to redirect or give the c...
stackexchange/codereview
I'm updating a LINQ object prior to SubmitChanges. The values of the object's properties are being taken from a series of TextBoxes. When I read in one specific TextBox, another TextBox changes its value with no apparent cause. //... loc.Lattitude = txtLocLat.Text; // txtLocLong.Text changes to previous value loc.Lo...
stackexchange/codereview
I am encountering some issues with one project. I need to use two libraries but one needs to be compiled with the /clr switch as the other cannot be compiled with this switch. Would there be a way to use at the same time those two libraries in one project? Currently it's compiled with /clr and I got linking errors with...
stackexchange/codereview
I have two projects ahead and I'm pretty new at Ruby and Ruby on Rails. It's real fun! =) Besides, I count myself fluent in C++ and Java (and JavaEE), but have very very few experience with C#.NET and Ruby. Also, I'm pretty eager to learn Ruby, but don't really want to waste time to develop skills on C# - which is pret...
stackexchange/codereview
I'm wondering how to compile and run a XNA class from an interaction on a C# Window Form. For example, when I click button "Play" from a C# Window Form, the game which is built in XNA classes will be compiled and run. Hope my question is clear enough. Any helps are appreciated :) Thanks in advance
stackexchange/codereview
In iOS4's photo album place, the photo-pins join and split each others when the map is zoomed out and in. It's awesome experience! and I want to use same thing on my apps. I guess, it should not be one of MapKit. does anybody know that how can i do this?
stackexchange/codereview
I am trying to test the render method in a controller with RSpec (2.x). Here the code in my controller: respond_to do |format| format.html # index.html.erb format.json { render :json => @entities, :include => :properties, :overview => options[:overview] } end And here the test I try in my spec file: controller.s...
stackexchange/codereview
I've written a PHP function that can accept 10 parameters, but only 2 are required. Sometimes, I want to define the eighth parameter, but I don't want to type in empty strings for each of the parameters until I reach the eighth. One idea I had was to pass an abstracted function with an array of parameters which passes ...
stackexchange/codereview
(probably a dumb question) // Program_1.exe: int num = 1; using (Process process = new Process()) { process.StartInfo.FileName = "Program_2.exe"; if (process.Start()) { process.WaitForExit(); } } Console.WriteLine(num.ToString()); // num should now equal 2 Psuedocode // Program_2.exe: // I want this progra...
stackexchange/codereview
Possible Duplicate: Round a double to 2 significant figures after decimal point I am trying to format a double to 2 decimal places with leading zeros and there's no luck. Here is my code: Double price = 32.0; DecimalFormat decim = new DecimalFormat("#.##"); Double price2 = Double.parseDouble(decim.format(price)); A...
stackexchange/codereview
Below I have outlined the structure of a polymorphic association. In VacationsController I put some comments inline describing my current issue. However, I wanted to post this to see if my whole approach here is a little off. You can see in business_vacations_controller and staff_vacations_controller that I've had to m...
stackexchange/codereview
I have the int number 2455449 and I know that represents the date 09/09/2010. How can I define the date format wihch is used? I need to generate a new date in this format. It will be used for http requests. I suppose that is Julian but I'm not sure. I tried to convert this number to the date but it didn't return t...
stackexchange/codereview
I am converting code from C to C++. I am currently using the C function, isspace, what is the C++ equivalent when using an ifstream? Specifically while (!isspace(lineBuffer[l])) id is the first the number (2515, 1676, 279) and name is the set of letters after the first "space" (ABC, XYZ, FOO). Example NewList.Txt 2515 ...
stackexchange/codereview
Let's say that, being abstract from any language, we have some ontology made of triples (e.g. subject (S) - predicate (P) - object (O)) Now if I want to, for some reason, annotate any of these triples (nodes), than I'd like to keep links to them that I can use in web documents. Here are some conditions: 1) Such link mu...
stackexchange/codereview
What is the best practice for developing a shared class library in Visual Studio 2010 to be used by a .NET 3.5 app and a 4.0 app? I could do it with separate project/solution files, one for 3.5 and one for 4.0 i.e. MyProject.3.5.csproj and MyProject.4.0.csproj but then I need to keep the files in sync. Is there a bett...
stackexchange/codereview
Is it posible to fail TeamCity builds if artifacts are not found? I mean without writing any special script, i.e. does TeamCity has such built-in functionality?
stackexchange/codereview
Well, As I read and try every topic similar without success, I decided to post my own question. My solution has a console app and a class library for dataaccess. The Nhibernate configuration is inside the appconfig in the console app (which I'm currently using for debug, as I will after make a Web App and migrate all c...
stackexchange/codereview
I wrote this script, but it doesn't work in way I wanted: $(document).ready(function(){ if ($('#map_container').find('#point').length == 0 ) { $("#map_container").click(function (e) { var relativeXPosition = (e.pageX - this.offsetLeft); var relativeYPosition = (e.pageY - this.offset...
stackexchange/codereview
I have written a code to load a nib file which consists of a view and a tableview. Everything works fine as expected but when i run the program, sometimes the views gets loaded, sometimes it doesnot. I mean, when i run my application say for the first time, it will open a proper GUI window with all the views in place. ...
stackexchange/codereview
I am trying to upgrade a VB6 project to run it on VB8, but I am getting an error which says that you need to install TABCTL32.OCX(1.1.0). What shall I do? Please Help. Thanks in advance.
stackexchange/codereview
I have two tables one is table Profile and other is table Profile_location (stores the relation of a profile and a location). Problem: A user can have multiple profiles, each profile has different locations. I want to find crossover of locations between each profile of a given user. In other words, evaluate all the pro...
stackexchange/codereview
first off thanks for helping. I am writing a prolog program describing family relationships, including all versions of in-laws. The logic is all there, what I need help with is some prolog problems as I am not very experienced with it. I am trying to set up multiple possibilities for each rule through use of semicolons...
stackexchange/codereview
I have a table of items which I'm getting from a few different online stores, like Ebay/Amazon, etc. Before today, I wanted to simply group each item based on the year it was made and the manufacturer who made it. So, the results would look something like this total year manufacturer 100 1999 man_a 32 2002 m...
stackexchange/codereview
I'm trying to implement a command-line interface inside of a Windows Forms form. I've looked into PDCurses, but I'm not sure if that's where I want to be. What should I do?
stackexchange/codereview
I have a Flex XML object as follows: private var _xmlCountries:XML = <Countries> <option value="AF">Afghanistan</option> <option value="AL">Albania</option> <option value="DZ">Algeria</option> <option value="AO">Angola</option> <option value="AI">Anguilla</option> ........ <Countries>; This object is ok, ...
stackexchange/codereview
For this picture: How do I make filter that returns true on brown color (insect) and false on background?
stackexchange/codereview
I have developed a custom search engine for our Magento store and I am trying to load the product collection in a very specific order (I have ranked the results according to an algorithm I designed). I can load the product collection correctly, however it is not in the order that I would like it to be in. Here is basic...
stackexchange/codereview
Hi I have made a game and I have used OpenGL for its graphics.the OS is ubuntu 10.04. The only thing left is to make a user interface so as to directly receive the requisite inputs from the user rather than from the terminal. Can sm1 please tell me any good links to go to !!!!or any software that can ease my work ! thn...
stackexchange/codereview
var colorID = 3; $('#color').each(function(){ if($('#color').val() == colorID ) $('#color').attr('selected'); }); Why doesn't this work? My html <select id="color"><option value="">Select Color</option> <option value="1">Red</option> <option value="2">Blue</option> <option value="3">Black</option> <o...
stackexchange/codereview
I have a WinForms application. It's written to disk. I run the application from disk and eject the disk from CD. Then I take the exception: there is no disk in the drive. please insert a disk into drive. How can I catch this exception and correctly close my application?
stackexchange/codereview
Why I'm getting this error in a actionscript project using flash Builder? I'm not even embedding anything, I'm just extending an OSMF class 'NetStreamLoadTrait' which has some metadata, that's it. [ExcludeClass] I'm using another OSMF project insted the one coming with the Flex SDK 4.0, but I have deleted the osmf pack...
stackexchange/codereview
I am trying to bind to an integer property: <RadioButton Content="None" IsChecked="{Binding MyProperty, Converter={StaticResource IntToBoolConverter}, ConverterParameter=0}" /> and my converter is: [ValueConversion(typeof(int), typeof(bool))] public class ...
stackexchange/codereview
How can I tell MySQL to format a timestamp as a readable date before outputting a query result in a MySQL client/console?
stackexchange/codereview
I am trying to get Castle.MicroKernel from this url http://www.castleproject.org/castle/download.html but I can not seem to find it in the latest zip file. please help. I need Castle.MicroKernel and does any one know where I could find it.
stackexchange/codereview
The vector addition example has this code: // Asynchronous write of data to GPU device ciErr1 = clEnqueueWriteBuffer(cqCommandQueue, cmDevSrcA, CL_FALSE, 0, sizeof(cl_float) * szGlobalWorkSize, srcA, 0, NULL, NULL); ciErr1 |= clEnqueueWriteBuffer(cqCommandQueue, cmDevSrcB, CL_FALSE, 0, sizeof(cl_float) * szGlobalWorkSi...
stackexchange/codereview
I saw this question been asked at SO few hours ago. My question is related to it but just a bit different and is a result of Johannes Schaub-litb's comment to Oli Charlesworth's answer. Is i = (0, ++i, 0) undefined behavior? P.S: This is just for educational purpose and has no relation with real life code or examples. ...
stackexchange/codereview
I want to add the href attribute to a link element. This is my code: System.Text.StringBuilder stringBuilder = new System.Text.StringBuilder(); using (System.IO.StringWriter stringWriter = new System.IO.StringWriter(stringBuilder)) { using (System.Web.UI.HtmlTextWriter htmlTextWriter = new System.Web.UI.HtmlTextWriter...
stackexchange/codereview
I have this: <pss> <ps n="А parent node" m="654564654" t="435,8551" a="2857,2716"> <sc s="a1" a="25,4220"/> <sc s="a2" a="0"/> <sc s="a3" a="2395,9945"/> </ps> ... </pss> I need to select "А parent node m attribute and a1-a2 a values in one query. i tried this but it doesnt work: SELECT ps.value('@m...
stackexchange/codereview
Is there a way to access the text entered in a Devart (Core Lab) TCRDBGrid search bar? I tried implementing the OnKeyDown event but the event didn't happen during entry in the search fields, only when the grid itself was selected. There are no other events that look relevant. The text appears to go into a TEdit which i...
stackexchange/codereview
How can I get the size a form would have in Maximized windowstate without maximizing it ? I am doing a snapshot of a map control. I want to maximize the window when doing the snapshot but without the user noticing. It seems that the form windows state doesn't change the form size when it is hidden : this.Hide(); this.W...
stackexchange/codereview