instruction_seed
stringlengths
1
35.8k
_source
stringclasses
1 value
public static void function() static public void function()
stackexchange/codereview
How do I render 2D sprites in OpenGL given that I have a png of the sprite? See images as an example of the effect I'd like to achieve. Also I would like to overlay weapons on the screen like the rifle in the bottom image. Does anyone know how I would achieve the two effects? Any help is greatly appreciated.
stackexchange/codereview
Problem: Two sets A and B have n elements each. Assume that each element is an integer in the range [0, n^100]. These sets are not necessarily sorted. Show how to check whether these two sets are disjoint in O(n) time. Your algorithm should use O(n) space. My original idea for this problem was to create a hash table of...
stackexchange/codereview
maybe someone can help me i have an SQL datebase that is used for logging employees leave. we have some many different shifts, that on our employees table we have 7 fields that represent the days they work. these are a bit data type, 1 for working that day, and 0 for not working. a second table has all the employees le...
stackexchange/codereview
I made a small MVC Framework, but i need that my view Class can return the page as string but before that apply all the variables. How can this be done? class View{ private $registry; private $vars = array(); private $file; public function __set($index, $value){ $this->vars[$index] = $value; ...
stackexchange/codereview
All, I am building a small, non-commercial consumer website. During the user registry, I want to check whether their chosen user name already exist in my user db (MySQL). Currently, I re-use the function below, which is mostly used to retrieve a user, based on the user name, during the login process: function retrieve...
stackexchange/codereview
I have some problems constructing a program for a combination lock. I want to construct a Lock with small locks and assign combination to each lock It should look like this when printed: Lock Combination 1 8-4 2 1-2 3 5-3 4 10-7 5 9-6 Can I construct the basic code for the lock li...
stackexchange/codereview
I have a input element: <input type="text" id="t" value="abcdefghij" /> I want to create a selectionStart document.getElementById("t").selectionStart The functions I need are: function GetSelectionStart(o) { if (o.createTextRange) { var r = document.selection.createRange().duplicate() r.moveEnd('c...
stackexchange/codereview
Is there a way to capture input text in iPhone App and send that text to webserver? How can we achieve this? Basically I want to get user's email address by having them sign up for newsletter inside the app. Thanks!
stackexchange/codereview
I have a property declared as type dynamic public dynamic Data {get;set;} later in some method the type of data becomes System.Collections.Generic.List so if use Data.AsQueryable() i get "System.Collections.Generic.List<Entity1 does not contain a definition for 'AsQueryable' " error. The result has to be converted t...
stackexchange/codereview
I have linux and svn server running and can terminal into it from my mac. In xcode I have setup a repositories and setup the folder structure branches, releases, tags, trunk for a project. I have imported my first project into the trunk folder successfully. I then create a different folder locally In Xcode SCM, I navi...
stackexchange/codereview
Can we write our front end design and use the google spreadsheet for the back-end for a website? Thank You
stackexchange/codereview
I am grabbing a a users twitter feed, and then cache it for 5 min. So I only actually connect to twitter 12 times an hour... But I still get the message Rate limit exceeded. Clients may not make more than 150 requests per hour. back in my feed. I assume that this is because I am on a shared server and its that ser...
stackexchange/codereview
When I use sscanf() in the following code, it is taking the whole line and placing it in the first string for some reason, and I do not see any problems with it. The output from Msg() is coming out like PatchVersion=1.1.1.5 = °?¦§- The file looks like this (except each is a new line, not sure why it shows as one on Sta...
stackexchange/codereview
when toSource method is used to an object ..it will be like this ({name:"myname", value:"myvalue"}) my question is how would you convert it back to object? or rather just access the properties like alert(objectName.name); thus alerting "myname"
stackexchange/codereview
Does anybody know if there is any smooth integration between BuddyPress (a social networking plugin for Wordpress) with a membership plugin like aMembers, Magic Members, DAP, etc. (Wordpress plugins that provide Silver/Gold memberships, eCommerce, etc.)? Would enabling BuddyPress and a membership plugin work smoothly? ...
stackexchange/codereview
Is this a good way to check if the value of a field is null? if($('#person_data[document_type]').value() != 'NULL'){} Or is there a better way?
stackexchange/codereview
i'm hoping somebody can help me out here. I have a standard username/password form that submits with a <button> tag that contains a small image. The button is a fixed width and height with no margins, paddings, text aligned to the left and no other content bar the <img> tag. And it looks fine and works as you'd expec...
stackexchange/codereview
I have the following linq and its working great but i need to be able to check a variable and depending on value only show a subset of the records. I will explain.. Here is the SQL var test = from c in db.C select new { Period = c.M.Period, Group = c.Code, Code = c.ClientCode, Name = c.ClientName, Amount = (...
stackexchange/codereview
I have used FxCop 1.36 and I recently upgarded to FxCop 10.0. Using the same set of rules and the same set of assemblies now I got less warnings. Have they removed some rules from the FxCop 10.0? If so, why?
stackexchange/codereview
For example, I have following function that concatenates beginings and endings producing all possible variants of concatenation as result: def mixer1(begin: String, beginings: String*)(end: String, endings: String*) = for (b <- (begin +: beginings); e <- (end +: endings)) yield (b + e) Actually what function does is...
stackexchange/codereview
I'm trying to implement openid login with Django and having some trouble. The library I'm trying to use now is Django-openid-auth. I haven't found any django+openid libraries that have much documentation. How can I actually go about using this as a login and store the information I need for my app based on the users th...
stackexchange/codereview
I'm attempting to implement some mechanism in C++ whereby all classes derived from a common base class are assigned a unique "class ID". For example: class BaseClass { //... public: unsigned int GetID( void ); //... }; class DerivedClass : public BaseClass { } Class DerivedClass, and all other children...
stackexchange/codereview
I have de follow code: include 'simpletest/autorun.php'; include 'config_test.case.php'; // <-- problem But it not works. I get: Bad TestSuite [index.php] with error [No runnable test cases in [index.php]] But if I put the Config class code directly (no "include"), it works. What can I do? Thx =)
stackexchange/codereview
I've an XSLT file on the classpath inside a JAR file. I've tried to load the XSLT file using an InputStream. After debugging, the InputStream contains the JAR file instead of the XSLT file. String xslPath = "/com/japi/application/templates/foo.xslt"; InputStream is = getClass().getResourceAsStream(xslPath); ... Source ...
stackexchange/codereview
Is there a term for the technique of overloading to create optional parameters? "Helper Method" comes to mind but doesn't seem appropriate foo(var x) { foo(x, new var()); } foo(var x, var y);
stackexchange/codereview
My team is working with a third party CMS that uses Solr as a search index. I've noticed that it seems like the authors are using Solr as a database of sorts in that each document returned contains two fields: The Solr document ID (basically a classname and database id) An XML representation of the entire object So ...
stackexchange/codereview
In my app by pressing a button I want to open UIWebView on full screen, the UIWebView will load a HTML page that will hold a button that will close the UIWebView and return to app. The problem is that I fail to make the button close the page and return to app. I tried parent.history.back() and history.back and several...
stackexchange/codereview
Has someone made a StringBuilder implementation in PHP?
stackexchange/codereview
Greetings, I'm currently developing an Android application, but I'd like to be able to handle button click events etc in a separate file for each Activity. Is this possible? At the moment, I have one very large file that handles all events for several Activity windows. Any advice greatly appreciated. Thanks in advance,...
stackexchange/codereview
Do you know if there is a specific meta tag (like for the Skype toolbar) that I can add to my web page so that all iOS devices do not turn phone numbers (and sometimes dates, too) into clickable links?
stackexchange/codereview
Possible Duplicate: How do I use the conditional operator? I’m new to C language, and in one of the sample codes I was reviewing I faced the statement: A = A ? B: C[0] I was just wondering what the task of the previous statement is and what will be the result after execution of the mentioned statement.
stackexchange/codereview
how do i develop an app that draws a line on screen at fixed coordinates, Setting up a repeating timer of 1 second duration? On every tick of the timer,the line refreshes. LineRefresh.java: package LineRefresh.xyz.com; import java.util.Timer; import android.app.Activity; import android.graphics.Color; import android.o...
stackexchange/codereview
I learned about ternary search from Wikipedia. I'm not sure what they mean by the parameter absolute precision. They didn't elaborate. But here is the pseudocode: def ternarySearch(f, left, right, absolutePrecision): #left and right are the current bounds; the maximum is between them if (right - left) < absolut...
stackexchange/codereview
Which "modern" C++ compilers support Win95/98/Me/NT? VS2010/VS2008 doesn't support these operating systems, so would it be best if I used VS2003?
stackexchange/codereview
I need to present a UIActionSheet that will show 10 buttons. When I do that on iPad, the UIActionSheet shows on a popover that is very long vertically (not aesthetically pretty). Is that possible to specify the UIActionSheet size to a maximum size? I have tried this myActionSheet.frame = CGRectMake(0,0,300,300); myActi...
stackexchange/codereview
I have created a JPanel, and I want my application to create several random points and place them in the panel. I define the size of panel with setBounds(20, 100, 553, 486); I must pay attention to my panel's bounds and only create random points that have x and y in these bounds. I have created the following code: fo...
stackexchange/codereview
I would like to know if Memcache is recommended when using a NoSQL database like mongoDB.
stackexchange/codereview
This is killing me! I'm using django-filebrowser, and I want to create a gallery app that leverages it's upload capabilities to manage images. I have a Gallery model that allows the user to select or create a directory on the server, and upload files to that folder to appear in the gallery. I want to automatically tra...
stackexchange/codereview
Can a pointer be converted into void pointer?
stackexchange/codereview
Is there is a way how to add hash # to my URL without redirect?
stackexchange/codereview
I have common web service interface on each endpoint applications (server and client). How can I create port on client side without connecting to server for "the same" wsdl? I search something what present this pseudocode: MagicProxyFactory proxy = MagicProxyFactory.newInstance(MyServiceInterface.class); /* then bind ...
stackexchange/codereview
I have a block element (div) that holds a couple of nested elements, all content is text. I use jQuery to fadeIn() and fadeOut() on mouseOver. Works okay in all browsers except for Internet Explorer (I tested in 7 and 8 so far), which fades all the text except for two special characters in the text: ← (left arrow) and ...
stackexchange/codereview
My app reads some kind of file(*.mndl) and with below method I can open a file if other app requires it (Using the options parameter). application:didFinishLaunchingWithOptions: It works fine, but when my app is still alive in background and other app requires to open a file it won't happen since that method is not ca...
stackexchange/codereview
I am looking for a way to enable the UIFileSharingEnabled flag for only a debug variant - so I can change the contents of the documents folder - but I don't want end users to be doing the same. I guess i could use a run script to do it, though not sure how to get the active configuration name to the script.
stackexchange/codereview
I hate two richTextBoxs. I have two problems: no matter how I define the scroll bar - it doesn't apear. if I write more than the length of the line - the cursor goes to the line below - I want everything to be writen in the same row and the user could move right-left with the scroll bar. I want one scroll bar to contr...
stackexchange/codereview
What is the difference between jQuery's mouseout() and mouseleave()?
stackexchange/codereview
I am displaying a dialog with an edittext view. However, the softkeyboard will open only if the user presses inside the editview. So I tried calling an InputMethodManager with the following code. InputMethodManager imm = (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE); imm.showSoftInput(dialogField,...
stackexchange/codereview
I'm writing a small SQL Database browser. Requiered function is to select, update, insert,remove from two tables connected by a key. I've used OdbcAdapter to select from two tables and used bind to DataGrid, but OdbcCommandBuilder doesn't offer possibility to update contents when I'm using two connected tables. How I c...
stackexchange/codereview
I have the wrapped into my own faces component. Right now we found that when adding several messages the are of the expands moving the actual page components to the very far bottom of the page. It's not viable to change the 300 pages we have on this system. Tried to find way to limit the height of the <h:messages> by...
stackexchange/codereview
I would like to make auto generated code available to eclipse editor for auto completion Following cases: 1) Xml document describing a data model and java processor is creating java source code. Right now I need to run ant script to create java source. Could that be triggered by change of xml document? 2) Class is ...
stackexchange/codereview
So, I was just thinking about how cool chaining is and how it makes things easier to read. With a lot of languages, when applying a bunch of functions to a variable, you'd write something like this: i(h(g(f(x)))) And you have to read it from right-to-left or inner-most to outer-most. You apply f first, then g, and so ...
stackexchange/codereview
Can you guys please tell if building my own birtviewer like reporting tool but using python is a crazy idea. The company I'm working now, we are using birtviewer to generate reports for the clients, but I'm already getting frustrated tweaking the code to suit our client needs and it's written on massive java code which...
stackexchange/codereview
WIth this code I'm trying to get SQL CREATE statement from sqlite_master for a specific table: [SQLStatement setString:@"SELECT name, sql FROM sqlite_master WHERE type='table' AND name='"]; [SQLStatement appendString:tableName]; [SQLStatement appendString:@"'"]; int dbrc; const char *charSQLStatement = [SQLStat...
stackexchange/codereview
I'm developing an iPhone app that will need a login system in order for users to post content to a server. I'd really like to use facebook connect for this as it's a very community driven app. Is it possible for me to securely authenticate with the web server without the user having to create a username and password sp...
stackexchange/codereview
I'm using the Swiz framework and I'm trying to update my viewstack's selectedIndex with a bindable property. It gets to my event handler which updates the bindable variable but the Main app file's viewstack never realizes it. What could be the issue? thx -Mike ================================ MAIN APP FILE <mx:Script>...
stackexchange/codereview
I developed a mobile website using jqtouch. It works fine in iPhone but doesnt work in android. First the page loads properly in android but when we scroll then it doesnt display anything on the screen. But I am able to click on links and it navigates properly. So am assuming that there is text on the screen but its n...
stackexchange/codereview
Here are my Observer and Observable interfaces public interface Observable<T> { void addObserver(Observer<T> o); void removeObserver(Observer<T> o); void removeAllObservers(); void notifyObservers(); } public interface Observer<T> { public void update(Observable<T> o); } These work if I have two ...
stackexchange/codereview
Is it possible with BLToolKit (http://bltoolkit.net) to create a set of records for list of object (batch insert)? If yes, how is this possible? Thanks a lot!
stackexchange/codereview
I am trying to create an application which show the desktop / hide all application even the finder. Do you have any idea to achieve this? Thanks and regards,
stackexchange/codereview
i am trying to create 300 unique instances of block ui so far this is what i have, but it is not working: javascript <script type="text/javascript"> var i=0; for (i=0;i<=300;i++) { $(document).ready(function() { $("#q" + i).click(function() { $.blockUI({ message: $("#t" + i), css: { width: ...
stackexchange/codereview
I have an OS X objective-c application that is signed. I would like to check if the code signature is valid, then perform an action if it isn't, etc...
stackexchange/codereview
i have a page with 3 parent divs , now im having problems positioning the divs inside the header div. my code is something like this: divs layout: <div id="layout"> <div id="header" class="body"> header <div id="logo">logo</div> <div id="menu">menu</div> </div> <div id="main"> ...
stackexchange/codereview
I have a scene where there is a button. Once I click the button, a rectangular sprite slides in from the left side: http://img255.imageshack.us/img255/9867/slidei.png Under this shape, there are several touch sensitive buttons. I don't want these to be called when I touch on the rectangular shape. So, as long as the s...
stackexchange/codereview
i am trying to get phone number from addressbook , i am trying like this ABMultiValueRef multi = ABRecordCopyValue(person, kABPersonPhoneProperty); number.text = (NSString*)ABMultiValueCopyValueAtIndex(multi, 0); but it displaying numbers like (222)-456-3456 how can i get number without those symbols ( ) - etc than...
stackexchange/codereview
Currently, my iPad application implements multitasking. However, I would like to offer the user an option to disable multitasking. Is this possible, given the fact that you cannot modify the Info.plist dictionary where the UIApplicationExistsOnSuspend key is set?
stackexchange/codereview
Shorter version: Is there a relatively easier way to change the target build for projects in the same solution, short of using some dedicated build tool? Longer version: I would prefer to use the x64 version of SQLite; as I understand it there is unmanaged code in it, so you can't build to AnyCpu, although there is an ...
stackexchange/codereview
Just like eclipse does, extracting function, renaming a variable, and so on
stackexchange/codereview
return this.each(function(){ $(this).mouseenter(s,function(){ s.self = $(this); s.slot = $(this).attr('id').split('_')[1]; s.callback = function(o){ var s = {} $.extend(s,o); /* Ajax call, to get banner info data */ ...
stackexchange/codereview
i want to convert a XML find having atom feed into rss feed. I used the following method : public void AtomToRss20(string atomFileName, string rssFileName) { ConvertToRss20(ReadFeed(atomFileName), rssFileName); } private static void ConvertToRss20(SyndicationFeed feed, string rssFileName) { ...
stackexchange/codereview
Good morning, I face a curious bug as I try to set a fontstyle in a mx:Panel object in Flex. <?xml version="1.0" encoding="utf-8"?> <mx:Panel xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx" layout="absolute...
stackexchange/codereview
I have searched high and low for a decent explanation of how BeautifulSoup or LXML work. Granted, their documentation is great, but for someone like myself, a python/programming novice, it is difficult to decipher what I am looking for. Anyways, as my first project, I am using Python to parse an RSS feed for post link...
stackexchange/codereview
Is there a reliably way to determine the last user name to login to the system? I've looked at LsaEnumerateLogonSessions() and LsaGetLogonSessionData() however they require elevation on Vista and later (which I'm keen to avoid). WMI has the same problem (presumably it's just calling Lsa behind the scenes). I've also lo...
stackexchange/codereview
I am building an mvc app for reporting. I have a page that has a form on it which contains multiple dropdownlist to choose some criteria for a report. I then have an input button to create the report. This button call a new view from the same controller. The new view gets the values from the page where the criteria...
stackexchange/codereview
I used a tcpclient to make a connection to a streaming API and for some reason it doesn't work with a 301 error, (something wrong with my credentials). However when I use a httpwebrequest to the same API and use the same credentials and that works. I am trying to figure out what I am doing wrong: TCPclient connection: ...
stackexchange/codereview
When I load my php page I append some data. For instance MyPage.php?value=something. As expected, when I go back and forth using the back button, it always loads with that same data appended. I don't want that. I want that after the page loads, I should be able to change the history to store only MyPage.php WITHOUT the...
stackexchange/codereview
i was using raphaeljs , and i want to show html(not only text) in svg, so i use this code : var r = Raphael("holder", 200, 300); var t = r.text(10, 10, "ssdwqdwq"); t.node.innerHTML='dddd' but i cant change the svg's content , so i console it in firebug , console.log(t.node) it show this : <text x="10" y="13.5" tex...
stackexchange/codereview
strtotime is being calculated from 1970-01-01 (UTC) and date is using my timezone i.e America/New_York A simple example: Where timestamp is 0: var_dump(date('Y-m-d h:i:s', 0)); prints: 1969-12-31 07:00:00 Where it should return 0, it returns var_dump(strtotime('1969-12-31 07:00:00')); -43200 Now, obviously, I could...
stackexchange/codereview
I have created my webpage in asp.net in 1024*768 resolution, my problem was that when i change my monitor resolution then the controls in my webpage will be displayed in unmanaged manner . How to arrange items in my webpage which support multiple resolution ... Whatever the resolution of my monitor the controls in my w...
stackexchange/codereview
I am working on an application that reads and makes edits to an xml file but using the XDocument class Load() and Save() methods. If another application, or another instance of my application is running then one document could potentially overwrite changes that the other has made if it's in memory xdocument is not cont...
stackexchange/codereview
I´ve seen similars code that use this but i gives me this error "URLEncoder cannot be resolved" on this line: String paramString = p.getName() + "=" + URLEncoder.encode(p.getValue(),"UTF-8"); It says the function is encode(String s, String enc) On "enc" it says the encoded scheme to be used. I´m running Eclipse SDK Ve...
stackexchange/codereview
Please see this: VIEWSTATE" id="_VIEWSTATE" value="/wEPDwUKMTMzMTM1NTAzNA9kFgJmD2QWAgIDD2QWJgIDDw8WBB4LTmF2aWdhdGVVcmwFKGh0dHA6Ly93d3cubGVhcm5kZXZub3cuY29tL1Byb2R1Y3RzLmFzcHgeBFRleHQFCVN1YnNjcmliZWRkAgUPDxYCHwAFHWh0dHA6Ly9vbmxpbmUubGVhcm5kZXZub3cuY29tZGQCBw8PFgIfAAUnaHR0cDovL3d3dy5sZWFybmRldm5vdy5jb20vRGVmYXVsdC5hc3B4Z...
stackexchange/codereview
This is used in .cs page of asp.net. Please explain the meaning of the following code: Page.ClientScript.RegisterStartupScript(this.GetType(), "'" + scriptKey + "'", ValidationScript.ToString(), false);
stackexchange/codereview
I've an issue when i try to invoke a workflow. I've a global workflow and in this worflow, I'm using the "InvokeWorkflowActivity" activity to invoke a workflow. I bind the TagetWorkflow to my secondary workflow. I build and it's ok, i see my secondary workflow in my global workflow. On SP, when I launch my global WF, i...
stackexchange/codereview
I'm using the .replace()-Method to replace HTML content. I need the previous element that gets replaced so I'm using the return value of this function. In IE8 this returns an empty string in a specific case (I can't provide an example, because the script is not standalone). I did some research and found out that IE8 ca...
stackexchange/codereview
I'm trying to get an empty line in a plain text email. I've tried with \n\n and with \r\n but in both cases, these characters are just displayed as normal text, instead of an empty line. What am I doing wrong? (I'm viewing a multipart email in plain text view in Mozilla Thunderbird.) Thank you for any help! Tom
stackexchange/codereview
I am using jScrollPane for custom scrollbars, in my case I need to use arrows. You know, designers... Well I've a working code that works, but I i need to disable (display:none;) the arrows if the text isn't bigger than the <div />. The code and example: http://jsfiddle.net/Mdy2r/2/ Thank you in advance!
stackexchange/codereview
How can I find the return value of a executable which has been invoked by a AIR app using the NativeProcess API? I am using Flash Builder 4. The following c++ generated executable festival --tts "HelloSpeak.txt" works fine on the Windows cmd line , but on invoking by the NativeProcess API like in the example article ...
stackexchange/codereview
I basicly wanna do this because it seems the clickonce installer cache sometimes gets corrupted or applications data files get corrupted. So basicly what i want to do is have a extra start menu thats either calls a batch file or my app with a command line args. Was hoping this could be done with clickonce, simply becau...
stackexchange/codereview
Let's face it, debug_backtrace() output is not very pretty. Did anyone code a wrapper? And what's your favourite pretty var_dump() (which is usable in commercial projects, so no GPL (although LGPL is ok)) See also: A more pretty/informative Var_dump alternative in PHP? Six years - and ten thousand views of this questi...
stackexchange/codereview
That should be a simple question but i can't find a good solution online. I have three tables/models. User, Alliance and Alliance_Membership. The latter is a join table describing the :Alliance has_many :Users through :Alliance_Membership relationship. Everything works ok, but Alliance_Membership now has an extra field...
stackexchange/codereview
With SQL Server 2008 the time data type has an optional precision argument (default is 7). With this you can control how many fractional decimal places are stored and displayed. DECLARE @time time(3) SET @time = GETDATE() PRINT @time The above would print this, 10:47:25.347 The documentation says the smallest preci...
stackexchange/codereview
I want display a PDF as an html page - where the user will be allowed to enter the fillable data. My problem is not how to import/fill data (I was able to do it using FDF/XML and ITextSharp). My only concern is how to show it to the user so that he/she can see the form, fill/edit data, and should be done with it. I tri...
stackexchange/codereview
I have got a page that allows a user to login, using the Facebook API. But of course the problem is when the user changes pages, the login needs to be re-authorized. So in my main page I have $facebook = new Facebook(array( 'appId' => 'xxx', 'secret' => 'xxxxxx', 'cookie' => false, )); $session = $faceboo...
stackexchange/codereview
I'm trying to modify the file in BufWritePre when written to disk, and then undo those modifications in BufWritePost so text in working buffer remains unchanged. The problem is that the undo operation always seems to undo the last undo operation before what was done in BufWritePre, along with the changes done in Buf...
stackexchange/codereview
how can i instantiate an instance of an ocx at runtime in vb6 code? new keyword doesn't seem to work... Invalid use of New keyword Set bob = new bobocxlib.bobcontrol
stackexchange/codereview
Which is the better practice to store file? Directly store the file in database or just the location to that file?
stackexchange/codereview
I have a DataGrid with a RowDetailsTemplate containing another grid. I want to react on a doubleclick on a row in that detailgrid and fill the cell's content into a corresponding cell of the selected parent row. <DataGrid Name="dataGrid1" DataContext="{Binding}" ItemsSource="{Binding Source={StaticResource ..}}" AutoG...
stackexchange/codereview
So I'm building a custom control in C# (not WPF), and I basically want to implement text highlighting with the mouse. How do I efficiently find the character at a given Point (say where the mouse is clicked) in a string? I have the layout rectangle of the string as it was drawn and I could calculate the length of the ...
stackexchange/codereview
This seems to me like it may be a version of the knapsack problem: I have a list of rectangles of varying sizes that I want to place within a field without overlapping or grouping similar sizes. Would it be correct to start looking in the knapsack direction? Thanks.
stackexchange/codereview