instruction_seed
stringlengths
1
35.8k
_source
stringclasses
1 value
It's the first time I'm using DBus so please bear with me. This is my code: import gobject import pprint gobject.threads_init() from dbus import glib glib.init_threads() import dbus bus = dbus.SessionBus() remote_object = bus.get_object("org.freedesktop.UDisks", # Connection name "/org...
stackexchange/codereview
I want to use google/yahoo ids to be used to login to my website. As its done in stackoverflow. Can any one provide me a starting point.
stackexchange/codereview
I'm searching for a good vertical bubble marquee plugin. Not simple vertical marquee, I'm looking for a good "flash like" effects plugin, something smooth with element marquee from bottom to top of a div content. Could be really nice but I think it's only in my dreams this plugin
stackexchange/codereview
I have Windows XP, Apache, PHP 5.3 and ffmpeg working fine. I need to convert flv to avi or vice versa without using the exec() command. Is this possible? Thank you. edit : i hope someone could edit the ffmpeg source and implement an exec function into the php extension so we could just add the parameters to a functio...
stackexchange/codereview
We're currently using geokit to determine our users' countries of origin, but we're concerned about the volumens of queries we're going to generate. Since most of our visitors are one-offs, just caching the results isn't sufficient; we need something with its own look-up table. Is there a freely available database we...
stackexchange/codereview
I used to use datasets instead of sqldatareaders and I used to be able to do something like this If dataset.tables(0).Rows(0)(1).ToString()) = "N" Then lbl.Text = dataset.tables(0).Rows(0)(2).ToString()) Else 'Do Nothing End If This obviously doesn't work with sqldatareaders. I have code to see if the SQLDatare...
stackexchange/codereview
It's been quite some time now that I've been coding in C++ and I think most who actually code in C++, would agree that one of the most trickiest decisions is to choose from an almost dizzying number of string types available. I mostly prefer ATL Cstring for its ease of use and features, but would like a comparative stu...
stackexchange/codereview
Why does round() do a better job than the printf type of string formatting? ruby-1.9.2-p0 > "%.0f" % 14.5 => "14" ruby-1.9.2-p0 > "%.0f" % 14.5000001 => "15" ruby-1.9.2-p0 > 14.5.round => 15
stackexchange/codereview
I have a table that looks something like this. EDIT - I re-extracted code. I think the question makes more sense now. (Answers may not) <div class="view view-latest-news-view view-id-latest_news_view view-display-id-latest_news_block_1 view-dom-id-1"> <div class="views-admin-links views-hide"> </div> <div...
stackexchange/codereview
How can I clean a gwt CellList ?
stackexchange/codereview
The man pages for select() do not list EAGAIN as possible error code for the select() function. Can anyone explain in which cases the select() can produce EAGAIN error? If I understand select_tut man page, EAGAIN can be produced by sending a signal to the process which is blocked waiting on blocked select(). Is this co...
stackexchange/codereview
I'm making a small Chrome extension and would like to keep its data online. I need a free and very small(<1MB per user) cloud hosting provider that has painless authentication. Ideally, I'd just like a Google API that does localStorage, but in the cloud and different for each username.
stackexchange/codereview
Do I have to manually edit the Azure connection strings myself to switch between production and development, or is there something comparable to the Transformation Visual Studio applies to Web.Config?
stackexchange/codereview
How do I pass kilogram, gram to a kilogram converter and obtain the result in grams (e.g. 5 kg 500 grams = 5500 grams) How to do this using javax.measure.* Refer over here Note: I need the solution only based on the above packages and not some generic solution
stackexchange/codereview
How can I use import fl.data.DataProvider; in Adobe CS4. When I try to import it showing 1172: Definition fl.controls could not be found.
stackexchange/codereview
In my application, I have a list box(list of stores), Add and Remove buttons and another list box (selected stores). I have Following requirements: 1. On click of Add button, copy selected items from the master stores list to the selected store list and clear the selection from master store list. 2. On Click of Remove ...
stackexchange/codereview
I want to keep the tables but use css to achieve the same positioning result with a strict doctype. This is the design that does exactly what I need. Notice the <br> tags in the last (bottom) <td> cell. As this area grows, the position of the data within two other <td> cells above it do not change position. <table cell...
stackexchange/codereview
Here is the relevant HTML: <div class="row"> <div class="arrow box">&#9668;</div>Month Year<div class="dayMonth box"></div>&#9658;<div class="arrow box"></div> </div> Here is the css which the .html file that the above HTML is in links to: * { margin: 0; padding: 0; } body { font-fami...
stackexchange/codereview
Hai Freinds, I had parsed the image from the url, and displayed in the webview, when i am displayed it in webview, a few images were streched, so i displayed the image with the help of Imageview, but the problem is the Images are not displayed in Imageview when they Color format is CMYK format, so pls tell...
stackexchange/codereview
I want to attach a JQuery function to an input field in an update form. The form is standard ActiveScaffold, opened by clicking on the Edit link in the list view. How do I register the function -- what event signals that the subform has been opened and the DOM is ready? A new page has not been loaded so the onload() fu...
stackexchange/codereview
in most IDEs and editors there's no consensus as to how to ident the @Override. and it's not covered in the coding style for java http://www.oracle.com/technetwork/java/codeconvtoc-136057.html i use exclusively vim and it creates a new indentation level. So i'm inclined to think that the correct is @Override public boo...
stackexchange/codereview
How do I build it? The documentation is really shady about this. It says you need to place scons.py into the directory, but I have no idea where this is. I have tried using the included prebuild, but it did not produce any .lib files.
stackexchange/codereview
I am using Hudson-yammer plugin for sending notification on yammer & Uses following jar Hudson jar = hudson-core-1.384.jar Stapler jar = stapler1.87 Jar Hudson-yammer plugin = http://code.google.com/p/hudson-yammer/ Exception in thread "main" java.lang.NoClassDefFoundError: org/kohsuke/stapler/StaplerFallback at ja...
stackexchange/codereview
This is similar to, but not a dupe of, this question - however, where it sought information on manually joining a server to a domain (and was rightly redirected) I am looking for help with some code that programmatically joins a machine to a domain. The scenario is that we have a launcher service that instantiates Amaz...
stackexchange/codereview
I have got a model Pupil, which has got field score. I need to make a list with strange rule: order by score (DESC) but (!) all scores that more than 100 should ordered as zero: Pupil.all( :order => 'score DESC' ...?) 100 86 34 21 6 3 1 0 143 125 354 0 456 0 0 I can order it using ruby, but I need sql Aslo I can creat...
stackexchange/codereview
So, I have been working on re-factoring some legacy code recently and have found myself questioning the validity of some of the re-factoring decisions I have been making. One such query has been about the use of instance variables for object sharing between methods within an object. Specifically, there are a number of...
stackexchange/codereview
I have a string array and I need to use the first string in the string array which is not null. Lets consider this code snippet - string[] strDesc = new string[] {"", "", "test"}; foreach (var Desc in strDesc) { if (!string.IsNullOrEmpty(Desc)) { txtbox.Text = Desc; break; ...
stackexchange/codereview
I have a history table containing a snapshot of each time a record is changed. I'm trying to return a certain history row with the original captured date. I am currently using this at the moment: select s.Description, h.CaptureDate OriginalCaptureDate from HistoryStock s left join ( select ...
stackexchange/codereview
Here is the html and internal javascript <script type="text/javascript" src="JS/jquery-1.3.2.min.js"></script> <script src="JS/jquery.jqEasyCharCounter.min.js" type="text/javascript"></script> <script type="text/javascript"> $(document).ready(function() { $("textarea").click(function () { var code = $("textarea#s...
stackexchange/codereview
Can anyone let me know how can I read pixels from buffer in JOGL. Please illustrate with a code.
stackexchange/codereview
I am using JQuery on my Wordpress installation using wp_enqueue_script() so that other plugins can find it easily and do not try to add another installation. My JQuery includes became old and I am thinking of updating it. I can change the code and mention newer installation but I want a proper way of doing it, so that...
stackexchange/codereview
I have a sqlite database with a table full of geographic locations, each stored as a latitude and longitude value in degrees. I wanted to be able to perform a SQL SELECT on this table and ORDER BY each row’s distance from an arbitrary point. I’ve achieved this by using the defined custom sqlite function (distanceFunc) ...
stackexchange/codereview
In http://microformats.org/wiki/hreview-aggregate it says: rating. required. fixed point integer [1.0-5.0], with optional alternate worst (default:1.0) and/or best (default:5.0), also fixed point integers, and explicit average. What is a fixed point integer? Maybe that means integer? Why is 1.0 or 2.5 or 5.0 also c...
stackexchange/codereview
Our project has hundreds of comments within XML files. Some of these are just dividers like this: <!-- ============================================================================================== Entity Manager Bean =========================================================================================...
stackexchange/codereview
I've been trying to use Apache Sling's Scala 2.8 Script Engine recently updated last month. I came from using Scala 2.7 along with Sling's Scala 2.7 Script Engine and that worked great. I run into a problem when I try to use the new implementation. When calling ScalaScriptEngine's eval function I always receive an "...
stackexchange/codereview
Is it possible to trigger a hardware event from a service? At the very least, I'm hoping to emulate trackball movements and clicking events such that an active app will process them normally. Many thanks.
stackexchange/codereview
Does anyone have a clue what could be causing this? 11-16 16:23:26.745: ERROR/AndroidRuntime(9549): Uncaught handler: thread main exiting due to uncaught exception 11-16 16:23:26.765: ERROR/AndroidRuntime(9549): java.lang.NullPointerException 11-16 16:23:26.765: ERROR/AndroidRuntime(9549): at android.view.ViewGroup...
stackexchange/codereview
Hi I am using expandable list view in my layout which contain list of fitness activities i have done on that particular day. I can see all the list of activities when i initially open my Activity. But when i add new activities, i can not see new activities in my expandable list view. How can i see my new activities whe...
stackexchange/codereview
need high quality datagrid with: pagination CRUD - adding/deleting/updating rows by users other nice options such as filters, optionmenu, toolbar, etc. there seems to be several very good options in Javascript (Ext-jS, several Jquery plugins/widgets (JQGrid, Datatables, at least 6 more good open source components...)...
stackexchange/codereview
can anyone tell me why these aren't being calculated correctly. I'm trying to add 1 second to the time and it seems to be adding 60 milliseconds when I apply formatting? import java.text.* import java.util.* import groovy.time.TimeCategory def xmlSlurper = new groovy.util.XmlSlurper() // Get th...
stackexchange/codereview
Good morning everyone, I hope I'm not posting this in the wrong place; I've been programming web projects, mostly in MVC and ASP.NET for consulting companies, but I always pick-up unfinished projects, so I gotta say, my experience in web development isn't as good as I'd like it to be. To improve my experience, I decide...
stackexchange/codereview
Writing a file utility to strip out all non-ASCII characters from files. I have this Regex: Regex rgx = new Regex(@"[^\u0000-\u007F]"); Which works fine. But unfortunatly, I've discovered some silly people use right angles (¬) as delimiters in their files, so these get stripped out as well, but I need those! I'm prett...
stackexchange/codereview
Edited for clarity: I have a GUI that controls a script that generates approximately 40 plots. I want to display any given plot in the GUI window on demand by selecting its number in a drop-down box. The problem is that the plots take a while to generate so I would rather make them once and then load them as needed int...
stackexchange/codereview
I consider myself fairly competent in understanding and manipulating C-ish languages; it's not a problem for me to come up with an algorithm and implement it in any C-ish language. I have tremendous difficulty writing SQL (in my specific case, MySQL) queries. For very simple queries, it isn't a problem, but for comple...
stackexchange/codereview
I have a well populated Object which has properties like color,size,weight etc. I need to get these object properties and place them in a TextBox. So i want to do something like `textBox.getLine1.setText(Object.getColor()); textBox.getLine2.setText(Object.getWeight());` That is i need a textBox in which i can ...
stackexchange/codereview
I'm currently trying to create an email form with Wordpress. I've gotten the form to function correctly, however I want to make it FadeOut when the email is successfully sent, but not when the email doesn't (e.g., when a field is left blank, etc). You can see for yourself here. Also below are the codes: http://www.matt...
stackexchange/codereview
The user types some text. When they press a button, what they have typed is split up and colour coded: colors.setCharacterAttributes(characters, tokens[x].length(), formatBlue, true); Using a set of rules. When they make an edit between the position as defined by characters and the position characters + tokens[x].len...
stackexchange/codereview
I'm trying to make a bitmap rotate and point towards the mouse but I get strange results: Video: http://www.truploader.com/view/993341 The mouse isn't visible it does rotate, however it doesn't rotate to the tip of the mouse point. Code: /** * Rotates the object based on a point */ public void setRotatio...
stackexchange/codereview
I'm a CS major in university working on a programming project for my Calc III course involving singular-value decomposition. The idea is basically to convert an image of m x n dimensions into an m x n matrix wherein each element is a tuple representing the color channels (r, g, b) of the pixel at point (m, n). I'm usin...
stackexchange/codereview
I need to build an application which accept a file posed from the client and process it and return the information to the client. If doing using asp.net mvc structure, where to get started?
stackexchange/codereview
ScottGu mentioned that we should be able to load a Razor view from a database (check the comments section), so does anybody have an example on how to do that? Thanks.
stackexchange/codereview
I'm quite pretty new to the concept of CVS. However, I want to start using CVS and thus need to 'check-in' some scripts. I'm using a UNIX server and I know that CVS is installed, since doing a cvs -v Gives me the correct version number installed. Now the problem I have in is finding documentation to use CVS. Is there...
stackexchange/codereview
I've read in Robert Martin's "Clean Code" that in the 80's Emacs was already capable of recording and playing back your coding session. I just realised how much I'd learn from that practice, I'd love to profile myself! However I really don't think it'd be very effective to record the screen (as in video) especially bec...
stackexchange/codereview
Is it normal to have a table with about 40-50 columns in database?
stackexchange/codereview
I'm looking for some examples of how and when smart people do a Unicode comparison of strings, versus the framework default. Since many people don't work with strings from other cultures, here are a few interesting comparison examples I found. .ToUpper() The lowercase Turkish 'i' converts to an uppercase İ (U+0130...
stackexchange/codereview
I have translations enabled for page and profile (I am using the Content Profile module). When I give authenticated users the 'translate content' permission, they get a Translate tab on their profile, but they see the "Translate" tab on all pages as well. Users need to be able to create a translated version of their pr...
stackexchange/codereview
I have a class to be saved into appengine datastore, which among others contains, a Text field (String-like appengine datatype, but not limited to 500 chars). Also a twin class which is basically the same, but is used on the client side (ie without any com.google.appengine.api.datastore.* import). Is there any datatyp...
stackexchange/codereview
Suppose I have the following DIV <div id="myDiv" style="display:none" title=""></div> I have an ajax call that append HTML markup to this div using $("#myDiv").html('').html(response); I would like to append hidden content to the main div before the response content so the result would be <div id="myDiv" style="dis...
stackexchange/codereview
Can someone give me an example of an example of a class hierarchy relevant to computer science? In my lectures I've seen some simple examples like: Vehicle Construction Heavy Machinery Crane Grader Back-hoe Haulage Semi-trailer Flatbed Passenger Commercial Bus Fire-truck Limousine Police-motorcycle Per...
stackexchange/codereview
Is there a detailed tutorial on how to make a custom router authentication page for retail routers. I work in a small office and clients come and go and like to connect to our Wi-Fi with their laptops on a daily basis. Rather than giving them the 128-bit WPA password, I would like a single redirect page where they need...
stackexchange/codereview
If I have a base class: class Base { public: virtual void Test()=0; }; and, in a dynamically loaded module (.so/.dll), I implemented a class derived from this: class SomethingFromBase : Base { ... }; and, the user, once this library is loaded, asks to create an instance of SomethingFromBase (let's say we get the na...
stackexchange/codereview
My application is built on 2.2, but it is backwards compatible down to 1.6. I've used reflection for the newer methods. When I try to run it on an emulator in Eclipse, it only lists my 2.2 AVDs. I need to test on 1.6 to ensure compatibility. I've tried building with Android 2.2 and with Google APIs 2.2 with no luck. ...
stackexchange/codereview
I am trying to get an ID from a url parameter inside an href that looks like this: <a href="http://www.mysite.com/myitem.php?id=71312">MyItemName</a> I want the 71312 only and at the momment I am trying to do it using regex (but if you have a better approch I would be glad to try): string html,itemID; ...
stackexchange/codereview
So I have a boosted queue class that helps multi-threading described here. In my class declarations I have //... struct VideoSample { const unsigned char * buffer; int len; }; ConcurrentQueue<VideoSample * > VideoSamples; //... struct AudioSample { const unsigned char * buff...
stackexchange/codereview
I've created a WebAPI that returns JSON. The initial data is as follow (UTF-8 encoded): @text="Rosenborg har ikke h\xC3\xB8rt hva Steffen" Then with a .to_json on my object, here is what is sent by the API (I think it is ISO-8859-1 encoding) : "text":"Rosenborg har ikke h\ufffd\ufffdrt hva Steffen" I'm using HTTParty...
stackexchange/codereview
Is there a way to add undo and redo capabilities in Tkinter Entry widgets or must I use single line Text widgets for this type of functionality? If the latter, are there any tips I should follow when configuring a Text widget to act as an Entry widget? Some features that might need tweaking include trapping the Retur...
stackexchange/codereview
We have a ssrs report viewer inside a jquery dialog. It works fine until you load a report which drills through to another report using jump to report navigation. When you click on the link to drill through we get the following message and the report fails to load. ActionType = ActionParam = Parameter name: ActionType ...
stackexchange/codereview
ARGH! What's wrong with this?? $(document).ready(function() { var monkeyTrouble = $('#monkeyTrouble').attr('rel'); if (monkeyTrouble = "banana") { alert("oooh oooh ahh ahhh"); } });
stackexchange/codereview
in my project, I am calling webservice with http get request. API key is also there in http get parameter. in j2me devices before connecting to the internet it is showing the URL and asking for permission to user.Here user can easily see my api key. and i don't want to store api key in my application also.because using...
stackexchange/codereview
Because of memory constraint i am trying to build a grails app with smaller memory footprint. I build the war with this argument "--nojars". I created a war file without all the jar and when i deploy within the glassfish i encounter this error Exception while loading the app : java.lang.Exception: java.lang.IllegalStat...
stackexchange/codereview
What are current pixel limits on bitmaps in Flash?
stackexchange/codereview
I am new so I may not explain the situation well. Please let me know if you need more info. I am trying to implement a listview like this: [textview][button][checkbox] [textview][button][checkbox] [textview][button][checkbox] [textview][button][checkbox] I want other checkbox unchecked automatically when I clic...
stackexchange/codereview
I've an application which I want to display logs (using log4net) on windows form richtextbox. I'm getting the log message from log4net but i could not be able to display it on the box while the GUI is responsive. any help?
stackexchange/codereview
My security knowledge is kind of limited but I might learn something.I´m planning to create an ajax application where I encrypt/decrypt passwords client-side with a typed master password using a javascript AES library and then send/retrieve the encrypted data to/from Google App Engine(user authenticated). I actually f...
stackexchange/codereview
I just created a new WCF Service Application project in VS2010 (Premium), and it works out-of-the-box, but when I opened up the web.config file there are no endpoints present. The application works fine and I can open the address (http://localhost:50639/Service1.svc?wsdl) in a browser and I can see the contract and it ...
stackexchange/codereview
So created a Sprite to which I add other Sprites which are game tiles. Each tile is 60 x 60 px big. In result I've the Sprite with about 200 childs (those tiles). When I try to startDrag() the container sprite the lag when moving it is very noticeable.. Is there a way like to join the tile Sprites so the container woul...
stackexchange/codereview
I am currently using this Javascript keypress code to fire events upon keypress: $(document).keydown(function(e) { switch(e.keyCode) { case 39: e.preventDefault(); alert("Arrow Key"); break; case 37: e.preventDefault(); alert("Arrow Key"); } }); but what I am w...
stackexchange/codereview
On button click, I want to hide the div. How do i do it? <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Docu...
stackexchange/codereview
I have the following Java Server Faces 2.0 composite component. Notice i am using verbatim resources/customer/customer.xhtml <composite:interface> <composite:attribute name="id" required="false"/> <composite:attribute name="firstName" required="false"/> <composite:attribute name="lastName" required="false"...
stackexchange/codereview
I have 2 table. First table, APPTMT QNo, TrackNo, TmStamp 01, 1, 09/30/2010 02, 2, 09/30/2010 01, 2, 10/01/2010 02, 4, 10/01/2010 01, 1, 10/02/2010 02, 3, 10/02/2010 Second Table, VISIT QueueNo, TrackNo, TmStamp, Details 01, 1, 09/30/2010, No remarks 02, ...
stackexchange/codereview
Argument 'address' is the string "CepVizyonVersionFile", and after Connector.openDataInputStream(address) the program throws an exception with message: no ' : ' in URL. What format should address be in? public void saveLocal(String fileString, String address) { try { DataOutputStream fos = Connec...
stackexchange/codereview
I have a script with a line: ruby /root/backup_scripts/new_scripts/aapxen01.rb>>/volumes/backups/aapxen01/$date.log 2>&1 This produces a log file named ".log", obviously not what I'm looking for. How do I do it to produce the current date as the filename?
stackexchange/codereview
On the code above, we: 1) Click on Categoria A and then, 2) click on one of the bold titles that appear. You will notice that, while expanding instead of the movement to be smooth, it jumps near the end of the show process. (It seems that when it finds a <p> he jumps); What could be the cause of such a behavior? Here...
stackexchange/codereview
I have just started evaluating whether or not I should be using OData influenced wcf data services or a standard WCF service application as the primary data source for Silverlight applications. I would like your thoughts on which is a better way under what situation/circumstance. What is lighter over the wire, easier t...
stackexchange/codereview
I'm trying to find out about a Facebook user's interests based on pages they like, etc. It would be useful to have the list of possible page categories. I have made a rough list based on the dropdown menus from the page creation form, but the values in this are slightly different to those returned by the Graph API (e.g...
stackexchange/codereview
I have a vb.net that interacts with Lotus Notes; however, I have a problem when I make a NotesSession. Every time I try to make a notesSession, I get an error because it can't find the notes.ini. If I put the notes.ini file in C:\Program Files\lotus\notes my app will work, but I can't have it there I need it to be on m...
stackexchange/codereview
I know this question has been asked a thousand time, but I have yet to come across a definitive answer. How does an application (external website, so no fbml) post to a users wall, using JS and Graph API? I have established extended permissions with users, and can post to walls using Facebooks sample code, however the ...
stackexchange/codereview
I need to create diagram showing the most time consuming tasks when a specific page gets loaded. Well, Firebug has this nice feature to show you all loading times of files in the network section or if i can use the profiler alternatively (console). Now i am looking for the easiest way to get a diagram (pie chart) from ...
stackexchange/codereview
Is it possible to use a webcam in the place of the iPhone's built-in camera within the iPhone Simulator?
stackexchange/codereview
When I run video on my android emulator, it's volume is slow. So anybody have ans for that. So please give me hint. Thanks in advance, Prashant
stackexchange/codereview
What does the "self organizing" in "self organizing Scrum team" mean?
stackexchange/codereview
I would like to know how to capture data(media) from an infinite input stream(eg. internet radio) and play it on the android device.Most of the tutorials i have gone through, tell me to use the MediaPlayer class. But the problem is that i want to capture that raw data in a byte array and then play it from that byte arr...
stackexchange/codereview
this was supposed to be a simple script import shutil files = os.listdir("C:\\") for efile in files: shutil.copy(efile, "D:\\") It worked fine, until i tried it on a pc with files named with unicode characters! python just converted these characters into question marks "????" when getting the list from os.listdir...
stackexchange/codereview
I am trying to implement an authentication system for 2 different sets of users in Django. A student(using his username & password), A developer (using his email & password). Currently I have a (common) UserProfile model which will be shared by Student, Developer. Here is my models code: class UserProfile(models.Model)...
stackexchange/codereview
Can I conditionally include javascript file and css files. <xbl:script src="/apps/xforms-sandbox/samples/myfile.js" /> Can this be done conditionally?
stackexchange/codereview
I currently have the following MacPorts installed: ImageMagick @6.6.4-9_0+q16 ImageMagick @6.6.5-0_0+q16 (active) How do I set 6.6.4 as active?
stackexchange/codereview
What are the best practices for setting up projects with multiple interfaces in asp.net MVC2? I'm starting a project where we need a typical arrangement like: example.com/ - end-user interface example.com/Admin/ - site management The site will be involved enough that simply having all the user logic in HomeController ...
stackexchange/codereview
I'm not quite sure how this works yet... trying to find documentation. In my existing app I've got two different ways of rendering strings in my View <%: model.something %> <!-- or --> <%= model.something %> The first one is html encoded, and the second one is not. Is there something similarly short in Razor? All I c...
stackexchange/codereview
Help please. How can I format the DateTime column in SQLServer 2005 to store the following format: (mm/dd/yyy HH:MM:SS AM/PM) Below is my code: private void UpdateRecord(string status, int approvalid, DateTime modifiedDate) { SqlConnection conn = new SqlConnection(_strConn); SqlCommand cmd =...
stackexchange/codereview
I need to pass an event as a parameter to a function. Is there a way of doing this? The reason is that I have a sequence of two lines of code that is littered all over my program, where I dynamically remove the handler to an event, and then set the handler again. I'm doing this for several different events and event ha...
stackexchange/codereview