instruction_seed
stringlengths
1
35.8k
_source
stringclasses
1 value
I've added a function so that my database resides on the device, however, in the simulator I can't find it on my mac at all. It used to be in Machintosh HD before I used my function. + (NSString*)getDBPath { NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSString *docu...
stackexchange/codereview
I once saw this nice little snippet of code below, here at SO: template<typename to_t, typename from_t> to_t lex_cast(const from_t &arg) { to_t ret; std::stringstream os; os << arg; os >> ret; return ret; } This mimics boost::lexical_cast. Usage: string tmp = ::lex_cast<string>(3.14); However, due...
stackexchange/codereview
This compiles and runs ok on Visual C++ 2010 Express but it only checks against the [2] element: "Fish". int main() { vector<string> words; string temp; vector<string> disliked(3); disliked[0] = "Broccoli"; disliked[1] = "Mushrooms"; disliked[2] = "Fish"; whil...
stackexchange/codereview
I would like to get the calling method java.lang.reflect.Method. NOT the name of the method. Here is an example how to get the callers Class. // find the callers class Thread t = Thread.getCurrentThread(); Class<?> klass = Class.forName(t.getStackTrace()[2].getClassName()); // do something with the class (like processi...
stackexchange/codereview
I am facing a strange problem. I have created a normal ext-gwt grid with two columns. One column displays a number and the other renders a ToggleButton. As soon as the ToggleButton gets pressed a small window appears with: 1- a textfield (to enter a number), 2- an ok button. When the ok button is pressed the column con...
stackexchange/codereview
Hi guys I'm trying to find algorithms of games but not those 3D or 2D, I'm looking for simple games like "guess what word I'm thinking" or any kind of game that only requires basic reading of a text and the user has to choose between some options.
stackexchange/codereview
I have an iphone app, and I need to capture some data right as the app is about to close... Is it possible to associate a method call with the clicking of the iphone home button? So that I can get the most recent and current data of a particular type that I can?
stackexchange/codereview
Is there a way in SQL sever that can write the output as follow: select events from mytable original output events -------- 123456 894531 985233 829292 920202 392939 299223 desired output '123456', '894531','985233','829292','920202','392939','299223' select '' + CustomerID + ',' from dbo.Customers customerid ALFK...
stackexchange/codereview
I'm having problem to understand some piece of code in MTD driver #define ROUNDUP(x, y) ((((x)+((y)-1))/(y))*(y)) ... static struct mtd_partition my_parts[] = { { .name = "boot", .size = 0, .offset = 0, .mask_flags = MTD_WRITEABLE }, { .name = "linux", .size = 0, ...
stackexchange/codereview
I have in my code a window.prompt, which should stop the flow of the code until user put in some value. Of course IE7 try to protect me from myself and instead of showing the prompt it shows the security tab (top of the page where it alerts to the users that a script wants to open a window). What is even worse is that ...
stackexchange/codereview
I didn't know that C and C++ allow multicharacter literal: not 'c' (of type int in C and char in C++), but 'tralivali' (of type int!) enum { ActionLeft = 'left', ActionRight = 'right', ActionForward = 'forward', ActionBackward = 'backward' }; Standard says: C99 6.4.4.4p10: "The value of an integer cha...
stackexchange/codereview
Is there any away to configure the pattern for String values returned by DateFormat's getDateInstance(), for each style - SHORT, MEDIUM, LONG, and FULL? For example, DateFormat.getDateInstance(DateFormat.MEDIUM, Locale.US) will always return a value something like Jan 12, 1952. How can I have this return 1952, Jan 12?
stackexchange/codereview
I have this selectbox on a site Im currently building and what I want to do, is sort a list of items displayed on the page by the value that's being selected. The problem is that I got different kinds of data types, e.g. location and price. If I want to sort on location, no problem it sorts perfectly on alphabetic or...
stackexchange/codereview
Possible Duplicate: underline text in UIlabel I want to underline the UILabel text as hyperlink UILabel *myLabel = [[UILabel alloc] initWithFrame:CGRectMake(20.0, 220.0, 160.0, 30.0)]; myLabel.text = @"click here"; How can i make the above string to be underlined ? Thanks for any help
stackexchange/codereview
I am making a shell script that will automate the install process of Arch Linux AUR packages. I need to list all dependencies of the package (to check if they are installed), they appear like this in install script: depends=('sdl' 'libvorbis' 'openal') The easiest way (or the only idea) that I could come up with is so...
stackexchange/codereview
Having problems returning a list of Japanese terms from an MSSql database as JSON. If I return them as a bunch of list items all is ok, but I can not seem to get json encode to work for me. Any pointers much appreciated. $prefs = array(); while($row = mssql_fetch_array($result)) { $prefs[] = mb_convert_encoding($row["...
stackexchange/codereview
I'm programming a 3D game where the user controls a first-person camera, and movement is constrained to the inside surface of a sphere. I've managed to constrain the movement, but I'm having trouble figuring out how to manage the camera orientation using quaternions. Ideally the camera up vector should point along the ...
stackexchange/codereview
I'm new to Silverlight and Prism. I'm developing a dashboard application. Here's my question. I've 2 regions: 1. Login 2. Maincontainer. My Login region has one view and my maincontainer has 2 views. After a successful login, i need to deactivate the Login region or view (whichever is simple) and then i need to activat...
stackexchange/codereview
How can I read this json array? I am getting undefined results. What am I doing wrong? = jSON file == // JSON { "items": [ { "title": "welcoem home", "author": "Charles Dickens" }, { "title": "Harry Potter", "author": "J rowling" }] } <script language="javascript" > $(document).ready(function(...
stackexchange/codereview
I found this link to handle events for a dynamically created control in VB6 and I tried to use this for my code, but to no avail. Option Explicit Private WithEvents grid(0 To 23, 0 To 23) As Frame How can I get the same functionality for this array of controls?
stackexchange/codereview
__author__="Sergio.Tapia" __date__ ="$18-10-2010 12:03:29 PM$" if __name__ == "__main__": print("Hello") print(__author__) Where does it get __main__ and __name__? Thanks for the help
stackexchange/codereview
Recently I'm playing with custom jquery ui widget which is positioned "center bottom" of specified position. (Just imagine that google map marker's anchor..) First, I have main widget and a DIV which has relative positioning with left -50%. Yes, it was shifted to left by its half width. But for height, it's not working...
stackexchange/codereview
I crawled all the web, but nothing. I have a for loop to create uiimageview inside a uiscrollview controller. It's a collection of images that you can scroll horizontally only. for (int i = 0; i < NIMAGES; i++) { NSString *filename = [NSString stringWithFormat:@"image%d.png", i+1]; ScrollerImage *iv = [[Scrolle...
stackexchange/codereview
I don't knwo much about server maintainance and configuration, but i just started using one form mediatemple VE-Server...everything is fine and easy btu i dont get how can i enable the https connections... if now i type https://mysite.com/login.php it doesnt work (page not found)
stackexchange/codereview
I've got a simple text block with a label and text box as content. I would like to bind the IsEnabled property of the text block to a property on my view model. For whatever reason the label and text box stay disabled even though the IsEnabled property is changing properly on the view model. Anyone know what's going o...
stackexchange/codereview
I cant seem to find an answer on the internet anywhere. So I have a processing project in Eclipse I want to be able to access objects in my "main" class that extends PApplet in another class without having to pass them through the constructor. I am not the most experienced programmer so my terminology might be off but ...
stackexchange/codereview
I'm trying to setup fastri (http://eigenclass.org/hiki/fastri) on emacs running on cygwin in windows. The ruby install is also from cygwin, not the windows version of ruby. After downloading, unpacking the tarball and running setup.rb, when I attempt to run qri or fri, I get the following error message: [/cygdrive...
stackexchange/codereview
I'm just wondering why my UDP server/client pair is getting 65% packet loss. It's just an echo service that sends (the client) an empty packet when it reaches EOF, and the server resets itself when he gets that empty packet. Not really homework, just frustrated because I can't get it right :( Thanks!
stackexchange/codereview
Do I need to create a repository for each project or just one that encompasses all of the projects in this solution?
stackexchange/codereview
I want to do this in Javascript: function Z( f ) { f(); } function A() { this.b = function() { Z( function () { this.c() } ); } this.c = function() { alert('hello world!'); } } var foo = new A(); foo.b(); It can be accomplished this way: function Z( f ) { f(); } function A() { var self = ...
stackexchange/codereview
How to add pause button in this jQuery image slider? I want to add Pause on click button at last after 4 ? Like this: see example pic http://shup.com/Shup/431390/110929231254-My-Desktop.png http://www.sohtanaka.com/web-design/examples/image-slider/ I want add another link button to pause the slider on current slide. a...
stackexchange/codereview
I'm ceating an application with SQLite. When I'm fetching the values from the database, I'm getting the error below: 10-30 15:06:07.584: ERROR/Database(817): Leak found 10-30 15:06:07.584: ERROR/Database(817): java.lang.IllegalStateException: /data/data/com.fitzsoftware.grocessaryList/databases/example.db SQLiteDatabas...
stackexchange/codereview
I would like to do a insert into using a select, but I know that some rows might fail (that is expected). Is there a way to change the implicit transactions of SQL Server 2008 off so that the ones that have not failed are not rolled back? -- get the count of the customers to send the sms to SELECT @count = COUNT(*) FRO...
stackexchange/codereview
Let's say that I have to show some graphics on some control. But there will be three images switched based on some condition. Three bitmap is added in the resource file. So, I retrieve them by calling ResourceManager.GetObject. The question is that, should it be: Everytime I have to switch image, I call GetObject to g...
stackexchange/codereview
I have the following repeater code: <asp:Repeater ID="repMain" runat="server" OnItemCommand="repMain_ItemCommand" EnableViewState="false"> <ItemTemplate> <dmg:testcontrol runat="server" MyData=<%#Container.DataItem %>> </dmg:testcontrol> </ItemTemplate> </asp:Repeater> The testcontrol usercontro...
stackexchange/codereview
If I have a normal <?php echo "Today (".mysql_num_rows($query)."); ?> That turns out as Today (10) if there's 10 rows. Now under this counter I have an while() that outputs all the rows inside a <tr>. In a <td> inside the tr i have this delete button, which hides closest 'tr'. How can I when you hide the 'tr' the Tod...
stackexchange/codereview
Here is an example: def g(): yield str('123') yield int(123) yield str('123') o = g() while True: v = o.next() if isinstance( v, str ): print 'Many thanks to our generator...' else: # Or GOD! I don't know what to do with this type raise TypeError( '%s:%d Unknown yield value type %s.' % \ ...
stackexchange/codereview
i have a requirement, i want to take URL of image from user and then convert it to bytes format, and send it my server, i am using tomcat as web-app server and hibernate as ORM tool, i am already written the server side code for saving the incoming bytes into a table using BLOB, but my problem is that how can i convert...
stackexchange/codereview
I'm new to Spring MVC and have the following situation: In WEB-INF/demoshop-servlet.xml I have the following line: <bean id="someBean" class="com.xxx.xxx.web.SomeBean" /> I also have a JSP that contains a line like: ${someBean.someAttribute} I expected that the attribute is read from the bean when the page is rendere...
stackexchange/codereview
I currently have something close to the following implementation of a FPS independent game loop for physics based games. It works very well on just about every computer I have tested it on, keeping the game speed consistent when frame rate drops. However I am going to be porting to embedded devices which will likely ...
stackexchange/codereview
I've seen the new line \n used 2 different ways in a few code examples I've been looking at. The first one being '\n' and the second being "\n". What is the difference and why would you use the '\n'? I understand the '\n' represents a char and "\n" represents a string but does this matter?
stackexchange/codereview
I'm writing a basic Java application that allows a user to insert details about individuals into an SQLite database. I'm using Eclipse SWT for the GUI. Eclipse SWT defines a type Image (org.eclipse.swt.graphics.Image) for displaying Images in a GUI. I am trying to allow a user to browse the file system, select an imag...
stackexchange/codereview
The code is as follows: <body> <a href="javascript:;" id="test">hello</a> </body> <script type="text/javascript"> document.getElementById("test").addEventListener("click", function () { test() }, false) function test() { var postTypes = new Array('hello', 'there') (function() { alert(...
stackexchange/codereview
I have create Office Excel application in my machine(XP). and i have placed the application in windows server 2008 giving the following error. Microsoft Office Excel cannot access the file '\server\Input.xls'. There are several possible reasons: The file name or path does not exist. The file is being used by another ...
stackexchange/codereview
When eclipse starts up, it first show its splash screen and then pops up a dialog for selecting the desired workspace to open. If at this point I switch to a different virtual desktop and then come back later, only the splash screen is visible but the dialog is gone and I haven't found a way to get it back. I have to k...
stackexchange/codereview
I'm having a problem with the AutoComplete with multiple values. I can even re-create it on the jQuery demo site - here What happens is if you search for something, then delete your search and enter the same search nothing happens. I have tried to turn off caching (setting to 1 like the documentation states, or even 0)...
stackexchange/codereview
It seems as if MySQLdb is restricting the maximum transfer size for SQL statements. I have set the max_allowed_packet to 128M for mysqld. MySQL documentation says that this needs to be done for the client as well.
stackexchange/codereview
I am working on a 3d tile-based strategy game and have read that implementing VBO's will significantly increase the game's frame rate and reduce the cpu usage (sounds great right?). However, among the tutorials I've looked at I can't quite get a handle on how to implement it. Has anyone had experience doing this and ...
stackexchange/codereview
heres the situation. I have a table called as maps coordinates the schema is like below: map_coordinates: item | item_id | latitude | longitude The idea is that this table contains a list of coordinates of different items, they could be a note, a classifieds post, an event etc. I want to be able to set it up so I have...
stackexchange/codereview
How can I get it back again so I can put the right path into it? I think this is the reason that app inventor wont connect to my phone.
stackexchange/codereview
I'm facing a weird runtime conflict between Woodstox STAX and java 1.6 STAX implementation. Since I'm using CXF,its pulling Woodstox jar as part of its dependency. Here's a sample code I'm using. import javax.xml.stream.XMLEventReader; import javax.xml.stream.XMLInputFactory; import javax.xml.stream.events.Attribute; i...
stackexchange/codereview
The following command copies and moves a file but I also need it to overwrite the file it's replacing. xcopy /s c:\mmyinbox\test.doc C:\myoutbox
stackexchange/codereview
I am an Android newbie trying to learn the UI side of things and it's doing my head in. Here's what I have right now: breeds_listing.xml <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="wrap_content" android:layout_height="wrap_con...
stackexchange/codereview
I have a bunch of airports with geocoordinates stored in a glist. I am then using CLLocationManager to get current location. I now want to go through each item in the glist and compare it to the current location and order the airports from closest to furthest. My algorithm sucks - any ideas?
stackexchange/codereview
How would I get access to the a_var that is in setTimeout, from the outter someFunction? Thanks. function someFunction(){ (function why(){ setTimeout(function(){ var a_var='help I wanna get out!'; return a_var;//<-useless? ...
stackexchange/codereview
I have a products listing page that lists 3 products in a single line per page. So I want to put next-previous buttons on left-right side of this 3 products line. So when someone click next, it bring next 3 products by slide-in effect. Any suggestion ?
stackexchange/codereview
I have a linq union statement that has been giving me some trouble and I can't see where the issue is. Any help would be appreciated. The error is.... All queries combined using a UNION, INTERSECT or EXCEPT operator must have an equal number of expressions in their target lists. I know the error means that I am select...
stackexchange/codereview
A client has asked for a spinning wheel as part of their navigation. The user is faced with the edge of the wheel with the various navigation items on there, and they spin it with a click/drag of their mouse. Whatever it stops on is what page they are presented with. The only example of this I could find to help illust...
stackexchange/codereview
I have a POJO class, say Foo, which has a Set of other entity instances, say bars. Also there are standart misc classes for such project: service and dao for both Foo and Bar. I want BarService to get the Set of Bar instances associated with some Foo. Now I have the following code, wich I believe is conceptually bad. ...
stackexchange/codereview
I wrote a code to get a runtime error intentionally: int main() { int a=5; printf("Hello World\n"); printf("a=%s\n", a); } It gives: $ ./error.o Hello World Segmentation Fault $ Now, to record the runtime errors, I do: $ ./error.o > so.txt $ ./error.o &> soe.txt But both the files are empty. Why? EDIT: I'm actual...
stackexchange/codereview
Is there any way to get all displayed items from an dojox.grid? We have an Filter with querys, now we need all items displayed in the moment. To get all selected items is no problem with: var items = grid.selection.getSelected();
stackexchange/codereview
I've a problem. I want to have nice dynamic groovy classes to represent an ugly XML structure (unfortunately JAXB, XmlBeans etc. is not possible). For this goal I need case-sensitive properties to map the element values from XML to my classes. But Groovy generates automatically lowercase property names due to the JavaB...
stackexchange/codereview
Short question here: In .Net 4.0 Winforms, how do I use the PasswordChar property of a Textbox to show a common black dot as a character? Is there perhaps some font I can use that has this as a character? If I use 'UseSystemPasswordChar = true' it shows an asterisk (*).
stackexchange/codereview
I have written a custom container object. According to this page, I need to implement this method on my object: __iter__(self) However, upon following up the link to Iterator Types in the Python reference manual, there are no examples given of how to implement your own. Can someone post a snippet (or link to a resourc...
stackexchange/codereview
Currently I have a web part with some custom CSS. This is a Document Library web part which also contains the link to "Add a new document" below. Once I click Add new document I am taken to the upload document page. Is there any way to have the upload document section displayed on the same page or is there an easy way...
stackexchange/codereview
Is there any way how to encode a png/jpeg/gif image to base64 using Javascript (can't use canvas toDataURL)? Thank you.
stackexchange/codereview
Imagine I have the following code that runs as a background processor for an android application: public class Background extends Service { public void popup (String message, int duration) { Toast.makeText(this, message, duration).show(); } class BackgroundChecker extends TimerTask { ...
stackexchange/codereview
I've recently inherited a site created in Dreamweaver where all URLs use the 'up one level' notation e.g. "../products/" and I would like to do a global find and replace with root path e.g. "/products/". What's the regular expression I need to use in the Visual Studio Find & Replace Dialog to replace the following matc...
stackexchange/codereview
I have an existing many-to-many relationship in SQL that is being mapped to my business entities via NHibernate. I want to add a property to the child (Category below) that is only applicable to the relationship between the parent and the child. In SQL, I would add a field to the join table. How do I use NHibernate to...
stackexchange/codereview
I noticed that when you type ctor then hit the Tab button, VS will automatically create a constructor skeleton for you. I also saw in a screencast, the speaker could generate, among other things :Console.WriteLine, and also skeleton methods for all interface methods using keyboard shortcuts. However, I couldn't get w...
stackexchange/codereview
Given a mapping program where I map from an array of strings to a discriminated union, I want to select an instance of a particular DU type. I know that there will be 0 or 1 instances. Is there a smarter way to do it than this? type thing = { One:int; Two:int; Three:int} type data = | Alpha of int | Bravo of ...
stackexchange/codereview
I have an xml file which I want to unmarshal. It is a very simple file with very well defined structure. Do I still need a xml schema to use JAXB? If so what is the other option? What are the pros and cons
stackexchange/codereview
Ok, this is a very interesting question and there may not be any easy way to do this but figured I would throw this out there before deciding that modifying Perl is my underlying answer. So I've got a C application that calls Perl scripts in an embedded fashion. This all works fine and dandy and it's pretty awesome th...
stackexchange/codereview
I know this is quite possibly a lame question, but I've pulled three consecutive all-nighters and I'm very blurry. And I'm new to Objective C and Cocoa Touch. I've created a class that provides a delegate method. I'll use simplified example code since the specifics aren't important. The header file looks like this: #im...
stackexchange/codereview
I want to convert a Joda Time UTC DateTime object to local time. Here's a laborious way to do it which seems to work. But there must be a better way. Here's the code (in Scala) without surrounding declarations: val dtUTC = new DateTime("2010-10-28T04:00") println("dtUTC = " + dtUTC) val dtLocal = timestampL...
stackexchange/codereview
hai guys, i am planning to create a table view and the detail view for the corresponding row, all the datas are fetch from the sqlite database. For this i have created two tables in the database table one for the datas in the table view list and table two for the detail view of the table list. i set the produc...
stackexchange/codereview
I am writing a master installer with the following ShellExecuteEx() function that call a few Advanced Installer created installers (installing multiple products) one by one through a loop construct. // Shell Execute bool CFileHelper::ShellExecute(CString strCommandPath, CString strOptions) { CString strQCommandPa...
stackexchange/codereview
I am trying to generate an xls file with Spreadsheet::SimpleExcel that calls a function that is defined in a third party add in (Bloomberg, if it matters). The underlying WriteExcel package does not let me write this out because it does not know about this add-in function. I see the giant hash table of built-in funct...
stackexchange/codereview
We have a collection of 25 or so projects in a source safe database and we want to apply daily labels to each of them. Is there a limit to the number of labels that can be applied?
stackexchange/codereview
I use Exchange Server Managed API. How do I find out if an appointment is private? There doesn't seem to be a method or property in the "Appointment" class.
stackexchange/codereview
With too many arguments, String.format easily gets too confusing. Is there a more powerful way to format a String. Like so: "This is #{number} string".format("number" -> 1) Or is this not possible because of type issues (format would need to take a Map[String, Any], I assume; don’t know if this would make things worse...
stackexchange/codereview
I have a class which I can write like this: class FileNameLoader { public: virtual bool LoadFileNames(PluginLoader&) = 0; virtual ~FileNameLoader(){} }; Or this: class FileNameLoader { public: virtual bool LoadFileNames(PluginLoader&, Logger&) = 0; virtual ~FileNameLoader(...
stackexchange/codereview
Learning static classes, I read some examples and would like to ask whether my opinion is correct: Menus - MY opinion: is it because I only need one menu and instances of menu are not making sense? Constant information - MY opinion: I could have simply const variables, right? Helper methods - MY opinion: it is because...
stackexchange/codereview
I have a jTextArea with a long string. Let's usume: String str = "this is a toooo long string"; Now i want to show this string in one swing jTextArea. But my textArea has limited size on the frame. So, i'm not be able to see the entire string. For exemple, the text area only shows: "this is a t" It is possible to ...
stackexchange/codereview
In node.js (or v8/chrome), can I rely on using string concatenation for getting the code behind a function? for instance, in node.js var f = function(x) { return x; } console.log(f); shows "[Function]" while console.log("" + f); shows "function(x) { return x;}" is this a reliable semantic? Is this in the ECMA spec so...
stackexchange/codereview
I'm newbie to the linux and apache server configuration so please give me some advice. I installed VMware in my WinXP and installed CentOS5 to it. After I set up Apache server in my CentOS, I can access that server from my CentOS(of course). But is there a way to access that from my Windows? I think that is definitely...
stackexchange/codereview
Is there a way to convert a .caf file to a .m4r (ringtone) file programmatically on the iPhone? I've tried a bunch of stuff and nothing seems to work. Importing into garageband and then sharing as ringtone works but I want to do it in my app.
stackexchange/codereview
Here's what the class loader looks like: loader.php class Load { public static function init($class) { require_once 'classes/' . $class . '.php'; return new $class(); } } $class = Load::init('MyClass'); The error being returned is: Fatal error: Class 'MyClass' not found in /www/website/ap...
stackexchange/codereview
I will be developing apps using both my own Live ID and one specific to my employer. Can I register the same device to both IDs at the same time?
stackexchange/codereview
I have a following problem that I need to solve. The core issues is that I want to add additional column into JoinTable for ManyToMany relation in JPA. In my case I have following entities. The Topic is a simple entity which has many RemoteDocument's (one RemoteDocument may be refered by many Topic's, hence it should b...
stackexchange/codereview
I have a logger class. Call it MyLogger. I may use it in a function like this: void MyFunc(MyLogger& oLogger) { //Do stuff oLogger.Log("In MyFunc : Some Error"); //Do something else oLogger.Log("In MyFunc : Some other error"); } Now, I want to prepend "In MyFunc" to the logs if the log comes from inside My...
stackexchange/codereview
I meet a weired problem when using JUnit in multi-thread environment. The following code should fail, but it actually pass in eclipse. public class ExampleTest extends TestCase { private ExecutorService executor = Executors.newFixedThreadPool(10); private volatile boolean isDone = false; public void tes...
stackexchange/codereview
Can't find it in the Internet. If someone helps I'll appreciate it greatly!
stackexchange/codereview
I'm quite new to Flex. I've looked into taking screenshots in flex and have found many links on google and here on stackoverflow for taking screenshots of components and stuff like this. What I would like to do is take a screenshot of the entire tab in a browser window (or, failing that, the browser window itself or e...
stackexchange/codereview
I'm trying to write a multithreaded implementation for JMS message processing from a queue. I've tried with DefaultMessageListenerContainer and SimpleMessageListenerContainer classes. The problem I have is that it seems like just a single instance of the MessageListener class gets ever instantiated, no matter how I con...
stackexchange/codereview
I have a simple data structure (the properties are of course Dependency Properties): class MenuData{ public string Header {get; protected set;} public ObservableCollection<MenuData> Items { get; protected set; } } ObservableCollection<MenuData> Menus {get; protected set;} I want to bind the Menus property as ...
stackexchange/codereview
I declared a struct for some options that shall be filled by command line arguments or by reading an input file: struct options { int val1; int val2; bool val3; } Now I want to check for the correct number of arguments at execution of the program. Sure thing a const int optionsSize = 3; would do. But is there ...
stackexchange/codereview
Let's say we have two files. match.txt: A file containing patterns to match: fed ghi tsr qpo data.txt: A file containing lines of text: abc fed ghi jkl mno pqr stu vwx zyx wvu tsr qpo Now, I want to issue a grep command that should return the first and third line from data.txt: abc fed ghi jkl zyx wvu tsr qpo ... be...
stackexchange/codereview
In the Sharepoint Document Library web part, is there a way to have a delete link for each of the files listed? In the regular view of a document library you have a dropdown available when you hover over a filename, but there doesn't appear to be any option to delete a file in the web part.
stackexchange/codereview
I have a very basic knowledge regarding XML. But now I want to dig more related to this. I am using Java so I would like to ask for advise on what particular book is useful in my case. Can you share with me the best possible book that I could purchase. I tried to look at amazon but I got discouraged in some of the r...
stackexchange/codereview