instruction_seed
stringlengths
1
35.8k
_source
stringclasses
1 value
I want to lock a file for writing from a Windows Service, but so far my attempts to obtain a lock are not working. The same code works from a Console Application, though. From what I've read, this is because opportunistic locking is not enabled for my service. How can I prevent a file from being written to by locking i...
stackexchange/codereview
I am creating a Java Swing application that displays an HTML page through a JEditorPane object. When the html page is displayed the layout content is different from original layout. Moreover the quality of the images displayed is very poor, although the original images have a good resolution. Are ways to tackle this di...
stackexchange/codereview
I'm in the early stages of a web project that will involved a very large (5000+) set of categories, sub-categories & sub-sub-categories that need to be loaded into a html form. I'm considering storing the data in an XML file and then using jQuery to load into the form, and only grab the sub-categories when requested (a...
stackexchange/codereview
I would like to recreate a page like this: http://irrland.sonntagskunst.de but in jQuery. Are there any jQuery plugins out there that do this? (The above link is written using prototype). Thanks.
stackexchange/codereview
I am looking to parse a token file that looks something like the one below to grab the token name/value pair. The token/value/nesting relationships are already defined, so i cant change the way the token files are made. It would seem that a context free grammar might be the best way to go, but i've no experience writin...
stackexchange/codereview
I am looking for an algorithm (or the name of the algorithm) that will find a point on a line-segment, if such a point exists, that is some given distance away from another point that not on the line-segment. i.e., There exist, three points A, B, C; and possibly a fourth D. Where AB makes up a line-segment, and point C...
stackexchange/codereview
here is recursive code for finding maximum subvector sum #include <iostream> using namespace std; int Max(int a,int b,int c){ return max(a,std::max(b,c)); } int a[]={31,-41,59,26,-53,58,97,-93,-23,84}; int n=sizeof(a)/sizeof(int); int maximum3(int l,int u){ if (l>u) return 0; if (l==u) return std...
stackexchange/codereview
<div class="generic_layout_container layout_ride_ridespec"> </div> How to programmicaly add an extra class or one more property with existing class to above div. I would like out put as follows <div class="generic_layout_container layout_ride_ridespec example_class"> </div> Please excuse id/name solution, there is li...
stackexchange/codereview
I'm wondering what are some strategies that you've come up when dealing with this. I'm new to the python/django framework and would like to separate the serving of view from the handling of ajax requests (xhr). I'm thinking of having a separate file xhrHandler.py and route specific POST/GET requests to /xhr/methodname ...
stackexchange/codereview
i would like to shorten www.site.com/product/info/laptop to www.site.com/laptop I used RewriteRule ^(.+)$ /product/info/$1 but i get 500 Internal Server Error when i try, RewriteRule ^([a-zA-Z0-9_\s\'~%,:!?()_=&-]+)$ /product/info/$1 it works but i want to support the period as well, so when I include . RewriteRule...
stackexchange/codereview
I want to add connection string to connect to mysql that are define in web.config file and access the same connection in my C# code how can I do this? Here is my code sample that run after onclick of a button to connect to database. protected void Button2_Click(object sender, EventArgs e) { String a = DropD...
stackexchange/codereview
I get junk characters instead of UTF‐8–encoded Unicode characters on the screen when I connect to my server from Windows 7 machine. I use Secure CRT and Putty. English text has no issues. I will like to know if it is possible to display and sort those words (Indian Language) My Server is Red Hat Enterprise Linux Serv...
stackexchange/codereview
I'm coding a library from scratch and was wondering if one already exists. I need to perform the following operations: - Read all sheets from all excel files in a specified folder and place them in a data set (each sheet from each file in a different data table. And each excel sheet in a different data set) - A quick...
stackexchange/codereview
I'm new to c#. I have this class... using System; using System.Data; using System.Configuration; using System.Linq; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.HtmlControls; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Xml.Linq; publ...
stackexchange/codereview
I've a silverlight control I am instantiating like so: <MyControls:SomeControl DataContext="{Binding}" /> In the codebehind of this file, how can I get access to this datacontext? this.DataContext is equal to null. Edit (more info): I am building an extension for an existing silverlight application. My point where I i...
stackexchange/codereview
This is not a technical question but law related. I started developing a Delphi Application which implements a UI similar to Google Chrome: Now I want to add a menu in the white space in left top corner (but not like of Microsoft Office UI) Can I develop and deploy my Application like this? It is not UI like Office b...
stackexchange/codereview
I'm green behind the ears, but had a basic question about modifying the scaffolding's :notice to add a variable. For example, rails created the following create method for me: def create @order = Order.new(params[:order]) respond_to do |format| if @order.save format.html { redirect_to(@order, :n...
stackexchange/codereview
I want to know what way is more efficient. No global variables, passing variables through parameters, having all methods static No global variables, having only main method static and creating class object in main to access methods Use only global variables, having only main method static and creating class object in ...
stackexchange/codereview
I'm branding a new Sharepoint 2010 public facing website. In this website I want to use shadows and rounded corners around several containers. I first tried to do it myself, but a colleague of mine told me about CSS3Pie (http://css3pie.com), which works really nice. The problem I'm experiencing is specifying the path o...
stackexchange/codereview
i have line highlighting set in my .vimrc: if v:version > 700 set cursorline hi CursorLine ctermbg = Red guibg = #F5FBF6 endif and line numbers on. Background and foreground of line numbers is set to: highlight LineNr term=bold cterm=NONE ctermfg=DarkGrey ctermbg=NONE gui=NONE guifg=Black guibg=#589A5D Current line...
stackexchange/codereview
I'm new in MIPS language and I don't understand how the functions (procedures) in the MIPS assembly language work. Here are but I will specify my problem : What does: jal jr $ra mean in mips language and the important thing How can we use them when we want to create a function or (procedure)?
stackexchange/codereview
I have a question for you: i have an application where some apks could be downloaded and installed. I launch installation in this way: Intent myIntent = new Intent(); myIntent.setAction(android.content.Intent.ACTION_VIEW); myIntent.setDataAndType(Uri.parse("file://" + getFilesDir()...
stackexchange/codereview
Ok I have a method that kicks off an object that deasl with data - a kind of factory. The factory splits data and sends the data that is split to custom objects that further process/refine the data. My problem is I log errors with an object that basically just appends the strings together into a log of error. Some err...
stackexchange/codereview
I need to iterate over a vector from the end to the beginning. The "correct" way is for(std::vector<SomeT>::reverse_iterator rit = v.rbegin(); rit != v.rend(); ++rit) { //do Something } When //do Something involves knowing the actual index, then some calculations need to be done with rit to obtain it, like index =...
stackexchange/codereview
Hello I'd like to block some websites directly from the command prompt. echo like this: 0.0.0.0 websitename.com How can I do this? (OS: Windows 7)
stackexchange/codereview
I try to use the code below to show table structure in a HTML page: <HTML> <HEAD> <TITLE>PHP + Firebird / Interbase test (connection)</TITLE> </HEAD> <BODY> <H3>FB Connect test.</H3> <?php // DB definition of account define("DBNAME","xx.xxx.xx.xxx:D:\DATABASE\OCS DATA.FDB"); // data bsse name define("DBUSER","USER"); /...
stackexchange/codereview
I am developing an iPhone app for jailbroken devices, and I need root privileges. Is there documentation for making my app run as root?
stackexchange/codereview
in my application i have a activity which opens ontop of the current activity when i press the menu button. In this overlay i want my views to fade in when the activity appears and fade them out again before it closes. Here is my code: public class OverlayActivity extends Activity { TextView t; @Override protected voi...
stackexchange/codereview
In the code below, persist() returns w/o an exception but the entity is not stored in the database. @RequestMapping(method = RequestMethod.POST) public String form() { EntityManager em = this.emf.createEntityManager(); TaxRates t = new TaxRates(); t.setCountry("US"); // set more proper...
stackexchange/codereview
I am working on a project that involves a usb device, through which we will receive ip packets from a remote pc. We assign the remote pc its IP Address. I have been experimenting with sending raw ip packets via several methods: 1 - raw sockets: ping works fine, problems sending tcp 2 - tun/tap W32: I managed to get thi...
stackexchange/codereview
I'm new to programming so forgive my simple questions. Basically, I have two different tables containing data related to one another. I'd like to create a new column called "id" which will associate rows in both tables so that I can appropriately display the data. When a user takes an action, a row is inserted into bot...
stackexchange/codereview
I have created a stored procedure in SQL Server Management Studio as described in the MSDN documentation: http://msdn.microsoft.com/en-us/library/ms345415.aspx but when I try to add a SP as query to a table adapter in the DataSet Designer, via the TableAdapter Query Configuration Wizard and selecting the Use Existing S...
stackexchange/codereview
Is there any specific tool to generate UML class diagram for the whole java project. i tried with ObjectAid UML plugin and generated a UML class diagram. I need to generate class diagram for all the classes by selecting the project src folder. Is there anyway to generate it? Thanks.
stackexchange/codereview
I'm developing a Asp.net server control (inherited from DataBoundControl) and I have just one button inside it for now which is created in CreateChildControls override. Even though this button have Click event assigned in rendered page the button don't have onclick event with __doPostback or something similar. Am I mis...
stackexchange/codereview
friends please guide me how to run my java application on a non java enabled mobile phones. i want to add a feature to my application that if mobile phone is not java enabled then automatically before installing java application KVM should b installed on the device to run my application. thanks in advance please help ...
stackexchange/codereview
Possible Duplicates: What ORM frameworks for .NET Do You Like Best? Best way to access a SQL Server database using C# .Net Hello, Can someone recommend a good O/R mapper for SQL Server 2008/.NET ? I am looking for it to also support stored procs not just tables. Thank you!
stackexchange/codereview
I have a User class that has a property called Creator which is of type User (the user who created this user) public class User { public User() { UserName = ""; EmailAddress = ""; } public String UserName { get; set; } public String EmailAddress { get; set; } //bunch of other p...
stackexchange/codereview
I've been trying to figure out how to browse the root of the server using the Tortoise svn 'Repo browser'. When I go to the root, it doesn't list any folders, and I just get a message, OPTIONS of 'http://example.com:8443':200 OK (http://example.com:8443) Rather than a full list of the folders on the server. I've had ...
stackexchange/codereview
I have a datagrid that displays a list of orders. Above the datagrid, there is a box that filters the orders by capturing the text input and then calling a server side method to get orders matching the supplied text. This works fine on the page. I've tried adding a page that passes in parameters via querystring tha...
stackexchange/codereview
I am looking out for some piece of javascript which can implement ShuttleBox kind of functionality. Basically I need to provide 2 list box and 4 buttons - Move Left, Move Right, Move All to Left and Move All to Right. But I want to implement this piece of code dynamic so that it can be reused by just passing dom object...
stackexchange/codereview
I am trying to set up a MPI Cluster. But I have the problem that the number of CPUs added to the mpd.conf file is not correctly used. I have three Ubuntu servers. opteron with 48 Cores calc1 with 8 Cores calc2 with 8 Cores. My mpd.hosts looks like: opteron:46 calc1:6 calc2:6 After booting (mpdboot -n 3 -f mpd.hosts) th...
stackexchange/codereview
Xcode rebuild entirely my project when I can a single file. Node: the file I'm changing is not the .pch file. this is happening to me after the installation of Xcode 3.2.4 with SDK 4.x.
stackexchange/codereview
At work we're discussing whether or not to implement a message queue for our PHP application. Currently we're looking at Apache's ActiveMQ. One thing we're not entirely clear on is whether or not it's possible to trigger a process based on a message arriving in a queue. The literature we've found so far seems to indica...
stackexchange/codereview
I send formula information in the excel file to j2me application with data in those cells.Now, i want to read the formula information ie, expression, and then evaluate the expression. for example : i have 3 Cells in my excel sheet. Cell A1 = 1 Cell B1 = 2 Cell C1=(A1+B1) now i will send Cell Address and cell Value and...
stackexchange/codereview
Is there any method available in JS SDK to do so? I would like to make the users 'like' my app. automatically, so i can send PMs later
stackexchange/codereview
How do you convert a favicon.ico to a regular web-accessible graphics - gif, png, or jpg using PHP or C/C++/CGI? Are there methods that do not require ImageMagick?
stackexchange/codereview
In delphi XE I can use the start procedure, but this method does not exist in delphi 2007. This sample code works ok in delphi xe, using Start MyThread:=TMyThread.Create(True); MyThread.FreeOnTerminate :=True; MyThread.Property1:=900; MyThread.Property2:=2; MyThread.Start; but in delphi 2007 the start procedure doe...
stackexchange/codereview
I am dealing with a very strange situation that has to do with the Warning: Cannot use a scalar value as an array and memory leak. The script is very simple and I can not figure out the problem. Code $variants=array(); if($text) { $v=explode(",",$text); if(is_array($v) && siz...
stackexchange/codereview
I know that you can use the indent command to beautify c code. I want to do the same thing with php but the command is giving errors (it is intended for c only I believe) is there a standard way to formatt php code with a command? I would be open to either a unix command that comes with OS X or a VIM command.
stackexchange/codereview
How to display the text of a textfield in a url section in android? Here is the code final Text q = (Text) findViewById(R.id.q); Intent i = new Intent("android.intent.action.VIEW", Uri.parse("http://www.google.com/search?q=")); startActivity(i); i want to use as query this (Text) findViewById(R.id.q); . How??
stackexchange/codereview
What am I doing wrong here or what am I not doing? (I am using this code in a .NET 4.0 WCF Service) private static ICacheManager GetCacheManager() { try { return CacheFactory.GetCacheManager(); } catch (SynchronizationLockException ex) {...
stackexchange/codereview
I am creating an editor in java using JEditorPane. I have managed to create functionality for find function using Highlighters. I want to add replace functionality to it.. thnx.
stackexchange/codereview
For example, let's take StackOverFlow's question tags. Would you store those separately in their own table with a many-to-many table linking questions and tags? Or is it best to store them as a coma-delimited list in the row of the question? Now assume the same scenario for a DVDs or games... I'm not sure how to go abo...
stackexchange/codereview
I´m running this code to scale and move an image in animation. It works perfectly the first run, but the next time I run this code the image does not animate. I´ve put NSLog statements before and after the transforms to see if the image is affected. See the results below the code -(void)animateShowImage:(UIButton *)but...
stackexchange/codereview
I have a web app which allows the user to upload files and then view them in the browser. This is done by displaying them in-line with an IFrame. This works fine for all file types (e.g. .doc, .xls, .pdf) except Office 2007 formats .docx and .xlsx, which are launching the application in a new window. I'm using these va...
stackexchange/codereview
This applies to Mac, but it may also apply to Linux, so I've tagged it as such. I'm recursing through a directory and getting a tree, with filesystem attributes. I then recurse again (and again, and again) each time the window comes back into focus. When I read the directory, I'm looking for any files that got modifie...
stackexchange/codereview
The set cover optimization problem is: given a universe U and a set S of subsets of U (i.e. S \subsetof 2^U), find the minimal subset C of S such that the union of its elements is U. Known to be NP-hard. The variation I am interested in is, given the same things (U and S), find the minimal subset C of S such that C is ...
stackexchange/codereview
In a C++ application I'm coding, I need to solve a system of non-linear equations (N equations, N unknowns). The systems I'm solving will be rather small (up to 10 equations/unknowns), so performance is not going to be a real issue. I've searched the web a bit for a non-linear solver library, and I couldn't get to some...
stackexchange/codereview
I have the following HTML: <div class="pane"> <h3> <input type=hidden id="comm_id" value="{$comment.id}"> <label id="comm_name" onclick="this.style.display='none';document.getElementById('comm_name_edit_view').style.display='';document.getElementById('comm_name_edit').value=this.innerHTML;">{$comment.writer_name}<...
stackexchange/codereview
I have a subdirectory (http://example.com/forum) I want to 301-redirect to a new subdomain at htttp://forum.exampple.com. How can I set up a redirect using Web.config and IIS rewrite to send all requests to http://example.com/forum/* to htttp://forum.exampple.com? Thanks!
stackexchange/codereview
I am using the manifest file for creating broadcast receiver, for ACTION_HEADSET_PLUG. But I can't get the broadcast when headset is connect/disconnect, Which permission should I use inside the manifest file in order to be able to receive ACTION_HEADSET_PLUG broadcast intent?
stackexchange/codereview
I am designing an application using sockets to connect to each other over the network. Now to test these modules I have to run both of them on separate computers. I want to test them on two laptops. Can I run them on separate laptops connected with just a normal crossover cable or do I need a more conventional network ...
stackexchange/codereview
I have a string that I use for client side validation: private const String regex = @"^(?:\b(?:\d{5}(?:\s*-\s*\d{5})?|([A-Z]{2})\d{3}(?:\s*-\s*\1\d{3})?)(?:,\s*)?)+$"; I use this string in my [RegularExpression(regex, ErrorMessage = "invalid")] attribute. I know that the /i flag for a Javascript regex is used to mak...
stackexchange/codereview
does anyone have "dasBlog" or "BlogEngine.Net" running on discountAsp.net without problems ? I have some Problems and searched here, wrote support tickets, googling with bing and trying so many things but nothing makes me 100% happy. iam getting "Object moved to here" on both blog engines and other things. On BlogEngin...
stackexchange/codereview
I am pretty new to tomcat6 application deployment. I am trying to deploy my helloworld severlet on tomcat6. But whenrver I use servlet url as http://192.168.2.10:8080/hello/HelloWorldExample2 , I am getting following error : HTTP Status 404 - /hello/HelloWorldExample2 type Status report message /hello/HelloWorldExample...
stackexchange/codereview
I am using the Twitter widget from Twitter itself. You can download it at http://twitter.com/about/resources/widgets/widget_profile Now i get this code: <script src="http://widgets.twimg.com/j/2/widget.js"></script> <script> new TWTR.Widget({ version: 2, type: 'profile', rpp: 4, interval: 6000, width: 180, ...
stackexchange/codereview
I'm implementing a simple LIKE search on my Django website and what I currently use is the following code: from django.db.models import Q posts = Post.objects.filter(Q(title__icontains=query)|Q(content__icontains=query)) Where query is a string. This results in a LIKE SQL statement and works quite okay. Now I'd also l...
stackexchange/codereview
I'm trying to update a folder and I get the following message in TortoiseSVN: Error at entry 2 in entries file for PathToFile: Bogus Date Is there a way I can fix this through TortoiseSVN? Thanks
stackexchange/codereview
I am using django-mailer for sending emails. I have cron job running to send mails from the queue every minute. I use GMail's SMTP server to send mails. django-mailer will send mails one by one. The issue is each e-mail is taking 3-5 seconds to be sent. Is there anyway to send these emails in parallel? My requirement i...
stackexchange/codereview
Can someone suggest some good image processing library in C/c++ that can work easily in Visual studio .I need to do some 3-D modeling and Image reconstruction (would involve lot of pixel value access).I am looking for something that has a good documentation/online support apart from given functionality. I am currently ...
stackexchange/codereview
I just upgraded to ActiveSupport 3 and lost all my string methods like "camelize", "titleize", and the like. It broke things all over my project, and so far I've fixed them by re-writing those methods myself, but there has to be a better way. I do realize that it's probably a good thing that ActiveSupport no longer mon...
stackexchange/codereview
Is their a general rule on what values to specify for the maximum depth and capacity of leaves when constructing an Octree? Right now I am specifying these values experimentally, which seems a bit haphazard.
stackexchange/codereview
I've been building an app locally and all the mailers used the URL 0.0.0.0:3000 which is what I wanted... Now I just pushed to heroku, and the URLs didn't update to the product mailer URL. Did I set this up correctly? /config/environments/production.rb config.action_mailer.default_url_options = { :host => 'mynewap...
stackexchange/codereview
Currently most of the development in the company I work for is controlled via VSS. I've installed Team Foundation Server for the development at our site. There is a future project that will involve new developement, but referencing older code bases hosted in VSS. My preference would be to use TFS for the new develo...
stackexchange/codereview
I was browsing over some code in the OpenCV page when it came to accessing Pixel Data IplImage* img=cvCreateImage(cvSize(640,480),IPL_DEPTH_32F,3); CvScalar s; s=cvGet2D(img,i,j); // get the (i,j) pixel value printf("B=%f, G=%f, R=%f\n",s.val[0],s.val[1],s.val[2]); s.val[0]=111; s.val[1]=111; s.val[2]=111; cvSet2D(img,...
stackexchange/codereview
I am a c#/asp.net developer and I am having to work on a VB/asp.net. I started out with VB.NET but after years away from it I'm getting confused with the syntax. I have two variables Dim originalDate as DateTime? Dim newDate as DateTime? Both nullable datetimes, originalDate is a nullable date I am getting from th...
stackexchange/codereview
I am trying to program a feature, similar to that of CamTwist, with which a video file (on hard disk) can be broadcasted to other applications as video input. However, I am not sure where to begin..googling did not help much either. a little guidance could be useful. :)
stackexchange/codereview
Im getting the following Access violation at address 00404340 in module 'test.exe'. Read of address FFFFFFD5 with the following code var List: TStrings; In the Create Section: List:= TStringList.Create; Adding to the list: Result := List.AddObject('hi', aCreatedObject); MessageDlg(FunctionHookList.Objects[Result].Cla...
stackexchange/codereview
I want to be able to take two RGB-256 vectors and calculate the result of their mixture. Also I want to be able to give each vector a different weight. I've experimented with it using the Word color plate, and I've seen that while some colors do mix according to a weighted average: 0.5*red(255,0,0) + 0.5*yellow(255,255...
stackexchange/codereview
I am using ServiceMix 4, and am trying to modify the cxf-jaxrs demo. The following is my pom.xml http://maven.apache.org/maven-v4_0_0.xsd"> <!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional...
stackexchange/codereview
Basically, how can I encrypt in javascript in CBC/PKCS7 so I can decrypt in php or .NET? I've tried slowAES but the cyphered output text doesn't seem to be correct. I've compared slowAES and .NET encryption and given the same byte array inputs (key, iv and message) to both, slowAES returns a different byte array output...
stackexchange/codereview
i wrote code to display any type of file like pdf,svg,etc.But unfortunately my code is working with only pdf.the code is like this -(void)drawRect : (CGRect)rect { CGPDFPageRef myPage; NSString * pathToPdfDoc = [[NSBundle mainBundle] pathForResource:@ "pdfdoc" ofType:@ "pdf"]; NSURL * pdfUrl = [NSURL fileURLWithPath:pa...
stackexchange/codereview
Situation: I got news. NEws are posted in multiple categories. Issue: How to store relations between news and categories? Should I create three tables (news, categories, news_categories)? Is this the best method possible? Let's see examples: I want to query database for latest news, so I need to: 1. query for the news ...
stackexchange/codereview
I have a BOOL in my core data. I want the value to be null unless i set it to either YES, or NO. Is it possible to do this? in my code how can i check to see if the value has not been set yet or not? In my nsmanagedObject i use NSNumber for my BOOL, in my core data mdoel i have BOOL.
stackexchange/codereview
The following code works on buttons and other things that have no default action, but on a <a href='URL'> it doesn't wait for the confirm dialog... any thoughts on how I should accomplish this without breaking the pre-existing functionality? jQuery('.confirm').bind('click', function (e) { jConfirm(jQuery(e.target)....
stackexchange/codereview
I just wrote up this test to see if I was crazy... using System; using System.Collections.Generic; using System.Linq; using System.Text; using HtmlAgilityPack; namespace HtmlAgilityPackFormBug { class Program { static void Main(string[] args) { var doc = new HtmlDocument(); ...
stackexchange/codereview
I have not been able to find an easy guide for securing a Ruby on Rails app against a Firesheep. In case you don't know, Firesheep jacks session cookies if your app doesn't force SSL and set the secure flag in the cookie. I had to do some searching to find these two things, so I thought I'd post what I found here and s...
stackexchange/codereview
I'm currently developing an iPhone application and part of it has a custom keyboard which pops up, this currently consists of UIViewController (1) UIButton (to activate keyboard) UIView -- 10 x Input buttons (part of the keyboard) When the app starts I set the UIView to be out of view, and when the button (1) is cli...
stackexchange/codereview
I've build a ASP.NET MVC 3 (RC at the moment) site that uses OpenID login system. I was still learning about OpenID while implementing this so I commented the code heavily. The result is a site that let's users login/register with OpenID, add other OpenIDs to their account and also remove them. This little project can ...
stackexchange/codereview
I have a Settings.cs class that exposes some Static properties. Those properties are read-only. This class reside in a seperate DLL than the website. On the application start, I need to initialize the Settings.cs class and populate the Static properties with values. This shall be done once per Application Start. I am h...
stackexchange/codereview
Possible Duplicate: Why can templates only be implemented in the header file? Hello. I have a stupid program in c++ consisting in a header file with a class using template and a cpp file with implementations of methods. This is the header: namespace SynQueueing { template < class T, unsigned long SIZE = 0 > cla...
stackexchange/codereview
Does somebody know how the Google logo can be hidden on a MKMapView? I don't want to hide it. I want the opposite. The reason is that a app got rejected because of 8.6 Google Maps and Google Earth images obtained via the Google Maps API can be used within an application if all brand features of the original content re...
stackexchange/codereview
here my code- <asp:BoundField DataField="DayOfTheWeek" HeaderText="Day" ItemStyle-CssClass="Itemstyle"/> from my collection entity I am getting DayOfTheWeek like 1,2...7. 1 for monday , 2 for tuesday like that. Where should I place condition so that in grid view it would display day name rather than corresponding code...
stackexchange/codereview
Does anyone happen to know of an article that explains what each ref in facebook's querystring means? I've dug all over the place and can't find it. <3 Facebook documentation /sarcasm Thanks!
stackexchange/codereview
We just ran into a problem with our cloud host - they've changed their apache settings to force a much shorter page timeout, and now during certain processes (report creation, etc.) that take more than 15 seconds (which the client is fine with; we're processing huge amounts of data) we get an error: The proxy server re...
stackexchange/codereview
I have a software library and I used to create .a files, so that people can install them and link against them: g++ foo.o -L/path/to -llibrary But now I often encounter third-party libraries where only .so files are available (instead of .a), and you just link against them without the -l switch, e.g. g++ foo.o /path/to...
stackexchange/codereview
If I have a table in .aspx <table id="table" > <tr id="first" runat="server"> blablabla> <td></td> </tr> <tr id="second" runat="server"> <td></td> </tr> </table> How can I change order from second to first in the code behind? I tried to wrap tr with placeholders and hide/display them accordin...
stackexchange/codereview
I'm trying to validate my form before submitting it. I'm trying it with this code below, but it always submit the form values: $('#gestione_profilo').submit(function () { $("#gestione_profilo").validate({ rules: { 'person_data[document_number]': "required" }, messages: { ...
stackexchange/codereview
Assume a model class Foo(models.Model): bar = models.CommaSeparatedIntegerField('Filter Me!') The content of the bar could look like, e.g., 12,35,67,142. I want to query all Foos, that have a 42 in bar: all_42_foos = Foo.objects.filter(bar__contains="42") which doesn't give the correct result, since CommaSeparate...
stackexchange/codereview
i am developing checkers application for Android. I have drawn on Canvas gameboard and tiles for each side, also I have made selection of tiles by D-Pad. But what about, Android phone doesn't have D-Pad? There must be a way how to do that in touch (I touch a tile - it is selected now). Do you have any ideas? Thanks ima...
stackexchange/codereview