instruction_seed
stringlengths
1
35.8k
_source
stringclasses
1 value
Im trying to display html in a JEditorPane. Initially the type is set to "text/html". When I use setPage(URL) it works fine and the resulting output is displayed but If I have a String that contains HTML code and I used setText(String) to display the result on the JEditorPane nothing is displayed I see only white space...
stackexchange/codereview
I'm having a bit of a problem with the following code. I've seen tons of examples for using InternetReadFile to save to a file. But I cant find one, or get it to work for a char[]. I want to add the szBuffer up to get holdBuff, and then set content equal to holdBuff. #include <stdio.h> #include <tchar.h> #include <stri...
stackexchange/codereview
Right now I am using jQuery completely for my project (ajax, validations). But I guess due to my statements I assume that it is taking more time and how can I optimize the time for execution of each statement? Say for example I have seen some posts in Stackoverflow saying this statement: $("div#mydialog").bind('Dialo...
stackexchange/codereview
I have a question that must be common but I dont know it. If I append something (lets say SPAN) to a DIV, how can I act on that new SPAN at the same time? function makeRotatable($clone) { $($clone).before('<span style="height:200px;"></span>').slider({ orientation: "vertical", range: "min", ...
stackexchange/codereview
SPAM I want to design a web site interface as it is shown int this example web site which has a centred image. I think I should use margin to put the body in the web page. the header and the footer div will be above and under the box. the last thing is the web page is considered to be resized according to the browsers...
stackexchange/codereview
I am having an error when using new XMLHttpRequest() for the second time in JavaScript code called from textbox event on page. My JavaScript finds suggestions for text entry from the SQL to do that I use xmlhttprequest, it does fine when it is the first time but when I keep typing in the text box I receive: "typeerror...
stackexchange/codereview
I have asked a similar question here : How to auto resize text in fixed DIV according to the text's length? And its working. But its working on a single line of text. Let's say I want my text to wrap to 2 lines, and if its more (overflowing) then go and resize... Is there a way to do this? Thanks!
stackexchange/codereview
I would like to generate random numbers between 1 & 10, with a decimal place of 1 (e.g. 1.5, 9.4, 6.3, 2.9) I would like to generate random numbers between 1 & 10, with 2 decimal places (e.g. 1.51, 9.46, 6.32, 2.93) I would like to generate random numbers between 1 & 10, with 3 decimal places (e.g. 1.512, 9.346...
stackexchange/codereview
To be short, I am looking for a jQuery loop that will select each div with a class (approx 10 small divs in a line) then execute some code on each div specifically fade out and in the image contained in the div and then pause and move on and do the same to the next div. This loop fades out/in all of the contained imag...
stackexchange/codereview
I have asked the same question before, but did not get what I want. So have to post it again. I have a very long string which does not have any space within it. Now I am trying to search for repeated substring (any type, no specific pattern) in this long string. The length of the repeat could be a range between (min, ...
stackexchange/codereview
I've been looking online for some time and haven't been able to find a example of using the UITable view control to make selections. For example, let's say you have a table view and in one of the cells it says, select a state. You click that cell and it takes you to another table view that has a list of states. You ...
stackexchange/codereview
I need to come up with a strategy for deploying multiple versions of JAX-WS Web Services. I am currently looking at: 1 .war per service and per version. This offers the maximum flexibility. Deprecation of an old version is straightforward, as well as introducing new versions. 1 .war per service and multiple versions...
stackexchange/codereview
I have a container std::vector and I would like to efficiently split it into sub-ranges with x items in each. The original container is not needed so the items should be moved and not copied into the sub-ranges. I've managed to do the splitting using copying, however I'm unsure how to do it with move assignments? r...
stackexchange/codereview
Someone joined #haskell, and asked a fairly novice homework question. How do you sort two equal length lists of string tuples? In an attempt to help them - my Haskell sucks - I wrote this. sortBy (\(x:y) (x':y') -> let { a = x `compare` x'; b = y `compare` y' } in if a == EQ then b else a ) $ let f (a,b) = a++b in f ( ...
stackexchange/codereview
I need to use this for a Samsung Tablet. Usually if the device is switched-off and the USB cable is being connected the display will wake up for some seconds showing an animated battery. Instead I want to let it boot. I suspect this is close to the metal. Where do I have to make a modification? In the kernel, in the An...
stackexchange/codereview
I have a button click event that executes a group of file copy operations. Each copy operation is surrounded in it's own try/catch. I would like that in the event the user cancels or something goes wrong, it exits the rest of the file copy operations and returns the user back to the main program. Because each of the fi...
stackexchange/codereview
I have always been amazed at the Super Mario series on the Snes. I think it was mostly made in Z80 assembly. But since there was not a real time clock, how on earth did they manage all those timed, animated events with assembly and no real time clock? Thanks
stackexchange/codereview
This is my problem: The background of the progress indicator doesn't appear to be redrawing, and it's certainely not transparent. I'm using core animation to animate the image in the background; when I don't use core animation it looks fine. This is the code I am using: [[NSAnimationContext currentContext] setDu...
stackexchange/codereview
I am trying to read a file which has the first two lines marked with a "%" as the first character. I need to ignore these two lines, and then read 4 separate integer variables, separated by an unknown amount of white space. This then repeats for each line until EOF. I am attempting to use open() from fcntl.h. Is t...
stackexchange/codereview
I have a ListBox with custom styles applied. It seems sometimes, when I select a color then another (didn't press Ctrl/Shift) it seems like 2 items are selected, sometimes even more Whats with this rendering? My XAML looks like <ListBox ItemsSource="{Binding ThemeColors}" SelectedValue="{Binding Color}" SelectionChang...
stackexchange/codereview
I don't understand how to apply "CGAffineTransform" parameter that appears in practically every CGPath method, e.g.: void CGPathAddRect ( CGMutablePathRef path, const CGAffineTransform *m, CGRect rect ); Let's say I want to rotate a rect path, how would I write out this function? Where to I get the transform ...
stackexchange/codereview
I am working with C# and I have a following List<List<UserObj>> obj; How do I get the inner list (List<UserObj>) of obj? Thanks.
stackexchange/codereview
I'm trying to figure out the jQuery code syntax for calling a function in a separate .js file still referenced with a script href tag in my head tags. So here is essentially what I have. <head> <script type="text/javascript" src="/Publish/Depts/EWI/scripts/prehomefunctions.js"></script> <script type="text/ja...
stackexchange/codereview
Wondering if it is a good or bad ideal to make use of Hibernate UserType to trim data from an incoming data feed to prevent exceptions thrown if the data is to large to fit into the given column. We receive data from a lot of data sources and have no control on the size of the data that is sent. We are looking at about...
stackexchange/codereview
I'm looking for a class that transforms bitmaps / textured polygons in Flash in 2D. I want to be able to place the handles in arbitrary locations. I've been using this library for a few years but it just occured to me there may be an improved class taking advantage of some of the tricks in FP10/10.1.
stackexchange/codereview
I've produced a MVC app that when you access /App/export it zips up all the files in a particular folder and then returns the zip file. The code looks something like: public ActionResult Export() { exporter = new Project.Exporter("/mypath/") return File(exporter.filePath, "application/zip", exporter.fileName);...
stackexchange/codereview
I have the following method within my TcpServer private void Receive(ZClient client) { NetworkStream ns = client.TcpClient.GetStream(); int bytesRead = 0; byte[] message = new byte[client.TcpClient.ReceiveBufferSize]; while (true) { bytesRead = ns.Read(message...
stackexchange/codereview
I'm currently using self.navigationController.navigationBar.tintColor = [UIColor orangeColor]; to change the color of my UINavigationBars in my iOS application. However my app now has so many tab bar items it uses Apple's default "More" controller to manage the extra items. Unfortunately, I can't seem to work out how ...
stackexchange/codereview
Say you were writing a daemon that services a job queue. Various other software writes jobs for the daemon into the queue. The daemon polls the queue every few seconds for pending jobs. Assume the queue is implemented as a table in a MySQL database and that the daemon is a simple loop: get all due jobs from the queue ...
stackexchange/codereview
I need to download my friends tweets. I've found some applications online that help getting a user's own status messages. Is there any application or a way (in any programming language) to get other persons status messages?
stackexchange/codereview
i found an article about self modifying code and tried to do some examples, but i get always segmentation faults. As fas as i can understand, there is a violation in memory permissions. The code segment is (r)ead/e(x)ecute and so the attempt of writting results to this fault. Is there a way to test the program either b...
stackexchange/codereview
I want to allow newly signed up users to be able to do a facebook connect and select some of their friends and dispatch an invite to them for my website. I saw this in action when I signed up for foursquare, I believe they are using the Graph API in a particular way to achieve this. What approach should I take to get t...
stackexchange/codereview
I have this limitation I have to implement server-side (in the database). Normally I'd do this on the client side, but I'd figure why not learn the server aspect. :p I don't want my Clients to be able to rent a Movie from the XXX genre if they are under 18. Here is the script I used to generate the tables: -- ========...
stackexchange/codereview
I'm using an slideshow and I would like check if there any image on a specific folder since I'll make it all dynamically. I saw some questions here about this but can't get it work. <div class="foo"> <img src="images/[dynamic_folder_name]/1.jpg" alt="" /> <img src="images/[dynamic_folder_name]/2.jpg" alt="" /> ...
stackexchange/codereview
Suppose I have a function: public static IList GetAllItems(System.Type T) { XmlSerializer deSerializer = new XmlSerializer(T); TextReader tr = new StreamReader(GetPathBasedOnType(T)); IList items = (IList) deSerializer.Deserialize(tr); tr.Close(); return items; } In order to retrieve a l...
stackexchange/codereview
I am a junior software developer working mostly in c#. I am being tested at work by my boss for a new role as an android sdk developer. I passed the first interview and now he wants me to write a small application which boasts certain simple features such as communication via GPRS service and handling data (i guess he ...
stackexchange/codereview
Little Endian vs Big Endian Big Endian = 0x31014950 Little Endian = 0x50490131 However Using this Method inline unsigned int endian_swap(unsigned int& x) { return ( ( (x & 0x000000FF) << 24 ) | ( (x & 0x0000FF00) << 8 ) | ( (x & 0x00FF0000) >> 8 ) | ( (x & 0xFF000000) >> 24 ) ); } ...
stackexchange/codereview
how to save the image with tooltip in wpf. so that when i open the image again, the tooltip where i added must be displayed
stackexchange/codereview
In my wordpress application I have parent category as Places and Type and also subcategories as Villa Apartments Plots under type and USA India China under places. When I am filter by places wordpress displays all posts under places (USA, India, China). Now would like to add a refine search in my archieve listing page...
stackexchange/codereview
How could I add ObjectCollection items to an IList(Of SomeType)? I have tried with: For Each obj As SomeType In listBox.Items 'ObjectCollection MyObject.ItProperty.Add(obj) 'IList Next No success. Thank you.
stackexchange/codereview
I have a URL that I can call that will perform some tasks. I am writing a .NET console application that will call this URL but I am not sure how to do it. All I want is to pass a URL and wait until that URL has finished processing (the web page returns -1 when it has finished). I think it should be quite simple but am ...
stackexchange/codereview
Generally, this is how I deserialize an XML file: string location = "C:\\test.xml"; XmlObjectClass member_data = new XmlObjectClass(); using (Stream XmlStream = new FileStream(location,FileMode.Open)) { data = (XmlObjectClass)serializer.Deserialize(XmlStream)...
stackexchange/codereview
Given: class Buf { // has fixed buffer size, forming a cyclic buffer tor t->v pairs void add(time_type t, value_type v); // adds value v at time t, overwriting the oldest buffered value value_type get(time_type t); // returns the value at time t1 for t1 <= t < t2 (for t1 and t2 datapoints in the buffer) ... }; ...
stackexchange/codereview
I have what seems to be a fairly common inter-process communication requirement - a parent process spawns some child processes, and the parent process and child processes need to be able to perform two-way communication with each other (the child process needs to keep the parent process up-to-date with its state and th...
stackexchange/codereview
I know the title looks a little faque, but my technical english is not as good as would it to be. My question. I'm designing a kind of work order form with access database. The pretty standard database I can manage, but my problems starts when I want multiple entries for one customer. For example: Customer Chris with I...
stackexchange/codereview
I have a VB6 application that references a VB6 ActiveX.exe application that references a C# .Net library through COM. That C# library has a registerable callback method which I bubble up to the original app. The C# library has two methods. One simply calls the callback. The other signals an event that triggers a simple...
stackexchange/codereview
I am using Janrains PHP openID library. All is working perfectly except when I try and pull values from the query string on the script that is returned to after the user is authorized. Here is the first part of the query string: http://localhost/Cloudshare/trunk/Cloudshare/php/openID/recieve_auth_request.php? janrai...
stackexchange/codereview
I have the following problem: I created content type "movies" and content type "actors". I added a node reference to the "actors" which links to movies. When i create new actor content I'm able to select movie from node reference. So, I created a list inside Views which shows you a list of actors and next to the actor ...
stackexchange/codereview
Just as the title states, is it at all possible to place the ellipsis (...) at the beggining of a UIPickerView "row" instead of the end? I tried both returning a NSString and a UIView for: pickerView:(UIPickerView *)pickerView titleForRow:(NSInteger)row forComponent:(NSInteger)component I even tried wrapping the view ...
stackexchange/codereview
I'm using the FileStream and StreamReader classes like so: using(FileStream stream = File.Open(filePath,FileMode.Open,FileAccess.Read,FileShare.ReadWrite)) { using(var reader = new StreamReader(stream)) { content = reader.ReadToEnd(); } } This means I'm disposing both of them. H...
stackexchange/codereview
My small program runs fine in Eclipse but it won't run after exporting and running as a jar file. Here is the exception it throws when run. (I might just need a link to a good article on exporting to a jar file). Thanks for helping. Exception in thread "main" java.lang.NoClassDefFoundError: org/eclipse/swt/widge ts/La...
stackexchange/codereview
We are starting to see the benefits of Test Driven Development and decided to take the first steps in allowing TDD to drive our design. (AKA just testing) Then hopefully once we see the benefits of testing and how poor mocking does at allowing us to design well, we will move away from them and re-factor.. yada yada, an...
stackexchange/codereview
according to the android specs all the sensors must have their axes oriented the same way, as specified in: http://developer.android.com/reference/android/hardware/SensorEvent.html I have two Motorola phones: mb300 and motorola flipout. In the flipout the magnetic field sensor is mounted correctly. But in the mb300 the...
stackexchange/codereview
I'm trying to reinitialize an Oracle DB and am seeing the following error: [sql] Failed to execute: drop user conns cascade [sql] java.sql.SQLException: ORA-01940: cannot drop a user that is currently connected [sql] Failed to execute: create user conns identified by conns default tablespace tbs_conns temporary...
stackexchange/codereview
When trying to compile this program: #include <netinet/in.h> #include <sys/socket.h> #include <netdb.h> #include <stdio.h> #include <string.h> int main(int argc, char *argv[]) { printf("Hey there\n"); return 0; } i get compiler-error: test.c:1:24: netinet/in.h: No such file or directory test.c:2:24: sys/sock...
stackexchange/codereview
I need to register a handler for a group of radio buttons. I'm using JQuery and hoped that its .change method would accomplish this. However I have not experienced the desired behavoir. Here is a sample snippet I've written. Sadly, the "radioValueChanged" is only called on the initial load. Selecting either true / ...
stackexchange/codereview
While debugging javascript written by someone else, I came across some code that I've not seen before. Here's a sample: function doSomething() { //doing something here... } function doItNow() { //other logic... doSomething && doSomething(); // <=== What's this? } Is the purpose of the 2nd line in func...
stackexchange/codereview
I need download tiles for specified area. I have a bbox with lat/long coordinates, but how convert them to x/y which are required by URL
stackexchange/codereview
I just edited the question to make it more clear.. please help I am using SQL server 2008. I have a column containing the following strings.. http://www.microsoft.com?abc=1234&def=567&ghi=891 http://www.microsoft.com?abc=4587&def=567&ghi=891 http://www.microsoft.com?abc=2478&def=567&ghi=891 http://www.microsoft.com?a...
stackexchange/codereview
I'm using some JavaScript from http://snippets.dzone.com/posts/show/4973, and the scrollTop suggestion below it, to create a bookmarklet for inserting a preset string of text into Blogger's new post textarea. The code looks like this: //IE support if (document.selection) { myField.focus(); //in effect we are c...
stackexchange/codereview
Our organisation only runs .net 2.0 on desktops. It would be nice to upgrade all machines to .net 4.0, but that is not going to happen. I wish to use .net 4.0 features. Is there a way to statically link .net 4.0 runtime libraries into my .net 4.0 executables so they will run on a .net 2.0 environment?
stackexchange/codereview
How to get the name of the day from java sql.Timestamp object such as Monday, Tuesday?
stackexchange/codereview
In PHP, is there a better way to say a variable equals itself, example: $floor = floor($difference / $key); if($floor > 1) { $value .= "s"; } else { $value .= ""; }; On the fourth line, we're saying $floor equals itself plus an empty string. Is there a better way to do this?
stackexchange/codereview
my configuration [global] server.socket_host = "0.0.0.0" server.socket_port = 8080 server.thread_pool = 10 server.environment = "production" server.showTracebacks = "True" server.logToScreen = "False" I have no access to "root" Please suggest me anythin
stackexchange/codereview
Imagine a simple Action with a post public ActionResult Unsubscribe(string contentId) { // get db content and translate it to the UnsubscribeViewModel UnsubscribeViewModel model = myRepository.FindUnsubscribeContentById(contentId).ToUnsubscribeViewModel(); // pass model into the view return Vi...
stackexchange/codereview
I'm trying to create a form along the lines of the following (I am aware that this is not valid HTML, but it hopefully illustrates what and why I am trying to do this): <form method="post" action="test.php"> <input type="text" name="teamName"> <br />Players: <grouping name="players[]"> <input type="...
stackexchange/codereview
I have an NSSplitView (NO UISplitView(Controller)!!) with three subviews. Now, for the last divider (index 1), I want the divider to not show the dragging cursor (two arrows pointing out of eachother). I have this to stop the dragging, but the cursor is still showing up: - (CGFloat)splitView:(NSSplitView *)splitView co...
stackexchange/codereview
We have port an application from Delphi 7 to Delphi 2007 - and the communication between server and client from Indy 9 to Indy 10. The part that checks the username and password is now giving some really weird results: If I'm on my Virtual Machine (development environment) with Delphi 2007, I can login into the server ...
stackexchange/codereview
I'm trying to create a python server that will serve calls from outer source through sockets. So I've skimmed through the docs and copied this code, I can connect but no sent data is shown. What am I doing wrong ? import SocketServer class MyUDPHandler(SocketServer.BaseRequestHandler): def handle(self): se...
stackexchange/codereview
I have a cron script that executes a PHP script every 10 minutes. The script checks a queue and processes the data in the queue. Sometimes the queue has enough data to last over 10 minutes of processing, creating the potential of two scripts trying to access the same data. I want to be able to detect whether the scr...
stackexchange/codereview
I have a generic class called "lockingValue" that may be referenced by several threads. This is to prevent a race condition. class lockingValue(object): def __init__(self,value=None): self._locked=False self._value=value def _lock(self): while self._locked: pass s...
stackexchange/codereview
I'm using jQuery Grid 3.7.2 to load data in 'loadonce' mode, i.e. jqGrid takes care of sorting locally once the data has loaded. One column has a string value that uses a custom formatter, and also requires custom sorting. Unfortunately it seems that providing a function as the 'sorttype' in the column model is not av...
stackexchange/codereview
I am making a frame with 3 panels. 1 panel has some text on it, 1 has radio buttons to alter the font that the saying appears in and the last panel has radio buttons to alter the size of the font. I have everything done, but I am confused as to how to add the action listener for the size radio buttons. Can anyone help ...
stackexchange/codereview
I have groups of 10 to 700 longitude and latitude points around a city or region. I would like to create a polygon or "blob" to cover area defined by these points. I Could pre-process points on our server to save time. has anyone done anything like this or seen any useful tools?
stackexchange/codereview
my team and I are refactoring our application into a layered application. The app is a windows app that is organized with a UI, Service Layer(SL), Business Layer(BLL) and a Data Access Layer(DAL). Our goal is to keep the Application Logic in the Service Layer, keep the Domain Logic in the Business Layer and communicat...
stackexchange/codereview
Im trying to place an image and some text in my view, with the image being twice the height of the text so that the two rows of text can be placed next to the image, like so: _____ | |text here |_____|text here The way i try to do this is to put the two TextViews in a LinearLayout, then place the ImageView and th...
stackexchange/codereview
I just started a new job and have never done web development before. But i am looking at their products and it looks like on the front end they are grabbing html that their UI designers give them and posting in front end. Visual studio complains about this, and i think this is affecting VS from seeing controls someti...
stackexchange/codereview
I'm trying to make a script that will automatically says "see you later" as soon as one specific handle in a channel says the words "going home". I tried to do it on my own but got lost. Could anyone help me out?
stackexchange/codereview
If my data is: x = [x1;x2;x3;x4;x5]; x = [0.2 0.1 0.1;0.3 0.3 0.4;0.2 0.4 0,4;0.5 0.4 0.6;0.1 0.4 0.3]; How to draw a scatter plot for this matrix with PCA style?
stackexchange/codereview
Hi How do I get thread dump for WebLogic server? I have cases of thread locking up happening a number of times.
stackexchange/codereview
I have the following ControlTemplate: <ControlTemplate> <Grid VerticalAlignment="Stretch" HorizontalAlignment="Left" Width="400"> <Grid.ColumnDefinitions> <ColumnDefinition Width="18" /> <ColumnDefinition Width="20*" /> <ColumnDefinition Width="20*" /> <Column...
stackexchange/codereview
I want to output latex versions of my tables. I use xtable() to do so, with one major problem. When I try to generate latex tables from within a function that I call (which typically does lots of other things as well), the files get written as zero length! (I run Windows 7 x64, and use R 2.11). Example: fnc <- function...
stackexchange/codereview
I have an moving background menu. its ok in Chrome and Firefox but not working in IE6 & 7 IE Says, css(...) null or not an object. Here is the code; $(".menu>li") .mouseover(function(){ var myx = $(this).css('background-position').split(' ')[0]; //alert(myx); if(myx!=""){ $(this).stop().animate({backgroun...
stackexchange/codereview
This might be a bit vague, but I am working on a program where several classes that update the UI. I have made a "middle-man" class that basically takes all the UI requests (among other things) and routes them to the UI itself, that way the UI class only interacts with the middle-man. The problem is that the UI class ...
stackexchange/codereview
Suppose I have a function which takes a nullary functor as an argument: void enqueue( boost::function<void()> & functor ); I have another function which takes an int and does something internally: void foo( int a); I would like to nest, but not compose, these together so that I get a functor with the signature: boost...
stackexchange/codereview
Within a rails app I've got a special url (/profile) that I'm mapping to the user controller to allow a user to view and edit their profile. I made the following entries into my route file so that the "get" for profile will route me to the profile action in the user controller and the "post" for profile will route to...
stackexchange/codereview
I have the following trivial Lua program which I copied from the book Programming In Lua #include <stdio.h> #include <lua.h> #include <lauxlib.h> #include <lualib.h> int main (void) { char buff[256]; int error; lua_State *L = luaL_newstate(); /* opens Lua */ luaL_openlibs(L); /* opens the standard libr...
stackexchange/codereview
I am trying to create a UML class diagram and corresponding class definition (in, for example, C# or Java) where I have a generic hierarchy of relationships and one or more specialized classes that are based on that general relationship but constrain it. For example, say I have the following general UML relationships (...
stackexchange/codereview
I have constructed an extremely simple, yet fully-functioning and quite helpful, WinForms C# application that solves for the real roots of a quadratic equation. Here is my current programming logic: string noDivideByZero = "Enter an a value that isn't 0"; txtSolution1.Text = noDivideByZero; txtSolution2.Text...
stackexchange/codereview
i'm trying to studying XCache but is very difficult to get complete documentation (or also lazy documentation like apc docs). For example i'd like to know difference beetwen xcache_list(0, 0); and xcache_list(1, 0); Someone can helps me?
stackexchange/codereview
my cassandra is working well in CLI. and thrift also installed well. i already started apache server and cassandara..but when trying to execute php file that is not executed on browser.it shows the error as: TException: Error: TSocket: Could not connect to localhost:9160 (Permission denied [13]) and the 12th and 13th ...
stackexchange/codereview
Is it considered best practice to use file appenders or database appenders in log4net? This is in a web farm environment hence I'm finding it a struggle managing multiple files for multiple sites - is the database a better way to go, and if so, are there any issues? I've seen some people complain of connection poolin...
stackexchange/codereview
Some HTML forms are filled by users using copy&paste from MSWord, in FCK editors, or others. This generates nasty tags annoying other tools to work fine. Is there a way the server can clean the incoming parameters, so nasty HTML tags would be removed? Of course, regular expressions are not useful, as long as user can w...
stackexchange/codereview
Is it possible to run through every item in a combobox using a foreach loop? How would I do it? The thing is I have a System.Data.DataRowView there because the combobox is attached to a DataTable. How do I convert from that to string?
stackexchange/codereview
Is there any way to have Find ignore any occurrences of the query that are in a commented line? It's making some find / replace operations very time consuming. Thanks, PM
stackexchange/codereview
I am attempting to create a program for a wireless mesh (adhoc in all but name). Most of the network will deal with TCP messaging but to determine all neighbor IPs (as they will be unknown on startup), I choose to use UDP Broadcast for the initial discovery messages. That code, for the most part, is irrelevant as initi...
stackexchange/codereview
I just finished the main part of the current data structures project, and am working on collecting the statistics. One requirement is that a count of all the references within the TreeMap be recorded. This Map contains a 31,000+ nodes where a String is mapped to a TreeSet of indeterminate size. I need to traverse the ...
stackexchange/codereview
Is there a way of catching exceptions (particularly for network errors / no connection available) when using a MPMoviePlayerController? I am particularly concerned that once an instance of the player is initialised with initWithURL: you have no way of knowing whether the movie load has failed for some reason. I have re...
stackexchange/codereview
Assuming I have a xdocument called xd, with the following xml already created. <Alert> <Source> <DetectTime>12:03:2010 12:22:21</DetectTime> </Source> </Alert> How would I be able to add another Alert element, such that the xml becomes: <Alert> <Source> <DetectTime>12:03:2010 12:22:21</DetectTime> </So...
stackexchange/codereview
I'd like to preprocess boolean formulas so that a and (a or b) and c becomes just a and c There are never any negations, so it should be a simple problem, but nothing really obvious comes to mind (other than folding and-in-and, or-in-or, duplicates, sorting). Am I missing something totally obvious perhaps?
stackexchange/codereview