instruction_seed
stringlengths
1
35.8k
_source
stringclasses
1 value
In my map I have: Component( x => x.ExposureKey, m => { m.Map(x => x.AsOfDate).Not.Nullable(); m.Map(x => x.ExposureId).Length(30).Not.Nullable(); } ).Unique(); The relevant output from the HBM is <component name="ExposureKey" insert="true" update="true" optimistic-lock="true" class="Some.N...
stackexchange/codereview
when my Async task is executed it completely crashes the app Here is the code to the class. It sits inside of my main activity class. I'm new to threading, so sorry if I've done something ridiculous lol, I don't fully understand it. EDIT: private class TeamSearchTask extends AsyncTask<String,Void,Void> { CharS...
stackexchange/codereview
I use google analytics which uses a file ga.js. This creates a hidden utm.gif file in which parameters are attached and sent to a server (to be included in the google analytics interface) My understanding is that utm.gif uses a "304 not modified" header, to ensure that the file is always reloaded (rather than cached). ...
stackexchange/codereview
Context: Suppose one has the following class structure: public static class SomeStaticClass { public static class SomeInnerStaticClass { public static readonly string SomeProperty = "someStringValue"; } } Question: Is there an easy way to convert the reference SomeStaticClass.SomeInnerStaticClass.S...
stackexchange/codereview
It was quite surprising today when we were having problems with the proxy, and then we noticed that TortoiseSVN would override command line svn. Is that suppose to happen?
stackexchange/codereview
I downloaded AST explorer code from a website. But i get the error as the following org.eclipse packages doesn't exists, I use eclipse IDE and the code is below, please help me package astexplorer; /** * Parses a source file and displays its nodes in a SWT Tree widget * You should run the main method inside the Ecli...
stackexchange/codereview
I have a bash script with some scp commands inside. It works very well but, if I try to redirect my stdout with "./myscript.sh >log", only my explicit echos are shown in the "log" file. The scp output is missing. if $C_SFTP; then scp -r $C_SFTP_USER@$C_SFTP_HOST:$C_SOURCE "$C_TMPDIR" fi Ok, what should I do now? Th...
stackexchange/codereview
I have been working on a Swing based java program for a while now, today I have been editing the JComboBox (using Netbeans so I am unable to directly edit the code for it), at some point between edits the below errors have sudddenly appeared. Obviously at this point there is far too much code involved to post, but does...
stackexchange/codereview
I am looking for a basic example of HTML5 <canvas> animation. For example, making a ball bounce, etc. If someone has one I would be very grateful.
stackexchange/codereview
I have a very simple problem that i'm sure has a simple solution, but after searching the internet for 2 days I can't find anything on it =( Here is the situation: I have decided to break my data into 2 sperate entities with a one-to-one relationship. So I have the PERSON entity and FEATURES entity. each PERSON has a r...
stackexchange/codereview
I've been looking around for this for quite some time and cannot seem to get anywhere. I need to find a way to accomplisht the following two tasks, based on a .Net Entity object: Create an XML file that contains the data in this entities, complete, with cascading nodes (representing foreign key relationships, basicall...
stackexchange/codereview
I have a core data model, using the database store, that contains entities with classic parent/child relationships. Each parent has a number of children, each child a single parent, creating a multi-level hierarchy. What I would like to do is use a predicate in a fetch request to return a list of all the entities betw...
stackexchange/codereview
Is it possible to customize tab bar in android? Customize in the sense, like in iPhone, the tab bar is at the bottom of the screen; in Android, can we place the tab bar at the bottom and its content on top of it?
stackexchange/codereview
var mystring = "MyCompany.MyType.Localization.Strings.MyString" In C#, is there a way I could fill it up such that var abc = GetReflectedValue(mystring); Is reflection the only way? (how?) Or any more efficient ways?
stackexchange/codereview
I'm working on an app that will (hopefully) be taking advantage of Android's gestures (as described here: http://developer.android.com/resources/articles/gestures.html) Before I dive in though, I'm trying to find out if gestures can take the direction they were drawn into account. Unfortunately I haven't found this i...
stackexchange/codereview
I'm developing app with SmartGWT framework which gonna work through ssl-connection. SmartGwt libs are big enough, and using of https prevents caching. Is there any way to use JSONP to access static content of SmartGwt app via http? Or maybe you can suggest any other way of static content caching in this case? Thanks
stackexchange/codereview
I just got a real surprise when I loaded a jpg file and turned around and saved it with a quality of 100 and the size was almost 4x the original. To further investigate I open and saved without explicitly setting the quality and the file size was exactly the same. I figured this was because nothing changed so it's ju...
stackexchange/codereview
I am trying to get a regular expression for text, decimals and decimal numbers. The expression must match all at once. The main problem is that I had to write an Analyzer for Zend_Search_Lucene in order to be able to search for decimal digits. Right now I can only search for texts and numbers. So I guess it to match de...
stackexchange/codereview
I have a model like below. class Content(SimpleModel): title = models.CharField(max_length=255) body = models.TextField() slug = models.SlugField(max_length=50) def __unicode__(self): return self.title class MediumStuff(models.Model): meta_value = models.TextField() meta_key = mod...
stackexchange/codereview
I was trying to go to http://lustiges-taschenbuch.de which is a valid comic book site. I mistyped the address as http://lustigestaschenbuch.de and was surprised to see my own apache localhost directory (!). This happens on two computers in Windows 7. I checked my c:\windows\system32\drivers\etc\hosts file but it has n...
stackexchange/codereview
Using PostgreSQL 8.1.11, is there a way to select a set of columns that have name beginning with same prefix. Suppose we have columns : PREFIX_col1, PREFIX_col2, ... Is it possible to do a request like : SELECT 'PREFIX_*' FROM mytable; Which of course doesn't work.
stackexchange/codereview
Can anybody help on this? I have a grid populated with data from Database.Now to format the grid,I want some columns text alone to made Center(text alignment).How to do this dynamically?
stackexchange/codereview
Which edition of SQL Server 2008 should I install for development purposes? I'm presuming the developer edition, but... What I do is (SQL Server 2005 until now): Develop databases to plonk onto our web server (that runs SQL Server Express) Manage and extend these database using the SSMS (SQL Server Management Studio...
stackexchange/codereview
Right now I am trying to save a variable when i close the app and get the variable back when i open the app back up. I have no idea if I'm doing this right. My variable is called count and would like to save and restore it. Is this right? If so, why isn't it working? If not, what do i need to change? (i'm obviously usi...
stackexchange/codereview
i am delaeaing with comboboxes in datagridview in windowsforms assume that i have two combboxes in one datagridview so my question is how to populate comboboxcolumn in datagridview according to selected values from another comboboxcolum in this datagridview
stackexchange/codereview
How can I open a Python interpreter at a specific network path in Windows? In the Explorer address bar the path is in UNC form: \\myhost\myshare\.... I can't work out how to change to this directory from the Windows command line, nor in what format I could pass it as an argument to os.chdir. I'm running Python 2.5 on W...
stackexchange/codereview
Table/Entity 1: RetrievedDataRecords Columns: id record_key Table/Entity 2: SourceKeys Columns: id key_name (unique key) I cant alter these tables for legacy reasons, but want rails relationship between RetrievedDataRecord and SourceKey using record_key and key_name (they are the same key) in RetrievedDataRecord, I tri...
stackexchange/codereview
When I do svn commit and let my svn editor pick it up I'd LOVE for the svn editor to show the diff of the files that have changed instead of just the list of files. Really helps jog the memory when writing detailed commit messages. Any ideas on how to accomplish?
stackexchange/codereview
Writing a stored procedure in MS SQL Server 2008 R2, I want to avoid using DSQL... I would like the sort method (ASC or DESC) to be conditional. Now, with a numeric column I would simply use a case statement and negate the value to emulate ASC or DESC... That is: ... ORDER BY CASE @OrderAscOrDesc WHEN 0 THEN [NumericCo...
stackexchange/codereview
I am currently trying to get used to the DirectX API and I am wondering what is the usual approach to render a sprite in DirectX 11 (e.g. for a tetris clone). Is there a simmilar interface as ID3DX10Sprite, and if not, which would be the usual method to draw sprites in DirectX 11? Edit: Here is the HLSL code that worke...
stackexchange/codereview
News nID nTitle ----------- 1 test Keyword kID kWord nID -------------- 1 abc 1 2 def 1 3 ghj 1 So i fetch it like $sql = mysql_query("SELECT * FROM news as n, keyword as k WHERE n.nID = k.nID"); PHP while($row = mysql_fetch_...
stackexchange/codereview
I have 2 .js file, each contain the SAME large array or value (price list) Now i have to get the 2 array exactly the same... not good i like to have another .js file that will execute the array load into any function i like The way i approch the problem, i defining variable, and executing a function loading value into ...
stackexchange/codereview
I need a simple and flexible component for free to install in my website. I search a lot and found some components like cc newsletter, letter man etc... But i can't to able download. Is there any component which is available to send newsletter for the subscribed users. Kindly help me out of this issue. Thanks in advan...
stackexchange/codereview
So, I have read in the docs, that use of blocks like beginAnimation commitAnimation is discouraged from os4.0. So I have tried to get my code to work by using CABasicAnimation. I want to achieve, that an image's frame is resized from its thumbnail size, somewhere within my view, to a full width position e.g. (0, 120...
stackexchange/codereview
Hi iam trying to load a few external jpegs in As3. It works fine locally in Flash, but it dosen't work at all ion my server. My app also loads a youtube video simultaneously. function drawResult(index,videoID,song_title,thumbnail:String=null) { var theClip:resultRowClip=new resultRowClip (); _clip.addChild(theC...
stackexchange/codereview
I was wondering if there is a way to control the orientation of the iPod Touch’s keyboard from JavaScript? When the using is in landscape, the keyboard is always displayed in portrait mode which is causing problems with my static positioning of many elements. Is it possible to control the keyboard’s orientation in Java...
stackexchange/codereview
I am writing a zend application and trying to keep the functionality as modular as possible. Basically I want to drop the folder into the application and have instant functionality. Anywho; I'm trying to create sidebar links from each module. The method I'm using is to use the bootstrap: Here is the function in my boot...
stackexchange/codereview
I have a website that allows users to upload videos to it, After they upload videos, I would like to be able to display them using a flash player. One flash player i know is flowplayer, althrough if anyone knows a better one I will be happy to know. In any case, as I understood from a brief google search, there are no ...
stackexchange/codereview
I am using free Telerik.Web.Mvc grid and following this example: http://demos.telerik.com/aspnet-mvc/grid/hierarchyajax My Issue: I am populating the grid with search results after user input some data and submit with a search button In the DetailView() method I reference my 'SearchQuote_QuotesForHierarchyAjax' method,...
stackexchange/codereview
I did find some questions on SO about Rails associations that are somewhat like my question, but for the life of me I can't seem to understand how to use belongs_to multiple models. Here's the table structure I intend to have: User id Post id user_id #foreign key; a post belongs to a User aka "Who created this post...
stackexchange/codereview
Is there an easy way, either through LINQ or Generics, to find out if elements in one List are all available in another List. I'm currently using Intersect to check this. For e.g. List<string> list1; //{ 5, 4, 1, 3, 9, 8, 6, 7, 2, 0 } List<string> list2; //{ 1, 3, 9 } list1.Contains(list2) == true Thanks in advance...
stackexchange/codereview
like i said ,this question is about redistributing JRE. i wrote a swing app to access Google Docs Service,which named iGoSyncDocs and could be found at http://igosyncdocs.sourceforge.net/. if you're interested in,please try it and send me bugs. thanks ahead. If it is right to bundle JRE with App. i should make an insta...
stackexchange/codereview
How do I define that a formula should not be computed, but rather displayed in Traditional format? Here are 2 examples, where the first one is displayed like I want it, but the second one is simplified. Print["5. ", Limit[f[x]/g[x], x -> a], "=", Limit[f[x], x -> a]/Limit[g[x], x -> a], ", where ", Limit[g[x], x -> a] ...
stackexchange/codereview
Dynamic should be able to handle math without making me have to think about it but even in trivial cases I'm running into some issues. Consider this really simple function:: public static T DynamicFactorial<T>(T input) { dynamic num = input; dynamic res = 1; for (; num > 1; res *= num, num -=1) ; return...
stackexchange/codereview
How does one disable script debugging with Visual Studio 2010? For VS2008 I used: reg add HKLM\SOFTWARE\Microsoft\VisualStudio\9.0\AD7Metrics\Engine{F200A7E7-DEA5-11D0-B854-00A0244A1DE2} /v ProgramProvider /d {4FF9DEF4-8922-4D02-9379-3FFA64D1D639} /f Thanks! EDIT Used Shoban's answer. You have to have the Silverligh...
stackexchange/codereview
Can someone help me out with the mysql connection statement to instert a textfile into a mysql table (field type is long blob)? For example: cursor.execute("insert into mytable (file_contents) values ('"+open(filename,"r").read()+"')") Obviously that's not very practical, can someone post a better way to do this?
stackexchange/codereview
Consider these (more or less) equivalent type signatures: f1 :: [a] -> Int -> a f2 :: Integral b => [a] -> b -> a f2 is more general than f1, and that is a big advantage, but is there an advantage of f1 over f2? It seems that in the solutions to the H-99 problems, and in many posted solutions to various Project Euler ...
stackexchange/codereview
I'm a newbie to javascript. How can I detect if my javascript is being run from a web site (http://) vs a local file.
stackexchange/codereview
In short, the problem is that, when add child object to the collection property of the parent object without explicit setting the parent property of the child object, the insert will fail. Let's take a example: NOTE: I'm using NHibernate 3.0 beta1. Example: Product-Category Senario: (1) Database Schema: Category (Id, ...
stackexchange/codereview
I have an ASP.NET app running on a webserver. A third party is created another app in PHP which needs to send data to my app for processing. Initially it was assumed that the PHP app would be deployed elsewhere so we agreed that the communication would occur over the internet via HTTP (over SSL). My app would simply us...
stackexchange/codereview
I am using the Entity framework for the first time, and would like to know if I am using in the best practice. I have created a separate class in my business logic which will handle the entity context. the problem I have, is in all the videos I have seen they usually wrap the context in a using statement to make sure...
stackexchange/codereview
I have the following data set, which represents nodes in a directed graph. CREATE TABLE nodes (NODE_FROM VARCHAR2(10), NODE_TO VARCHAR2(10)); INSERT INTO nodes VALUES('GT','TG'); INSERT INTO nodes VALUES('GG','GC'); INSERT INTO nodes VALUES('AT','TG'); INSERT INTO nodes VALUES('TG','GC'); INSERT IN...
stackexchange/codereview
If I have some grouped choices for a models.IntegerField, how can I set the default value to a combination of those choices ex: class ForumThread(): STATE_CHOICES = ( ('Sticky', ( (True, 'True'), (False, 'False') ) ), ('Blocked', ( (False, 'False') ...
stackexchange/codereview
I now primarily write in python, however I am looking for a language that is more thread friendly (not JAVA,C#,C or C++). Python's threads are good when they are IO bound but it's coming up short when I am doing something CPU intensive. Any ideas? Thanks, James
stackexchange/codereview
In my django app, I have one AJAX view that gets flooded with calls to an update method, which I'll call IncrementMagicNumber: def IncrementMagicNumber(request) : number = request.GET['increment'] request.session['magicnumber'] = request.session['magicnumber'] + int(number) return HttpResponse("OK!") This wor...
stackexchange/codereview
I hear about accelerators such as these in PHP. I believe APC is making it to PHP 6 also. Eaccelerator APC Xcache What's the state of accelerators in Zend? I see a Zend_Cache. Is it the standard and is there more?
stackexchange/codereview
I make stack based in std:list. Now i try to make functions for showing all elements from this stack: I try to declare iterator: void show_elements() { list<T>::iterator it; } But i get error: error: dependent-name ‘std::list::iterator’ is parsed as a non-type, but instantiation yields a type What's wrong? Thank ...
stackexchange/codereview
Where are fonts stored on Windows, macOS, and Linux?
stackexchange/codereview
This link on MSDN says it's stored in the samples directory of the Windows SDK: http://msdn.microsoft.com/en-us/library/aa363805(VS.85).aspx Except it isn't, and I have the latest version. Where can one go to find this code, if not the distributable tool itself?
stackexchange/codereview
I want to add an element to a textNode. For example: I have a function that search for a string within element's textNode. When I find it, I want to replace with a HTML element. Is there some standard for that? Thank you.
stackexchange/codereview
When dealing with buisness classes, like the typical Customer and Employee classes, is it better to use getters and setters only or to use properties? I am translating to Delphi (for self learning) some OO examples from java books, in those examples there is always GetName() and SetName(), properties are not used. Now,...
stackexchange/codereview
Overview I'm looking to create a (REST) API for my application. The initial/primary purpose will be for consumption by mobile apps (iPhone, Android, Symbian, etc). I've been looking into different mechanisms for authentication and authorization for web-based APIs (by studying other implementations). I've got my head...
stackexchange/codereview
I'm getting ready for my first ASP.NET MVC 2 project and was wondering whether ASP.NET Tracing is sufficient for any logging I might need to do. Is anyone using a logging framework like log4net or NLog with an ASP.NET MVC 2 application, and if so, what additional functionality does it provide that ASP.NET Tracing lack...
stackexchange/codereview
Possible Duplicate: strange output in comparision of float with float literal float a = 0.7; if (a < 0.7) ; Why does the expression here evaluate to true?
stackexchange/codereview
I have a weird, random problem. Here's a sample of my problematic code. It's purpose is to create a jQuery jCarousel control over a list of ul/li elements. But I need the elements inside to be vertically centered, so I'm calculating a padding-top for each of them once the picture they contain is loaded. <script type="t...
stackexchange/codereview
Mercurial has an hg copy file file2 command and the change can propagate change at the first merge. The O'Reilly Mercurial book says that Mercurial is the only source control system that does that. What is a practical use of this? The book mentioned making a copy of the file and do bug fix, so the bug fix can propag...
stackexchange/codereview
Simple performance test, I have installed ruby-prof and no other gems are missing, rake test:profile returns the following error. the test is simply. require 'test_helper' require 'performance_test_help' # Profiling results for each test method are written to tmp/performance. class BrowsingTest < ActionController::Per...
stackexchange/codereview
I have a best practice/efficiency/performance issue. If I want to have a profile page for each user in my system and i already have a user model. Is it better to have all the users information in the user model and pull it on the show page of users so users/show will access the user model and grab all the relevant dat...
stackexchange/codereview
given the following schema class User has_many :page_views #[id] end class Page has_many :page_views #[id] end class PageView belongs_to :user belongs_to :page #[id, created_at, updated_at] end How can i query for a given page, all users most recent page views in order by created_at date. One row per u...
stackexchange/codereview
This is my form code. <%= simple_form_for @user do |f|%> <%= f.input :name %> <%= f.button :submit %> <% end %> And this is the error I get : compile error /home/shreyas/apps/vaccidate/app/views/users/_form.html.erb:1: syntax error, unexpected ')' ... simple_form_for @user do |f|).to_s); @output_buffer.concat ...
stackexchange/codereview
I'm using some jQuery that works fine in all browsers except in Internet Explorer 8 (and probably not the earlier versions although I'm not as worried about those.). I'm using jQuery's .each function to loop over every element in a JavaScript array that is auto generated on my page by the fairly inflexible CMS I'm usi...
stackexchange/codereview
I have two models and controllers: Snippets, and Tags. There is a belongs_to relationship, with tags belonging to snippets. This works well, I have a text field which creates a new tag associated with the snippet when the user submits a snippet. I want to be able to have a text field which, when submitted to a function...
stackexchange/codereview
Possible Duplicates: What are the arguments to main() for? What does int argc, char *argv[] mean? Every program is starting with the main(int argc, char *argv[]) definition. I don't understand what it means. I would be very glad if somebody could explain why we use these arguments if we don't use them in the progra...
stackexchange/codereview
i have an asp.net and c# application using an wcf service and has been hosted in IIS and now the memory consumption by the wcf service was increasing with time. can any one guide me in making the wcf service to consume less space
stackexchange/codereview
I have a table with SIGNUPS to different events. This table has some simple columns like ID, IDUSER, IDEVENT and DATE. Each event is characterized my a maximum amount of people who can attend, so the table EVENTS has a column called let's say PLACES. What I want to obtain for a given event is the list of the first "PL...
stackexchange/codereview
I'm trying to install this great python module Python-Chrono to my python environment, but it fails at least with python 2.4.3 and 2.6.6 with the following error message: Traceback (most recent call last): File "setup.py", line 30, in ? import chrono File "/home/janne/python-chrono-0.3.0/chrono/__init__.py", l...
stackexchange/codereview
I have a HTTP POST string that I am running from a client cpp program against a server running Apache. Following is the POST string that would get fired from the clients: "POST %s HTTP/1.0\r\n" "Host: %s\r\n" "Content-type: multipart/form-data\r\n" "Content-length: %d\r\n\r\n" "Content-Disposition: %s; filename: %s\n"...
stackexchange/codereview
By default there is no data security in basicHttpBinding, so how to check it ? we want to check that by default in basicHttpBinding when client gets response from wcf then data travel in plain text not in encrypted form. Actully we have implement some security on it so we also then check data communication in both scen...
stackexchange/codereview
I am still a bit confused about the relation of Proxy models to their Superclasses in django. My question now is how do I get a instance of a Proxy model from an already retrieved instance of the Superclass? So, lets say I have: class Animal(models.Model): type = models.CharField(max_length=20) name = models.Char...
stackexchange/codereview
How do we call Crystal Reports from Delphi XE? What version of Crystal Reports does Delphi XE support?
stackexchange/codereview
I am writing web services with VB.NET (2.0). The client side will use different technologies such as Java and Siebel. So, if I write asynchronous web services, is it possible for different platforms to consume them? I know it is quite easy with a consumer having .NET platform, but not sure for different platforms. Is i...
stackexchange/codereview
i am trying to get my site to auto center a div that has a bunch of divs inside of it on the page by using a set width and defining a margin of 0 auto; if i set my inner div elements to absolute positioning everything lines up properly but it doesn't auto center, but if i set the positioning to relative the inner divs ...
stackexchange/codereview
I'm doing the following and getting that debug error: AguiWidgetBase* AguiWidgetContainer::recursiveGetWidgetUnderMouse( AguiWidgetBase* root, const AguiMouseEventArgs &mouse) { AguiWidgetBase* currentNode = root; bool foundsomething = true; while(foundsomething) { foundsomething = false; ...
stackexchange/codereview
I tried to do: rake db:migrate to get this app from github installed on my mac, and I got this error: Missing the Rails 2.1.1 gem. Please `gem install -v=2.1.1 rails`, update your RAILS_GEM_VERSION setting in config/environment.rb for the Rails version you do have installed, or comment out RAILS_GEM_VERSION to use the ...
stackexchange/codereview
I was wondering if there is a way to programmatically check how many messages are in a private or public MSMQ using C#? I have code that checks if a queue is empty or not using the peek method wrapped in a try/catch, but I've never seen anything about showing the number of messages in the queue. This would be very help...
stackexchange/codereview
Does any one have an example how to do this? Are they handled by the garbage collector? I'm using Tomcat 6.
stackexchange/codereview
I have been looking for some time but have not found anywhere near sufficient documentation / examples on how to use the CryptoAPI that comes with linux in the creation of syscalls / in kernel land. If anyone knows of a good source please let me know, I would like to know how to do SHA1 / MD5 and Blowfish / AES within ...
stackexchange/codereview
I have a Ruby on Rails application that works great in my computer and in my server. I'm moving this application to another server that runs on another hosting service, and I got a problem related to the OAuth Ruby Gem. Any request I do using OAuth gem, I get: OAuth::Unauthorized (401 Unauthorized): oauth (0.4.3) lib...
stackexchange/codereview
I am trying to create a histogram with ZedGraph. The bars and data are all good, the only thing needed is my bars to be between the tics instead of directly on the tics. Sample data: 1, 4 2, 8 3, 1 Means that I have: 4 items that are >= 0 and < 1 8 items that are >= 1 and < 2 1 item that is >= 2 and < 3 So currently ...
stackexchange/codereview
I've recently dusted off an old Ruby on Rails project of mine. In the past, I've never had any problems getting all the tests to pass, but now there is one test that gives me the following error: ActiveRecord::StatementInvalid: Mysql::Error: #HY000Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8_gener...
stackexchange/codereview
I need to pass Cyrillic characters as a parameter in a URL in my iPhone app. A sample URL looks like: http://www.mysite.com/script.php?message=страшная When I use this URL in my browser, it returns the correct result. However, in my app, the cyrillic is not liked, and I end up getting a "bad url" in the didFailWithEr...
stackexchange/codereview
I have a .NET 4 WCF service that maintains a thread-safe, in-memory, dictionary cache of objects (SynchronizedObject). I want to provide safe, concurrent access to read and modify both the collection and the objects in the collection. Safely modifying the objects and the cache can be accomplished with reader-writer l...
stackexchange/codereview
This is really a silly question, but I've been staring at this problem for way too long and I just cant figure out what the problem is: /** * public boolean overlap(int targetX, int targetY) { * Returns true if the target position is sufficient close to this ghost * If target position is 16 pixels or les...
stackexchange/codereview
How can I return all the 'make' items from the xml document using an xpath query <vehicles> <car> <make>Benz</make> <make>Nissan</make> </car> <motorbike> <make>Honda</make> </motorbike>
stackexchange/codereview
Linker Error: $ make g++ -Wall -g main.cpp SDL_Helpers.cpp Game.cpp DrawableObject.cpp `sdl-config --cflags --libs` -lSDL_mixer /tmp/ccdxzrej.o: In function `Game': /home/brett/Desktop/SDL/Game.cpp:16: undefined reference to `Player::Player(Game*)' /home/brett/Desktop/SDL/Game.cpp:16: undefined reference to `Player::Pl...
stackexchange/codereview
Quoting myforwik's answer, CBC, OFB and CFB are identical, however OFB/CFB is better because you only need encryption and not decryption, which can save code space. I want a pure implementation of AES CFB in PHP. I specifically do NOT want mcrypt. I therefore turned to PHPSecLib. However, as per the documentation, the ...
stackexchange/codereview
I was working on my program, and it seems something in the settings changed. Suddenly I have the error "Duplicate interface declaration for class 'Foo'". It mentions a header file being duplicated but there's only one copy. Interestingly this is only happening in debug mode, not device mode. Does anyone have any idea w...
stackexchange/codereview
I want to display excel sheet on android screen with horizontal and vertical scrollbars..plz help me.I have searched so much on net.thanks
stackexchange/codereview
I want to fetch information about the types of the arguments in an instance-method at runtime. For instance if I have the method: - (void)doSomethingWithItem:(Item *)item usingName:(id<Type2>)name; Here I would like to retrieve Item and id<Type2>. Is there any way of doing this, or is there no type information availab...
stackexchange/codereview
I'm moving itmes from one ASP.NET ListBox control to another ListBox control from client-side. It works on the client-side but when I tried to count items in destination ListBox on the server-side, it's always nothing. Below, is the jQuery code used to add/remove items from ListBox control. <script type="text/javascrip...
stackexchange/codereview