instruction_seed
stringlengths
1
35.8k
_source
stringclasses
1 value
The Html.LabelFor works fine, so why not Html.ValidationMessageFor? My partial view looks like; <%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<SHP.WebUI.Models.OtherLeaveViewModel>" %> <% var unique = DateTime.Now.Ticks.ToString(); %> <script language="javascript" type="text/javascript"> $(docum...
stackexchange/codereview
This question is actually two questions: How to use the gpgme library in Windows? Are there bindings for .NET available somewhere? (If not, I guess I can make my own.) EDIT: Solution found: gpgme-sharp works very nicely both in Linux and Windows. (For the latter, the only prerequisite is gpg4win which includes the gp...
stackexchange/codereview
I want to know when to use get and set methods(getName,setName ) in my class and when simple classVariable.name = "" instead а = classVariable.getName() Here is example of class using set and get methods public class ClassExampe { String name; String course; public String getName ( ) { return ...
stackexchange/codereview
I'm using OmniAuth + Devise to allow users to register using Facebook/Twitter/Gowalla/etc attached to normal user accounts. Now when a user logs in using any of these, or their account, all their social networks are attached in a authentications table. I need to be able to pull content from any of these providers, such...
stackexchange/codereview
I am getting the following error when trying to install gems: Mohammad-Azams-MacBook-Pro:awesomecats azamsharp$ sudo rake gems:install Password: (in /Projects/awesomecats) rake aborted! Don't know how to build task 'gems:install' (See full trace by running task with --trace) Mohammad-Azams-MacBook-Pro:awesomecats aza...
stackexchange/codereview
I've seen many tutorials, but none of them have worked in my case, I think it is because I'm using a .jar instead of an .class and in that .jar, I have more than just one Java class. Anyone knows how to solve this? code: http://dl.dropbox.com/u/1430071/code.txt
stackexchange/codereview
I have a Django model that looks something like this: class Person(models.Model): name = models.CharField(max_length=32) place = models.ForeignKey(Place, related_name='people') approved = models.BooleanField() objects = PersonManager() @models.permalink def get_absolute_url(self): retu...
stackexchange/codereview
I'm trying to parse a basic text file in PHP, but not sure where to begin. The file contains info such as: http://pastebin.com/ahqtJzH6 You'll notice that the information I need to capture is split up by new lines. Right now I'm just throwing every new line into a $applicant[] array, but I need to get rid of the preced...
stackexchange/codereview
$('.WallEntry').live('mouseover mouseout', function(event) { if (event.type == 'mouseover') { $(this).find('.delButton').css('visibility', 'visible'); }else{ $(this).find('.delButton').css('visibility', 'hidden'); } }); CSS: .WallEntry{ width: 300px; } HTML <div class='WallEntry'> Message: <br> Hi, have you been the...
stackexchange/codereview
I tried to write code that was a sample of the Boost test library: #include <boost/unit_test.hpp> BOOST_AUTO_TEST_CASE(test) { BOOST_CHECK(true); } I built the source code, and I got the execution file test.exe. I tried to execute that file, but I got an error message. The program can't start because boost_unit_...
stackexchange/codereview
I have a field which is varchar and contains numbers and dates as strings. I want to update all numbers in this field that is greater than 720. I have attempted firstly to do a select but I get this error: Conversion failed when converting the nvarchar value '16:00' to data type int. This is my query: select id, case(...
stackexchange/codereview
We were deploying our ASP.NET web app onto a new production server today. In our test server, the pages were working fine on both IE and Firefox. But now in the production server the main welcome page loads and to enter the application which has a submit/enter button in it does not work in IE and shows a page not foun...
stackexchange/codereview
I'm using Solr 1.4.1 and I'm willing to use TermsComponent for AutoComplete. The problem is, I can't get it to match strings with spaces in them. So to say, terms.fl=name&terms.lower=david&terms.prefix=david&terms.lower.incl=false&indent=true&wt=json matches all strings starting with "david" but if I change it to: term...
stackexchange/codereview
I have written a little extension method to add a value to the beginning of a List. Here is the code; public static class ExtensionMethods { public static void AddBeginning<T>(this List<T> item, T itemValue, ref List<T> currentList) { List<T> tempList = new List<T> {itemValue}; tempList.AddRange...
stackexchange/codereview
I am trying to build a Python .exe for Windows and am able to create it fine. However, when I run the application, I notice that it cannot perform all of its functions because not all the libraries were imported; PySNMP is not getting imported in specific. When I look at the output of the build process, I notice that P...
stackexchange/codereview
I am in an intermediate Java class at school at we have to come up with an end of the semester project that combines everything we have learned thus far (threads, networking, i/o, etc). My interest really lies with network security so I was thinking I could do some kind of app along those lines. My initial idea was a s...
stackexchange/codereview
Hi All I am verey new to SP2007. If I dont want to use AD as my source for user infomation how would I go about making a custom user database. Thank you
stackexchange/codereview
I'm working with an 8051 (Cypress FX2LP) that doesn't have jtag/bdm capability. Typically, developers on this project have been using ad-hoc serial printfs for debugging. I'm looking into options for serial debug monitors such as Keil's Mon51, Isd51 or IAR's generic ROM-monitor. I'll need to modify/configure this debu...
stackexchange/codereview
I am kind of embarrassed about this, and definitely I am just forgetting something simple. if this is body.java public class body{ public static void main(String args[]) { int i = 0; part aPart = new part(i); aPart.add(); } } and this is part.java public class part{ private int i; ...
stackexchange/codereview
I am trying to save few property into the plist when the user starts the app for the first time, and then I have to retrieve those data and show it to the user, when the user restart the app, so that I don't have to ask for the same data again. I am guessing this should be very straight forward, but may be I am missin...
stackexchange/codereview
I have got problem with overloaded operator+ and stream<<. I have class with overloaded operators: FuzzyNumber& FuzzyNumber::add(FuzzyNumber B) { FuzzyNumber fuzzyResult; fuzzyResult.setA(this -> getA() + B.getA() ); fuzzyResult.setB(this -> getB() + B.getB() ); fuzzyResult.setC(this -> getC() + B.getC...
stackexchange/codereview
I have two dictionaries a = {'home': {'name': 'Team1', 'score': 0}, 'away': {'name': 'Team2', 'score': 0}} b = {'home': {'name': 'Team1', 'score': 2}, 'away': {'name': 'Team2', 'score': 0}} The keys never change but I want to get that ['home']['score'] has changed Any easy way to do this?
stackexchange/codereview
Hi I'm trying to develop an Air app which includes downloading and playing youtube videos I have a tilelist of thumbnails and a player which plays the selected version The event is protected function videoList_clickHandler(event:MouseEvent):void { player.cueVideoById(videoList.selectedItem.actualID); } So...
stackexchange/codereview
I'm working on making a site fully functional under HTTPS. As part of this, I'd like to ensure we never "break the lock." That is, we should never load non-SSL content on an SSL page, which can trigger a warning or other indicator depending on the browser. To verify this is the case, I'd like to do two things: Writ...
stackexchange/codereview
I stay away from Application.DoEvents, since there is the issue of re-entrancy and there is always another way to avoid holding up the UI. I've long prefered to do background work in the Application.Idle event as a simple alternative to multi-threading. But, for long-running tasks, is it acceptable to run operations in...
stackexchange/codereview
I have a multitenancy application and I want a clustered index for the data to support fast range queries. If I design my clustered index like this: (SystemID, EntityID, IsHidden) SystemID is the unique identifier for the multitenancy instance, EntityID is an identity for the entity and IsHidden is a flag whether this...
stackexchange/codereview
I'm using the Continuous Integration Software "Hudson" to build Maven 2 projects. The Hudson server is deployed in a Tomcat running with the privileges of the "www-data" User on a Debian machine. When Hudson runs Maven to build a project then it complains that it can't write to the repository "/var/www/.m2". /var/www i...
stackexchange/codereview
I'm doing a online "creator" of a nice looking product comparison table using JS, HTML and CSS. Now a example table generated with this tool looks like this: And the style of this table comes from a style part of my HTML, it looks like this: <style> tr.numer1 { background-color: #FFFFFF; } tr.numer2 { background-c...
stackexchange/codereview
I'm using NetBeans to develop a simple image browser. I have the class ImageBrowser which extends JFrame (created it by right clicking the NetBeans project then New -> JFrame Form) and inside it is a JPanel and a JToolbar with JButtons generated as image thumbnails from a directory the user selects. Clicking an image t...
stackexchange/codereview
I am going through an old ASP.NET app and turning off ViewState for Gridviews where it's not needed. This is reducing the amount of information sent to the server on postback, but I am curious how much. In FireBug, I can go to the Net tab, apply the HTML filter, and expand the particular aspx file that got posted. Bene...
stackexchange/codereview
My app saves some files into its documents directory. I want to get these files back to my computer. How may I do that? I heard I can use iPhone Organizer for that?
stackexchange/codereview
I am trying to animate a UIView here. It looks like a rectangle, and I just want to translate it to my coordinations. So, how can I animate it? I tried to find some tutorials, but without success.
stackexchange/codereview
I'm not sure if anyone out here uses Jenzabar & ACE reporting, but the question is specific to that as far as I know. I'm building an ACE report and the menuopt file for it has to be modified to lookup values for a parameter based on several specific conditions. The portion of the menuopt file I have now is: LU7 = crs_...
stackexchange/codereview
I need System.Numerics in F# EDIT I think the question is can fsi run with the 4.0 runtime and if so how do I configure it I run "mono /bin/Fsi" in the Fsharp 4.0 dir I get the following error in both OSX 10.6.4 and Ubuntu 10.1. I am sure I am missing a path or something Please note the paths are different on the MAC b...
stackexchange/codereview
Does anyone know a 64 bit profiler JVisualVM exists or not for eclipse ? I have tried a lot to search for it on the net. Also please suggest if you know some really good profiler tools for eclipse .... Thanks....
stackexchange/codereview
I would like to have a simple query that I can run against a database to return abnoralities in the time threshold that users post to our forum. If I have the following database structure: ThreadId | UserId | PostAuthor | PostDate | 1 1000 Spammer 2010-11-14 02:52:50.093 2 1000 Spammer ...
stackexchange/codereview
How would someone do that? for example I do like: std::cout << "something"; then it should print the time before "something"
stackexchange/codereview
In Java the numeric types all descend from Number so I would use (x instanceof Number). What is the python equivalent?
stackexchange/codereview
I want to transform foreach to Linq foreach (var e in x.Root.Element("Body").Elements()) { Block b = new Block(); b.Text = e.Element("Text").Value; b.RadioButtons = e.Element("RadioButtons").Elements().Select(j => j.Value.ToString()).ToList(); m.BlockList.Add(b); } Can I place some code into Linq query?
stackexchange/codereview
I would like to use the ScrollToVerticalOffset method of a ScrollViewer to go to the top of the scrollviewer. But with a MVVM approch. I think I have to create a dependency property to take this behavior. EDIT : The behavior is : public class ScrollPositionBehavior : Behavior<FrameworkElement> { public double Pos...
stackexchange/codereview
I have following checkbox: <dxe:CheckEdit Margin="2,0" IsChecked="{Binding SelectedContact.isMajor,Mode=TwoWay,Converter={StaticResource CheckBoxNullToFalse}}">More than 18</dxe:CheckEdit> This is what i want to achieve: when the user clicks on the check box, i want to call a function but also assign the isMajor field...
stackexchange/codereview
Creating a layout in Java as the number of TableLayouts required is not known as designtime. I get an IllegalStateException telling me to remove the View (from it's current parent) before assigning it to another parent, when I call createPlayerTables() The exception is thrown at the first line in this loop, when I try...
stackexchange/codereview
The context: my Python code pass arrays of 2D vertices to OpenGL. I tested 2 approaches, one with ctypes, the other with struct, the latter being more than twice faster. from random import random points = [(random(), random()) for _ in xrange(1000)] from ctypes import c_float def array_ctypes(points): n = len(poin...
stackexchange/codereview
How would I go about switching the main display XAML page that gets used in an XBAP. The only different is I want a larger mode and a smaller mode, but with the same controls (some hidden).
stackexchange/codereview
Is there any cross platform and asynchronous FTP client library for C or C++? Thanks.
stackexchange/codereview
I have problems connecting to the report's database. In my log I see that an exception is thrown : "Log on failed". This is what I do: I am using a service that needs to massive generate reports. When opening the report with Crystal Reports everything is ok, but when using this service, it throws an exception saying l...
stackexchange/codereview
I am working on a .net website with only a single Javascript (so far). Because I have been told Single JS get best performance etc. firstly, any suggestions on JS frameworks , any cutting-edged articles? Secondly, I met some problems when I was trying to invoke JS function just for a child page. I tried something like ...
stackexchange/codereview
I am having an issue with my reportviewer where nothing is visible, not even the control. If I add other content, it shows, but the reportviewer is not. I am using the 9.0.0.0 version of the control with SSRS 2005 inside an MVC 2.0 application. I have built and deployed the report to the server. I have confirmed by...
stackexchange/codereview
I'm using output cache for a web site with login system. I have global pages which can be accessed by every user. These pages are cached and also use a master page. <%@ OutputCache Duration="3600" VaryByParam="none" VaryByCustom="userid" %> I'm storing user login details in a session. My global.asax file is here: publ...
stackexchange/codereview
I know a fair about about how amazingly scalable MongoDB is, particularly with its auto-sharding, and the ability to hot-add servers to a cluster. However, I haven't found much data about PostgreSQL's scalability. I know it has tablespaces, much like other RDBMSs. Can it auto-grow these (like sharding)? Or is it a manu...
stackexchange/codereview
i am developing game.i am displaying gun object center bottom of the screen.when user tap on screen i need to rotate gun that direction.i done rotating image.but when user tap on screen i need to rotate image that direction.can you please help me Thanks in advance Aswan
stackexchange/codereview
I am using Silverlight 4 and trying to share some common styles (colors, brushes). My take was to put them into a "Common.xaml" Resource Dictionary and then use it in all other Resource Dictionaries. Referencing everything like so: <Application xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmln...
stackexchange/codereview
i made a server via boost networking and its working good but when i store the clients connecting to it in a std::map, then loop all the map and receive from them it gives me segmentation fault, heres the backtrace (gdb): Program received signal SIGSEGV, Segmentation fault. boost::asio::basic_stream_socket<boost::asio:...
stackexchange/codereview
Can you point me in the right direction? I'm trying to get a loop to trigger while the form button is depressed. //pseudocode While (button1 is pressed) value1 += 1 And then of course stop looping when the button is released
stackexchange/codereview
What is the recommended use of ERb in Rails when it comes to <% %> (evaluate Ruby code), <% -%> (evaluate Ruby code, suppress the trailing newline) and <%- -%> (evaluate Ruby code, suppress the trailing newline and leading space)? It seems like <%- -%> would make the output HTML look nicest, but <% %> seems to be mostl...
stackexchange/codereview
Zend Test appears to rely upon Zend_Test_PHPUnit_DatabaseTestCase and Selenium appears to need PHPUnit_Extensions_SeleniumTestCase yet as far as I can tell PHP doesn't support multiple inheritance.
stackexchange/codereview
What is the most compact way to write 1,000,000 ints (0, 1, 2...) to file using Python without zipping etc? My answer is: 1,000,000 * 3 bytes using struct module, but it seems like interviewer expected another answer... Edit. Numbers from 1 to 1,000,000 in random order (so transform like 5, 6, 7 -> 5-7 can be applied i...
stackexchange/codereview
why does: select 1 - '+' - CONVERT(datetime,'01/01/2010',101) ...query returns a result, and: select 1 - CONVERT(datetime,'01/01/2010',101) - '+' ...gives an error ?
stackexchange/codereview
Need some help for combining some RewriteRule's and RewriteCond's together and preventing redirect loops. Case is to force all incoming requests to these patterns, to redirect to https:// with same pattern... http://www.domain.com/admin --> https://www.domain.com/admin http://www.domain.com/something/wp-login --> https...
stackexchange/codereview
I have code capturing mic input, and it works fine (I can playback, etc..). My question is, how can I tell how "loud" the input was at a given point, for example, if someone was whispering into the microphone or yelling? Can that be done with the current XNA audio API?
stackexchange/codereview
I need to know if there is a way to connect the camera of iPhone to mac. My aim is like to create a spying camera where iPhone will act as the spying device and we will see the view from its camera on mac screen.
stackexchange/codereview
How to run Excel macros from VS2010(C#)?I use Microsoft.Office.Interop.Excel namespace
stackexchange/codereview
I've found two tools which create "simlinks" within Windows XP (I know they're not real links, but so it goes). The problem is that neither of them create something which I can use with WAMP. Because I'll often want to link into a repository, I'll often want to keep the www folder contain mostly simlinks. I'd like to...
stackexchange/codereview
I'm trying to set up multiple dialogs in the same page, trying to open only the one next to the opener es. <ul> <li class="dialog"> <a class="opener" href="#">1</a> <div class="modal" title="Title for 1">Content for 1</div> </li> <li class="dialog"> <a class="opener" href="#">2</a> <div class...
stackexchange/codereview
This started off as the question: Almost every time when I use the Erlang shell, I'd like to run some command on shell startup, e.g. something like rr("*.hrl"). Or similar. Currently I have to type it every time I start a Erlang shell and I'm getting tired of it and forget it all the time. But this was actually the w...
stackexchange/codereview
I'm my class i've added a an instance of my view controller, created a property and then synthesized it in my implementation file. I am trying to update the UIlabel in the view controller like this, NSString *currentChar = [[NSString alloc] initWithFormat:@"%c", ch]; viewController.outputLabel.text = currentChar; [curr...
stackexchange/codereview
I'm parsing an xml content from web service,it creates a problem when parsing the content with Brown Men’sHockey “Grows for Movember”,when I parse like this by using DOM parses it results Brown Men after the hexadecimal code,the parse is not accepting remaining characters,here the code to parse NodeList items = elt.g...
stackexchange/codereview
I have a table view, with an added headerview created in IB to display some text above the table (couldn't post the screenshot- http://i51.tinypic.com/2przbl5.jpg). I would like to load the text above the table based on my plist and I am using objectforkey to load the text. However when I connect the outlets in IB the ...
stackexchange/codereview
Every night when we run our batch jobs, passenger becomes unresponsive to http requests from customers. After a period of time it starts working again. There are no errors in the rails log, actually I dont see any logging at all during the hung time. In the Apache access log we see all the requests returning 500 errors...
stackexchange/codereview
i am using magento 1.3.1. While making payment with credit card I am getting a javascript alert called "undefined".I am using ANZ as payment gateway.The money is getting deducted.but not getting reflected in admin panel also.Interestingly when i am using paypal for payment it is working perfectly. Please can you tell ...
stackexchange/codereview
Just came across the Doctrine Project which has an Object Relational Mapper and a DB Abstraction Layer. What does Doctrine provide that other PHP abstraction layers don't? And what practical use can you put the ORM to, apart from fetching objects via queries written in Doctrine Query Language? Is the query language rea...
stackexchange/codereview
I'm not a C++ programmer, so I need some help with arrays. I need to assign an array of chars to some structure, e.g. struct myStructure { char message[4096]; }; string myStr = "hello"; // I need to create {'h', 'e', 'l', 'l', 'o'} char hello[4096]; hello[4096] = 0; memcpy(hello, myStr.c_str(), myStr.size()); mySt...
stackexchange/codereview
I want to develop composite control where some of the work would be executed on client side. For that I am implementing IScriptControl. ScriptReference points to a script file with client object. Let's say I want it to have Listview(html select) control that onselect will run javascript function based on the select...
stackexchange/codereview
I'm working on a large PHP code base; I'd like to separate the PHP code from the HTML and JavaScript. (I need to do several automatic search-and-replaces on the PHP code, and different ones on the HTML, and different on the JS). Is there a good parser engine that could separate out the PHP for me? I could do this usi...
stackexchange/codereview
I have a file(.txt) which contains: [0 1,1 1,3 2,4 1] I want to read the file in this way: 0 1 /n 1 1 /n 3 2 /n 4 1 /n I have problem how to eliminate brackets and separate each line by comma. Thanks for your suggestions :)
stackexchange/codereview
Say I have some simple class and once it's instantiated as an object I want to be able to serialize its contents to a file, and retrieve it by loading that file at some later time... I'm not sure where to start here, what do I need to do to serialize this object to a file? public class SimpleClass { public string na...
stackexchange/codereview
I tested the next code using Frame but when I'm trying to paint standalone line without any borders, buttons and etc I found that program works without any errors and don't show any line. There is code: package helloworld; import java.awt.*; class Line extends Component { public void paint(Graphics g) { g...
stackexchange/codereview
How I should make sure that classes needed as a one of params to my templated class will have a certain interface? I know that one way is to make in Interface class pure virtual but I would like to avoid it. Is there any other way to do it? I would like to avoid anything which isn't standard //Example templa...
stackexchange/codereview
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As EventArgs) Handles Button1.Click Dim LoginChecker As New SqlDataSource() LoginChecker.ConnectionString = ConfigurationManager.ConnectionStrings("A1ConnectionString1").ToString() LoginChecker.SelectCommandType = SqlDataSourceCommandType.Text ...
stackexchange/codereview
I need to place a button tag inside a SVG canvas, is there a way? (I'm using raphael JS) I know I can 'draw' a button inside the svg canvas and code the onclick event but I want to preserve the native look and feel of the browser buttons. Thank you.
stackexchange/codereview
I trying to train haar cascade classificator for card suite detection (which no rotation and has no distortion on image) For example I have file Clubs.png which contents clubs image on white background 20x20 pixels This tutorial is so tangled http://note.sonots.com/SciSoftware/haartraining.html My image varies only in ...
stackexchange/codereview
I've been trying to figure out how to stop this slider on a site I'm working on: [link omitted] from loading while the page is loading and pushing all the content down. I have tried to implement Jerph's answer as in this post: Hide jQuery Accordion while loading but unsuccessfully can anyone shed some light on this iss...
stackexchange/codereview
We have a single table that we want to break up into a tree of tables based upon a particular source column. I wanted to try using a multi-column insert, but it seems that if I insert a blob into a sub table, I wind up with a foreign key constraint violation. I don't think this violates the rules about multi-table ins...
stackexchange/codereview
I have data in this format: 1. New York Times - USA 2. Guardian - UK Der Spiegel - Germany 3. Le Monde - France Dagen - Denmark (12.6.2002) Norga-i-Dag (2) - Norway I want to end up with newspaper values of: New York Times Guardian Der Spiegel Le Monde Dagen Norga-i-Dag ...
stackexchange/codereview
I have a database design that holds data about houses. There are 2 (relevant) tables - one holds property code, name, description etc, and the second holds information about attributes of the property. Currently I have got columns in the property table (MaxDoubles, MaxSingles etc) that hold denormalised data that I ...
stackexchange/codereview
I am working on a portal wich is hosted in Sharepoint 2007. I need to come up with a widget that will display certain messages. The widget to be visible from all pages of the portal. I would like something like the StackOverflow has for notifications of your score/badges with displaying it up on top of every page. Is ...
stackexchange/codereview
I have a ListGrid with ListGridRecords where I am trying to display the straight xml output from a call I'm doing on the backend. Here's an example: lgr.setAttribute("XML", "<xml><response>Bob</response></xml>"); However, when it goes to display the contents of lgr in the ListGrid, it doesn't display it. (i.e. it...
stackexchange/codereview
I have a function like this, that I would like to refactor function Myfunction(sUrl, sFile: String) : Boolean; var GetData : TFileStream; begin Result := False; //if the line below fails, I get an unhandled exception GetData := TFileStream.Create(sFile, fmOpenWrite or fmCreate); ...
stackexchange/codereview
How do you tell if a product page is set up as a bundle in Magento 1.4? I can't find a way to do it.
stackexchange/codereview
FROM THIS: Hotel Type Room Guest From To ------------------------- ------ ---- ----------------------------------------- --------- --------- University Inn & Suites Double 101 George Brown 11-SEP-10 14-SEP-10 Uni...
stackexchange/codereview
On some questions here on SOverflow I found THIS. But it says that it is not avaiable at the moment and probably it will never get avaiable. Based on THIS I realised that there is no need on building my own SMS service. So the question: My java application has to send SMS messages to users and receive SMS messages from...
stackexchange/codereview
hi i have audio recording in my i use mediarecorder class for recding audio but i have out of memory exception when i reach 2 m , that my limit. i given my code below. time private static void audiorecding() { if (audio_recding_stop_flag == 0) { audio_recding_stop_flag = 1; recorder.sto...
stackexchange/codereview
I needed to test a mobile application that runs on Windows CE .NET Emulator. I'm using Microsoft Visual C# .NET 2003. When I run the application, on some point this message appears Error Message: An unheadled exception of type 'System.IO.DirectoryNotFoundException' occurred in mscorlib.dll The application has a set pat...
stackexchange/codereview
I'm trying to get the name of the Python script that is currently running. I have a script called foo.py and I'd like to do something like this in order to get the script name: print(Scriptname)
stackexchange/codereview
How do i use integer values array in Mysql Stored procedure ?
stackexchange/codereview
I am running a website, and there is a scoring system that gives you points for the number of times you play a game. It uses hashing to prove the integrity of http request for scoring so users cannot change anything, however as I feared might happen, someone figured out that they didn't need to change it, they just nee...
stackexchange/codereview
I am trying to debug (using gdb) a multi-threaded program, which uses POSIX threads. I am getting message like : Reading symbols from /lib/libpthread.so.0...(no debugging symbols found)...done. looks like the library is not compiled with -g option. Where can I find this library ? I tried to find it on web but I a...
stackexchange/codereview
In C#, is it possible to perform a sum of two 32-bit integers without using things like if..else, loops etc? That is, can it be done using only the bitwise operations OR (|), AND (&), XOR (^), NOT (!), shift left (<<) and shift right (>>)?
stackexchange/codereview
I found some code as follows: UIGraphicsBeginImageContext(CGSizeMake(320, 480)); // This is where we resize captured image [(UIImage *)[info objectForKey:UIImagePickerControllerOriginalImage] drawInRect:CGRectMake(0, 0, 320, 480)]; // And add the watermark on top of it [[UIImage imageNamed:@"Watermark.png"] drawAtPoin...
stackexchange/codereview
In Django Admin interface, Whenever there is a change in a specific field of a Model, I just need to ask the confirmation using JS. I found that {{ onclick_attrib }} can achieve this. Can you please suggest from where we can pass this value? Is there any doc available?
stackexchange/codereview