instruction_seed
stringlengths
1
35.8k
_source
stringclasses
1 value
I would like to assign /dev/fbX device like below. /dev/fb0 for USB-LCD device. /dev/fb1 for Main Display device. I try that. ver.1:created /etc/udev/rules.d/91-udev-fb.rules KERNEL=="fb0", ATTR{name}=="VESA VGA", ACTION=="add", NAME="fd1" KERNEL=="fb1", ATTR{name}=="I-O DATA USB-RG", ACTION=="add", NAME="fd0" result....
stackexchange/codereview
It's too complicate to explain but I'll give you an example I have an AS3 ResultEvent Object and this object has several propeties which can be accessed by this like: event.result.name or event.result.age ..... and, I have this String variable: eventProperty:String that contains "name" or "age" How do I access to event...
stackexchange/codereview
Looking for a HTML converter which will produce valid XHTML code. One important thing is that it will need to insert P tags for paragraphs - something that seems to be missing from most popular ones. I found John Resig's, but it does not insert P tags. http://ejohn.org/blog/pure-javascript-html-parser/ For example, thi...
stackexchange/codereview
I have a Python function that writes an output file to disk. I want to write a unit test for it using Python's unittest module. How should I assert equality of files? I would like to get an error if the file content differs from the expected one + list of differences. As in the output of the Unix diff command. Is there...
stackexchange/codereview
I have a DataSet that I fill with a SQL select query. I then need to perform an extra query on this DataSet to filter the data some more, using LINQ to DataSet. I then want to hook this LINQ result up to some Data Control (Repeater or GridView) It is not working so well though. Here is what I've tried so far: Dim sql A...
stackexchange/codereview
Ever since I learned LINQ a couple years ago I have been using it more and more. I no longer think in loops but rather in projections, selections, etc. Even when I use other languages like Perl, I now find myself making extremely heavy use of things like map and grep. I find that pretty much every single method whi...
stackexchange/codereview
I'm trying to build a sign-in form similar to Twitter, but I have one problem. When "Sign In" is clicked, the form appears. And when "Sign In" is clicked again, the form goes away. This fine, but I would like the form to go away also when the user clicks outside the form. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1...
stackexchange/codereview
I cannot figure out what the hell is going on for the life of me. Normally when I want to run a site locally for testing purposes, I simply point my browser to: http://localhost/site_folder This works on the majority of my pages but for some strange (and I mean really strange) reason, some folders give a 500 redirect...
stackexchange/codereview
I am new in SwingX and I have trouble using JXCollapsiblePane and JXTaskPane using Pallete manager of Netbeans 6.9.1 Specifically: For JXTaskPane: I drag a JXTaskPaneContainer from pallete manager in a JForm I drag a JXTaskPane from pallete manager into JXTaskPaneContainer 3.I try to add a jpanel or a jbutton in...
stackexchange/codereview
Is there a trick, addon or patch that allows me to find out what modules altered a specfic form? A list of all hook_form_alters is not too hard to achieve. But I want to list only those that actually changed my form. Modules can alter a form trough a generic modulename_form_alter() and modulename_form_FORMID_alter() i...
stackexchange/codereview
hello what is the difference between <%+i%> and ${i}
stackexchange/codereview
I was considering using UnmanagedMemoryStream rather than MemoryStream for dealing with incoming (and perhaps outgoing?) packets in a network server. What I hope to achieve is less copying of values, and if possible, avoid copying to the heap (too much). For example, for an incoming packet, one could do: fixed (byte* p...
stackexchange/codereview
I have an overload method - the first implementation always returns a single object, the second implementation always returns an enumeration. I'd like to make the methods generic and overloaded, and restrict the compiler from attempting to bind to the non-enumeration method when the generic type is enumerable... class ...
stackexchange/codereview
Some popular blog sites typically use square brackets in their URLs but ruby's built-in URI.parse() method chokes on them, raising a nasty exception, as per: http://redmine.ruby-lang.org/issues/show/1466 I'm trying to write a simple monkey-patch that gracefully handles URLs with the square bracket. The following is wha...
stackexchange/codereview
I can't quite figure it out, I'm looking for some code that will add an attribute to an HTML element. For example lets say I have a string with an <a> in it, and that <a> needs an attribute added to it, so <a> gets added style="xxxx:yyyy;". How would you go about doing this? Ideally it would add any attribute to any ta...
stackexchange/codereview
I have a large application written in C++, For various reasons I am going to rewrite it in C#, I have done plenty of Delphi to C#, VB to C# but C++ to C# I have never done, although I am competent in C++ I want this to be as smooth a conversion as possible. Mainly what I am asking is what pitfalls await me in this conv...
stackexchange/codereview
Is there a way to use getdate (or similar) to output the current day in a format like this twenty october twenty ten I can't have the year as 'two thousand ten' due to space restrictions so it just needs to be 'twenty eleven' 'twenty twelve' etc
stackexchange/codereview
My app uses Core Data with a simple model with two entities, 'Category' and 'Item', both with a 'name' attribute and a relationship one-to many (a category has many items). In IB I have a tableview and a Array Controller for the items. Also a textfield and a comboBox (for user type items name and select a category) and...
stackexchange/codereview
Edit - Put the question into context a bit more. Given: struct Base { ... }; struct Derived : public Base { ... }; class Alice { Alice(Base *const _a); ... }; class Bob : public Alice { Bob(Derived *const _a); ... }; When I try to implement Bob::Bob(Derived *const _d) : Alice(static_cast<Base*c...
stackexchange/codereview
OK i have two groups of mobile numbers (from mysql) which i need to process, the problem is i need to remove duplicate numbers from the results. Someone told me about "array_intersect" but I am not very good at these things and I don't see any good examples on the PHP website. Any help or suggestions is appreciated tha...
stackexchange/codereview
When I load my executable in NUnit, the application appears to be "locked". I run the tests but when I want to make some modifications to them, I have to close NUnit first otherwise my compilation will fail. Is there any workaround for this? EDIT According to Process Explorer, the only process accessing my executable r...
stackexchange/codereview
Trying to follow along with a metaprogramming screencast from pragpub and ran into some problems because of changes in Ruby since the release of screencast. Hard to explain the problem w/o the code, so here's that: class Discounter def discount(*skus) expensive_discount_calculation(*skus) end private def...
stackexchange/codereview
I'm trying to write a function that will get me the attribute of a set of XML nodes in a document using XPath with the TinyXPath library, but I cannot seem to figure it out. I find the documentation on TinyXPath is not very enlightening either. Can someone assist me? std::string XMLDocument::GetXPathAttribute(const s...
stackexchange/codereview
I got a problem while creating a report in SSRS. The ERROR shows: Error 1 [rsInvalidReportParameterDependency] The report parameter ‘COUNTRY’ has a DefaultValue or a ValidValue that depends on the report parameter “COUNTRY”. Forward dependencies are not valid. C:\Users\wiksat\Desktop\New Folder\New folder\Visual S...
stackexchange/codereview
I have programmed in Python for a while, and just recently started using Ruby at work. The languages are very similar. However, I just came across a Ruby feature that I don't know how to replicate in Python. It's Ruby's freeze method. irb(main):001:0> a = [1,2,3] => [1, 2, 3] irb(main):002:0> a[1] = 'chicken' => "chick...
stackexchange/codereview
We use the http://jedi.codehaus.org libraries for working with collections and manipulating them in a functional way. We recently came across a problem when doing something similar to the following: public class Address { //constructors and stuff public KiloWatts electricityConsumed(Duration timePeriod) throw ...
stackexchange/codereview
I am trying to left justify text on a UIButton. It is middle justified by default. The following doesnt seem to work. Can someone suggest what may work. aButton.titleLabel.textAlignment = UITextAlignmentLeft;
stackexchange/codereview
Hey, Here's what I am trying to do: There is one scrollable div with fixed size, say 400x400 px. Inside there are two divs: header div and data div. Both their height and width are variable. What I want to do is be able to scroll horizontally both header and data divs but vertically only the data. In other words, I wan...
stackexchange/codereview
I would like to extract e-mail addresses from a Sharepoint site/database. One list item in Sharepoint can contain several addresses inside a textbox, so I need some sort of regular expression or other trick to recognize what is an e-mail address and what is not. So I'm not sure which approach is the best. SQL Queries a...
stackexchange/codereview
Take a look at this code: System.Web.SessionState.HttpSessionState ss = HttpContext.Current.Session["pdfDocument"] ?? false; if ((Boolean)ss) { Label1.Text = (String)Session["docName"]; } Basically I want to check if HttpContext.Current.Session["pdfDocument"] is not null, and if it...
stackexchange/codereview
For regular expression \w+\d, in many script language such as perl/python it can be written literally. But in C/C++, I must write it as: const char *re_str = "\\w+\\d"; which is ugly to eye. Is there any method to avoid it? MACRO are also acceptable.
stackexchange/codereview
I have a HTTP page with a form. If I set the action to a HTTPS page, is the request secure? Does the browser process all the data before it sends it to the net? Or should I use HTTPS for my entire site?
stackexchange/codereview
I want to develop an iPhone callerID application. I have following challenges to develop How to detect incoming call? Need to start my app when an incoming call occurs Please help me out..I am new to iPhone development. Thanks, Srikanth
stackexchange/codereview
I have this in SQL: SELECT DISTINCT O.custid, P.productname, TO_CHAR(MAX((quantity) * D.unitprice) AS "Revenue" FROM corp.Orders O LEFT JOIN corp.Order_Details D ON O.orderid = D.orderid LEFT JOIN corp.Products P ON D.productid = P.productid GROUP BY O.custid, P.productname...
stackexchange/codereview
I'm using jinja template language to generate html and javascript for a website. How can I make vim understand that everything between '{{'/'}}' and '{%'/'%}' is Jinja code and the rest it javascript code? Is there a simple way of doing that?
stackexchange/codereview
I have the following JavaScript variables: var fontsize = "12px" var left= "200px" var top= "100px" I know that I can set them to my element iteratively like this: document.getElementById("myElement").style.top=top document.getElementById("myElement").style.left=left Is it possible to set them all together at once, s...
stackexchange/codereview
With reference to the semaphore implementation of semaphore.h in Linux, does an uninitialized semaphore sem_t default to 0? I just discovered that I had forgotten to initialize my semaphores to 0. Even so, the program worked fine without sem_init. (To all the purists, I completely agree that doing so is a bad practice....
stackexchange/codereview
I was trying to connect to a hsql db. I created one by running from C:\myhsql: java -cp .;C:\hsql\lib\hsqldb.jar org.hsqldb.Server -database.0 file:db\mydb -dbname.0 MYDB This created mydb in a directory called db. This folder now has a .lck,tmp,script,properties files with name mydb, and similar files with name MYDB ...
stackexchange/codereview
i have an ie problem for some reason my tabbed menu shows the opposite way in ie than it should it should have tabs on the top right and tabs on the left side of the container but only in ie the tabs appear on the right hand side i cant seem to figure it out here is my html lists , some script and the css applied to ...
stackexchange/codereview
Used Version of NServiceBus: 2.0.0.1145 Question: Is it possible to configure a NServiceBus Host in such a way that, it consumes (subcribes to) his own published messages? Answer: It seems possible, but in the following Configuration it gives me a Transaction deadlocked Exception while trying to insert Subscriptions in...
stackexchange/codereview
I have the following JSON call, the data I'm passing seems to be getting stringify'ed properly from what i'm looking at, however, I don't seem to have the right syntax to process the parameter in the public web method. Here is the JSON call: <script type="text/javascript" language="javascript"> var qs = new Queryst...
stackexchange/codereview
I am a PHP programmer and got to know that for me Object oriented-ness, Strict type, and missing powerful array from PHP can be a big problem in Java. I tried to get code related to above question but no one works. My questions: How to traverse table in various way? Is there any good tutorial for me related to collec...
stackexchange/codereview
I have a bash script with a code like this: echo "EXECUTING TASK 1" sort -r scripts/sh/test-list | while read fn; do sh -vx scripts/sh/test-web-task.sh "$fn" done echo "EXECUTING TASK 2" sort -r scripts/sh/test-unit-list | while read fn; do sh -vx scripts/sh/test-unit-task.sh "$fn" done In test-web-tas...
stackexchange/codereview
e.g. i am getting data like "vivartvivartpandey" i want output like "vivartpandey" Only one thing is fixed that data will come either like string1+string1+string2 or like string1+string2 (no duplicate) but string1 and string2 both are variable. So How to identify string1 and remove duplicate string1?
stackexchange/codereview
I have a simple question regarding best practices in programming. I have a DB which contain members. After some processing I get a list of users who need to be disabled in DB. I have a stored procedure which takes UserId as Input and disable the user. Since I am sure that I always have to disable more than one user, I ...
stackexchange/codereview
what I want to achieve is a pretty common thing, but I want to use the Silverlight advantage to keep the UI-Behaviour in XAML. I want a Textbox which has an 'empty' state like this: [ Name ] (Name in gray font), and when the Textbox receives Focus, the Fontcolor is supposed to change to black and the Textbox is suppose...
stackexchange/codereview
CSQL is available for Linux. Is any has tried to install in Windows environment.
stackexchange/codereview
http://www.malsup.com/jquery/cycle/div.html this example works by switching the whole .slideshow.slide div, i want to keep switching this block like the example BUT i want to apply the switch effect (the fx) to images individually, how can i do that? like when i click on slide 2 the 3 images from the current slide get...
stackexchange/codereview
I am trying to debug a windows form application which has a large number of events: button presses, timers, etc.. Is there a way to catch every line of code being executed by the application without setting a break point? edit: The program was not written by me, so I am unfamiliar with the code. I wish to step through...
stackexchange/codereview
Greetings, I am relatively new to WPF and have an issue relating to validation with DataGrid control. I have read this article (http://msdn.microsoft.com/en-us/magazine/ff714593.aspx) which covers three different ways to validate, but none of them seem to address how to prevent setting a value or calling a undo/redo co...
stackexchange/codereview
In Xcode using LLVM 2.0, when I put the line using namespace std; in my C++ code, I get this warning: Semantic Issue Using directive refers to implicitly-defined namespace 'std' Is there a way to fix this? Why is it giving that warning?
stackexchange/codereview
An N-ary tree has N sub-nodes for each node. If the tree has M non-leaf nodes, How to find the no of leaf nodes?
stackexchange/codereview
I'm trying to automate assembly generation from netmodules. I tried to use "al.exe" tool with this commande line : al module1.netmodule module2.netmodule /target:library /out:assembly.dll. My problem is that my assembly does not embed my netmodules but only references them : - if I open my assembly with "ildasm.exe" t...
stackexchange/codereview
try { Runtime.getRuntime().exec("excel C:\\file.xls"); } catch (IOException ex) { System.out.println(ex); } Doesn't work. I have to put the full path of excel.exe in order to work. How can I make it generic (For any Excel Folders/Versions)? When I run the same line from OS with Windows Run (Start --> Run) it w...
stackexchange/codereview
I am new in PHP with classes. I am coding an network ip-mac-user logging system integrated with dhcp. I have users, subnets, units. I created classes for each and created parameters and functions to fill the parameters and some mysql codes about what they do. but there are relationships among these classes. where can I...
stackexchange/codereview
How to design a tableview similar contact application in iphone.........
stackexchange/codereview
I have embarked on a mission to start using jQuery and JavaScript properly. I'm sad to say that historically I have fallen into the class of developer that makes a lot of really terrible mistakes with jQuery (polluting the global namespace, not caching jQuery selectors, and much more fun stuff - some of which I'm sure ...
stackexchange/codereview
I have installed msysgit, and I am attempting to use it inside of Hudson. Whenever I run a command in an interactive shell, whether it be git-bash or a command prompt, the commands are instant. When I run them in Hudson, they lag for a very long time. Running /bin/git help took 63 seconds when I just invoked it. I've n...
stackexchange/codereview
My friend had a VB.NET project and lost the source. I decompiled project binaries and got it back. In the decompiled codes I saw some lines like image.Height = &H5DC. Apparently it is integer but I don't get it, what is "&H5DC"? Is it hexadecimal? How can I find out its actual integer value?
stackexchange/codereview
I have been merging PDFs using PDFTK with great success, the pages that are used to generate the pdf are set to 'click to show one page at a time' (basically the whole of the first page is displayed when the pdf opens, based on the height of the page). however the generated pdf defaults back to filling the reader based...
stackexchange/codereview
In IIS7, the processModel.idleTimeout property can be set in an application pool. A worker process will shut down after this specified period of inactivity. However, I use Application_Start to run a number of jobs. If there is no visitor to the website the jobs would be disposed and will not run on time. In IIS 7, the ...
stackexchange/codereview
I have 3 views in my application. My first view (FIRST_VIEW) has 2 buttons (BTN_2 and BTN_3). Each button will start seperate views, means BTN_2 causes to start SECOND_VIEW and BTN_3 will start THIRD_VIEW. In my FIRST_VIEW i have one onActivityResult() function. How can I set two onActivityResult() functions for each b...
stackexchange/codereview
In django admin I am using the textarea widget. When I save data, it is saved inside a <p></p> tag. I dont want this - any solutions, I just want to get the data out without being wrapped in a <p>. Any suggestions?
stackexchange/codereview
This snippet runs my slideshow, which consists of a series of images. At the top of the slideshow I have "image x of y". Is it possible to add a callback that is tied to each the prev and next buttons? One callback would add 1 to the x and the other subtract. So this is some form of pagination for which I could not fi...
stackexchange/codereview
I keep on copy-pasting the following in my programs. I'm wondering if anyone of you uses similar code, perhaps in a library to achieve the same. @Override public String toString() { String ret = prefix; boolean first = true; for (Component child : children) { if (!first) { ret += " " + ...
stackexchange/codereview
I have a litte radiobutton like this : <h:selectOneRadio value="#{test.answer}" valueChangeListener="#{TestService.changeanswer}" immediate="true" id="answer"> <f:selectItem itemValue="A" itemLabel="Absolutely True"/> <f:selectItem itemValue="B" itemLabel="True"/> <f:selectItem itemValue="C" itemLabel="Partially ...
stackexchange/codereview
I have XML below <node id="id1"/><node id="id2"/>... <edge id="eid1" fromId="id1" toId="id2"/> <edge id="eid2" fromId="id3" toId="id1"/> <edge id="eid3" fromId="id2" toId="id4"/> Now I need get all edge base on nodeId, nodeId = id1 -> eid1, eid2 nodeId = id2 -> eid1, eid3 nodeId = id3 -> eid2 nodeId = id5 -> Null ...
stackexchange/codereview
I am trying to choose 5 distinct brands from among the cars that belong to my users. My current attempt is below (no approach to selecting at random). @range = @user.cars.select('DISTINCT brand_id').limit(5) How might I select these five random distinct brands? Thank you very much.
stackexchange/codereview
I added my local server pblack as linked server in SQL Server 2008 R2 ---1) EXEC master.dbo.sp_addlinkedserver @server = N'pblack', --'pblack' is my localhost @srvproduct=N'SQL Server' and executed successfully 2) and 3): --2) sp_MSforeachtable @command1="EXEC sp_spaceused '?'" --3) S...
stackexchange/codereview
I currently use INT as type for primary key in JavaDB (Apache Derby), but since I'm implementing an distributed system I would like to change the type to java.util.UUID. A few questions about this: What datatype in JavaDB/Derby should I use for UUID? I have seen CHAR(16) FOR BIT DATA been mentioned but I don't know mu...
stackexchange/codereview
I run this code: public class User { public static void main(String args[]) { int array[] = new int[10]; int i = 1; try { System.out.println("try: " + i++); System.out.println(array[10]); System.out.println("try"); } catch (Exception e) { ...
stackexchange/codereview
I have a view assembling data from various tables: Create View Test_View As Select t1.Id as 'Id' ,t2.Flag as 'IsChecked' etc. In the previous versions of this table, that Flag value had the values 'Yes' and 'No', and now it has been changed to bools, like it should be. However, the application that...
stackexchange/codereview
I'm working with text files on Java. On Ubuntu 10. But, I'm having problems with path dir. Example: saveFile("textFile.txt","abc"); This abstract function basically put "abc" on "textFile.txt". I compile this file, and create a jar file (using NetBeans). When I run the app, and call saveFile("textFile.txt","abc"), text...
stackexchange/codereview
Is there an easy way to request that a GTK widget have a minimum width/height? I know you can do it on the column of a TreeView, but is it available for general widgets?
stackexchange/codereview
I'm trying to edit a piece of code written by a development company, which uses the following construct a lot: $dbcol = grabdata($strSqlB,'','','','','','',2); Is there really not an easier way to do this? The code is completely unreadable. I would have thought that the following would work, and work well for readabi...
stackexchange/codereview
If an existing compiled display list is to be recompiled, is it necessary to call glDeleteLists() and glGenLists() first? Or can the display list be recompiled by just calling glNewList() on the existing compiled display list ID?
stackexchange/codereview
I have a string of ascii characters, but I'd like to know how to echo that as shown on this site for example: http://binsearch.info/viewNFO.php?oid=50662038&server= I can convert it to png using some library I found but I can't figure out what header to use to echo it like that.
stackexchange/codereview
I need a way to know if a string is Base64 encoded... any idea ? thanks
stackexchange/codereview
We know that when a Form is visually inherited, all of its controls are locked in design time. This problem requires that we place event handlers in the base form. Now what should I do if I want to place base-control event handlers in the derived Form? Since the controls are locked, approach of double clicking on the c...
stackexchange/codereview
Possible Duplicate: Capitalize First Char of Each Word in a String Java I have a string "abc def ghi" , I want to make it as "Abc Def Ghi".Similarly I also have a string like "abc def" and I want to make it "Abc Def".In java how is it possible?
stackexchange/codereview
I need to establish a TCP connection with a remote machine, but before I do that, I need to detect, if the port is in use by another application (if there is already one connection on this port). In other words I want to ensure that only one application is using the same port a time. What is the way to do it in .NET?
stackexchange/codereview
I can't seem to get this function to delete all my files and folders in a specific directory can someone help me fix this problem? Here is my code. $apps = 9; $dirname = './members/' . $apps . '/'; function delete_directory($dirname) { if (is_dir($dirname)) $dir_handle = opendir($dirname); if (!$dir_handle)...
stackexchange/codereview
browser.execute("Function('" + parameter + "')"); I use swt to call a function like above. Using newlines crashed the java. I just found out using apostrophe crashes the browser. Is there a better way to do this? So I don't have to worry about handling these characters? For example: browser.executeFunction("Funct...
stackexchange/codereview
so I've installed red5 0.9, I've installed jdk 1.6 update 22. I've set my environment variables correctly, installed eclipse galileo for java ee developers, tortoise svn, and then ivyde and subclipse plugins for eclipse. I then created a folder called red5_server, and did the svn checkout. When I try to import the red5...
stackexchange/codereview
I have a multi thread application written by c#, my max thread number is 256 and this application gets the performance counters of the computers in an Ip interval(192.168.1.0 -192.168.205.255) it works fine and turns many times in a day. because I have to get reports. But the problem is some times one machine keeps a ...
stackexchange/codereview
I'm brand new to iPhone development (and first question posted here) and am sort of stuck with Core Data and Table Views. In short, my app is crashing when I delete a row from my UITableView due to NSFetchedResultsChangeUpdate being called on a record that has already been removed due to a cascade delete on a self refe...
stackexchange/codereview
Is there any way we can make a resizable widget in android according to the space in home screen? For example if the home screen empty, i can make my large widget. If there other icon, i want to resize my widget become smaller according to the space left in home screen. Thanks.
stackexchange/codereview
I'm working on a mobile website, but when I view the site on a phone, the website is automatically shrunk to a very small font and the user has to zoom in to read the text. How do I make it automatically display at the right size each time a user visits the site? Here's my CSS: .content { width:auto; height:auto; font-...
stackexchange/codereview
We have security in our firewall to prevent SQL-Injection from destroying any of our content: Name Type Context Severity Pattern Configure CS:select_into signature http-url critical .*\[select\].*\[into\].* Edit Remove CS:select_from signature http-url critical .*\[select\].*\[from\].* Edit Remove C...
stackexchange/codereview
I have been using rspec with webrat and decided to add cucumber for high level tests. After installing cucumber with capybara, for some reason rspec also switched to using it. Is there a way to tell rspec to continue using webrat ?
stackexchange/codereview
I try to run SOAP client in PHP to call rampart axis2/java. // Create message with request payload and options $reqMessage = new WSMessage($reqPayloadString, array("to" => "http://localhost:9090/axis2/services/SecureService", "action" => "http://php.rampart.apache.org")...
stackexchange/codereview
Say I had a an enum called Planets that contained VENUS, EARTH, and MARS. I will have a lot of array lists that will hold at most one of each type. I want to keep each array list sorted at all times in order from VENUS, EARTH, and MARS. Would I need to use a comparator for this? Is there a way to keep them sorted autom...
stackexchange/codereview
Given the following html: <ul id="search-results"> <li> <h3>Result 1</h3> <span class="some-info">Tag line</span> </li> <li> <h3>Result 2</h3> <span class="some-info">Another bit</span> </li> <li> <h3>Result 2</h3> <span class="some-info">Another bit</span>...
stackexchange/codereview
As described in OpenEJB docs, we can configure JMS connection factory and queues, and they will appear in JNDI as: openejb:Resource/MyJmsConnectionFactory, openejb:Resource/MyQueue Given those JNDI entries, how can I tell to MDB to use them? Is it possible to change JNDI name, for example ConnectionFactory to appear...
stackexchange/codereview
With respect to C# and .NET's System.Net.Sockets.Socket.AcceptAsync method, one would be required to handle a return value of "false" in order to handle the immediately available SocketAsyncEventArgs state from the synchronously processed connection. Microsoft provides examples (found on the System.Net.Sockets.SocketAs...
stackexchange/codereview
I have several routes defined in my Global.asax; When I'm on a page I need to figure out what is the route name of the current route, because route name drives my site menu. How can this be done?
stackexchange/codereview
I am new to programing and am having difficulties writing a program dealing with files. The program is to read a file, calculate an employees pay and an updated YTD pay total. After calculations the program will write to a new file. This is what I have so far: empName = "" prevYTD = 0.0 payRate = 0.0 hoursWorked = 0.0...
stackexchange/codereview
Would someone have a look at this and tell me what I am doing wrong? I am not getting anything back from this JQ function and the error div is empty. I'm really new to JQ so go real easy on me please. $(function() { $('#form').submit(function( ) { $(this).find('.error').hide(); try { $.ajax({ '...
stackexchange/codereview
Given this linq query from c in context.Customers from o in c.Orders where c.City == "MyCity" || o.ShipTo == "MyCity" select c the query will not return any rows if the customer's city is "MyCity" but does not have any orders. This is because of the implied inner join between Customers and Orders. How do I select cu...
stackexchange/codereview
I am using MS SQL 2008 to develop one system with Classic ASP. I want to show 3 Decimal Places the field Datatype is money. I got answer from this http://www.sqlusa.com/bestpractices2005/moneyformat/ . I use like this in my SQL Statement : CONVERT(VARCHAR, CAST(Sell_Price AS Decimal(19, 3))) AS Unit_Price Wh...
stackexchange/codereview