instruction_seed
stringlengths
1
35.8k
_source
stringclasses
1 value
I am trying to draw a bubble similar to the one used in the Stocks app. However, I cannot seem to replicate the graphics. I have jagged lines although I use anti aliasing and the colors are blurred. Am I not using Quartz at its real power or I simply need to change my approach? Is there any alternative to Quartz that c...
stackexchange/codereview
Above is a screenshot of what I'm trying to accomplish. I tried setting height:100%, but I get an "overflow" caused by having margin-top:48px, causing me to scroll down even though the content fits on 1 screen. Right now the content is only up to the colored part (I edited it out for clarity). It's CSS is: #main_are...
stackexchange/codereview
I know this is programming questions but I'm just frustrated trying to figure out what I'm doing wrong.. I'm using visual studio 2010 and followed all the steps here: http://curl.haxx.se/libcurl/c/visual_studio.pdf When I try to compile my solution I keep getting this error: 1>------ Build started: Project: LibCurl, Co...
stackexchange/codereview
Is there a fool proof way to restrict your content from being indexed by major search engines? Thanks Prady
stackexchange/codereview
I want to build a website using Joomla. My target is something like this http://www.training.my/. My question is how to achieve the functionality like that website?(The course pricing table, the download menu) If you know some extension that is useful for this, please recommend for me. Thank you.
stackexchange/codereview
here is my situation : I call a local movie with an URL. the function is in a custom viewController in .h : MPMoviePlayerViewController* modalVideoController in .m -(void)startVideoAd:(NSNotification*)notification { NSURL* url = (NSURL*)[notification object]; // no problem with url ... already check :) modalVi...
stackexchange/codereview
I have a product database which I want to distribute to an iphone user application. Its data is stored in an SqlLite database. What i want to ask is: If i update one products' price in the database, what is the best approach to update the users copy of the database in the iphone application ? I don't want to send the ...
stackexchange/codereview
I am trying to replace occurances of a string in a few different steps, I am using: NSString *doc = [[NSString alloc] initWithData:htmlData encoding:NSASCIIStringEncoding]; doc = [doc stringByReplacingOccurrencesOfString:@"###DATA###" withString:cord]; doc = [doc stringByReplacingOccurrencesOfString:@"###NAME###" withS...
stackexchange/codereview
Which properties should be used and which ones to be avoided?
stackexchange/codereview
I have a porogram where I use m_sqlConnection as a class member does using (m_sqlConnection = new SqlConnection(sr_ConnectionString)) { m_sqlConnection.Open(); } //dispose similar to using ( SqlConnection m_sqlConnection = new SqlConnection(sr_ConnectionString)) { m_sqlConnection.Open()...
stackexchange/codereview
I'm building the login part of a CodeIgniter app using the simple login class as the starting point. It's all working fine, but I'm unsure of the differences between the encryption types, and which to use. I've gone for using the crypt() function with the user's password as the salt (via md5), like so: $pass == crypt...
stackexchange/codereview
I'm trying to pull data into flash using JSON but i keep getting this error JSONParseError: Unexpected < encountered at com.adobe.serialization.json::JSONTokenizer/parseError() at com.adobe.serialization.json::JSONTokenizer/getNextToken() at com.adobe.serialization.json::JSONDecoder/nextToken() at com.adobe.seriali...
stackexchange/codereview
I am running out of ideas as to what could be wrong with my code. This particular class accepts an array and checks it against another array to get the common values. Then it provides access to the common values thru final_post_vars_keys() function. But I get the error(in the title) whenever I run the code. <?ph...
stackexchange/codereview
I use vimgrep (or grep) to search in files inside vim, but I see it's quite inconvenient to have to write that every time I want to make search in vim. Any idea on how to make a suitable short-cut key to search in files? Regards, Rafid
stackexchange/codereview
EDIT: For future reference, I'm using non-xhtml content type definition <!html> I'm creating a website using Django, and I'm trying to embed arbitrary json data in my pages to be used by client-side javascript code. Let's say my json object is {"foo": "</script>"}. If I embed this directly, <script type='text/javascrip...
stackexchange/codereview
I'm setting up a menu system whereby a user is asked to pick a radio station from a list, and for ease of use down the road, I want that list to be in a file called StationList. That bit's all sorted, but I have a problem with the selection process. Is there a way to have a case statement reference StationList for vali...
stackexchange/codereview
can somebody tell me does my conversation from c to delphi is well: c code struct nfq_data { /* packet_hdr - it HAVE to be the same as struct nfqnl_msg_packet_hdr */ struct { uint32_t packet_id; /* unique ID of packet in queue in network order */ uint16_t hw_protocol; /* hw protocol in network o...
stackexchange/codereview
I'm trying to setup my GWT library. I found this old video that shows there should be a section title "Google Web Kit" under Settings->IDE Settings. Sadly, I can't find anywhere in the settings "Google Web Kit" or GWT, except under Inspections. How do I point IntelliJ to my GWT installation? BTW, I'm using IntelliJ 9.0...
stackexchange/codereview
I created an application using a UITableview. But when I scroll the table view, I see a white space view before and after the table view. How can I fit the UITableview so it doesn't show that empty view? Here's an image of what happens when I scroll the UITableview.
stackexchange/codereview
I'm on Mac OS X Leopard and installed the ADT plugin into Eclipse Galileo. I followed all the steps on the Android developer SDK page to get started. My SDK version is 2.2 API 8 revision 2 and I just used the Hello World tutorial found here: http://developer.android.com/resources/tutorials/hello-world.html When I fir...
stackexchange/codereview
I need to write the following event.I have a Flex datagrid.When I click on a row I should fetch a particular column and call a remote EJB method.The Flex EJB bridge is working perfectly with BlazeDs.Here are my codes <mx:DataGrid id="employees" x="100" y="50" dataProvider="{empList}" height="150" click='empHandler();'>...
stackexchange/codereview
I am use using to guarantee the resource cleanup. This is fine for the simple block of code. If I have a method which I need to pass the variable inside the using, can I still guarantee resource clean up? for example, using ( FileStream fs = -----) { SomeMethod(fs); }
stackexchange/codereview
In Unix, it's possible to create a handle to an anonymous file by, e.g., creating and opening it with creat() and then removing the directory link with unlink() - leaving you with a file with an inode and storage but no possible way to re-open it. Such files are often used as temp files (and typically this is what tmp...
stackexchange/codereview
i use the following code to get special directories uses ActiveX, ShlObj; {...} procedure TForm1.Button1Click(Sender: TObject); // Replace CSIDL_HISTORY with the constants below var Allocator: IMalloc; SpecialDir: PItemIdList; FBuf: array[0..MAX_PATH] of Char; PerDir: string; begin if SHGetMalloc(Allocat...
stackexchange/codereview
We're looking for a way to manage ever-increasing javascript code for our asp controls (used with RegisterClientScript family). The classic way was to have javascript encoded into string constants inside c# code but now it's getting bigger and you don't want to develop inside c# string. Having code in external file and...
stackexchange/codereview
I have two points of circle and center of this circle. I want to draw an arc between these points. Method drawArc is to simple and doesn't fit my purpose. Anybody help?
stackexchange/codereview
Is it possible to create an array in an array for inputs? So: <input type="text" name="array[array[]]" /> Thanks.
stackexchange/codereview
Where can I find a good step by step tutorial about some api weather implementation? I´m really new in this, so official documentation is not always as clear as I need to begin to understand.
stackexchange/codereview
I have a base class that is marked as abstract. Is it possible to make a method in that base class only visible to other classes that are inheriting the base class? Say I have Class1 that is my base class and is marked as abstract. Class2 Inherits Class1 and can make calls to all of it's public methods. I want Class3 t...
stackexchange/codereview
I am using the jQuery Validation plug-in for a rather large form (the size of the form is large by client request and non-negotiable). I have been able to implement all of the sometimes complex validation dependencies with relative ease. But now I am stuck at a relative simple validation that somehow doesn't seem to f...
stackexchange/codereview
I am using UIView's animation features to swim one image of a fish onto the screen and when there already exists a fish in the middle of the screen, swim it off and swim a new one on. The selection of the fish is sent from a separate tableview controller. To accomplish this, I m keeping two instance variables of UII...
stackexchange/codereview
I have a database field called willingness populated with text like: shopping,pool,pc,games shopping,pool,pc,games swimming, pool, pc, games I need sql query that queries the fileds which have "shopping" inside? TY
stackexchange/codereview
I'm using this code to pop up a Facebook dialog and to allow the user to make a wall post, but the user name doesn't appear. I'd like that the post seemed like "USERNAME is using..." Facebook *facebook = [[Facebook alloc] init]; SBJSON *jsonWriter = [SBJSON new]; NSDictionary* attachment = [NSDictionary dictionaryWithO...
stackexchange/codereview
I am currently using a switch to trigger some code when a key is pressed. This isn't the exact code, but its basically what I am using (this is just for the sake of keeping it short and simple on here.) $(document).keydown(function(e) { switch(e.keyCode) { case 39: e.preventDefault(); alert("Arrow Key"); break; ...
stackexchange/codereview
I m working on a library project where users can add books into their library. So I tried finding some sample code that will help me get started but could not find any. So I want to know how to use Google Book API to get Title,Description,Book Cover image and ISBN code of the queried book? btw I want the python code ex...
stackexchange/codereview
What would be the best approach for comparing the following set of strings in SQL Server? Purpose: The main purpose of this Stored Procedure is to compare a set of input Names of Customers to names that Exist in the Customer database for a specific accounts. If there is a difference between the input name and the name ...
stackexchange/codereview
Can mobile device bluetooth mac address be changed?? I am asking this because one part of my system depends on this security. If it can be done, how hard is this to do and how one can do that. I know that on linux you can change it pretty easily, but that is for PCs.
stackexchange/codereview
When I open 3+ files in emacs, I get a split window with one of my files in the upper buffer and Buffer List in the lower buffer. How can I get emacs to NOT put Buffer List there, but instead show another one of my files. thanks. -John
stackexchange/codereview
i have already set the theme of my activity as android:theme = "@android:style/Theme.Dialog" but i also want to remove the title bar of the activity. so how to use android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen" along with the dialog theme.
stackexchange/codereview
My MFC based application would write multiple files of different types on a disk. I have to pre-allocate fixed disk space for the entire application so that other applications do not eat up my disk resources. Through google, I figured out how to pre-allocate disk space for a single file but not for multiple files.
stackexchange/codereview
I have a small issue. I am trying to pull some data from my XML using lxml and I keep getting a "list index out of range" error, now I am trying to get the [0] position of my list, which should be the first one but it keeps giving me the error. Here is a code snippet (thanks to MattH for helping me out): req2 = urlli...
stackexchange/codereview
I'm doing a project for school have to incorporate a form of GUI. Sadly, I have no experience with GUIs whatsoever so I just spend the last few hours comparing the various toolkits and settled on FLTK for it's lightweightness. I also spent the time attempting to install FLTK by reading various guides but to no avail. ...
stackexchange/codereview
After I either receive a phone call or make one, (and other undocumented interruptions) my application gets a NullPointerException when resuming my activity. Can any explain to me where it is and/or how to fix it? I have written the code as shown below: @Override public void onCreate(Bundle savedInstanceState) { ...
stackexchange/codereview
I have this query: SELECT foo.*, COUNT(archive.pkey) as archivedCount FROM ( SELECT type, count(active.pkey) AS activeCount FROM workertype LEFT JOIN active USING(type) GROUP BY type ) AS foo LEFT JOIN archive USING(type) GROUP BY type; I would like to add a column total which would be archivedCount + ...
stackexchange/codereview
I am fairly new to inheritance and wanted to ask something. I have a base class that has lots of functionality that is shared by a number of derived classes. The only difference for each derived class is a single method called Name. The functionality is the same for each derived class, but there is a need for the Nam...
stackexchange/codereview
This is really simple, I just wanted to get some feedback, I guess. Long story short I am a super novice programming, and I've recently (about 6 months ago) started doing some game programming, and it's going fine. I can get everything to work and all that, so that's not my question. Instead, this has to do with passin...
stackexchange/codereview
Possible Duplicate: What is the best CSS Framework and are they worth the effort? What is the best CSS Framework and why ? How can i get started with css frameworks ? Are there any good tutorials ?
stackexchange/codereview
I have an ObjectManager, which holds a reference to all objects that are created. The problem is that the ObjectManager is not referencing the object that was created, but instead it seems to be creating a new instance of it. Any help would be appreciated. Thanks! var Fieldset = function (options) { var fieldset = ...
stackexchange/codereview
I'm making a simple online store like program. What can you suggest that I would do so that I can loop through the inputs I've made in my program. I'm still using get so that I could see how the data looks like, I'll change it to post later. This is what the url looks like, when I commit the buying of all the products ...
stackexchange/codereview
If i have 55 checkboxes with different text 1,2,3,4 and so on ....and a textbox where it display how many no. of checkboxes checked ..... i want to multiply the multiple selected checkbox text with how many checkboxes are checked in other textbox ..... i want to do this using vb.net, asp.net
stackexchange/codereview
I'm new to iPhone development, and am sort-of getting there with pointers in Objective-C. Can anyone briefly explain pointers to me? I know that some native C types don't need pointers (i.e. are weakly typed), such as int. Also, what's the difference between: NSDate* theDate = [NSDate date]; and: NSDate *theDate = [NS...
stackexchange/codereview
protected static new void WhyIsThisValidCode() { } Why are you allowed to override static methods? Nothing but bugs can come from it, it doensn't work as you would think. Take the following classes. class BaseLogger { protected static string LogName { get { return null; } } public static void Log(string messa...
stackexchange/codereview
What's a good data grid to use for django?
stackexchange/codereview
I wrote a short function to do some error checks for a form and am stuck at a portion of code where the final 'elseif' clause in the code below keeps getting executed, even when there is text in the textbox... could you please advise...thank you.. function errorCheck(){ if(!isInteger(document.getElement...
stackexchange/codereview
I need to create plugins that hook into the functionality of my main application. CakePHP plugins only instantiate themselves when its own controller is called meaning I cannot affect the processes of my main application. mainapp/action2baffected myplugin/ I like the idea of having self contained pluggable models , is...
stackexchange/codereview
We use Subversion for source control and have implemented a pre-commit hook that checks for comments and does not allow commits without comments. I use Toad for MySQL 5 to manage the DB. It provides a way to integrate with SVN and put DB in source control but it does not provide a way to add comments as part of the com...
stackexchange/codereview
This should be a fun puzzle for you Stack Overflow geniuses: I'm building a browser plugin that will inject a div, script, and iframe into the markup of whatever page the client is viewing. The purpose is to anchor a toolbar onto the bottom of every page (StumbleUpon does this for Chrome). Here's the code that is pla...
stackexchange/codereview
I originally had a number of signal processing filter classes that were identical apart from a few constants defining the filter characteristic, so I decided to change these to a template class for maintainability and extensibility. There are performance and memory management reasons for preferring a template over con...
stackexchange/codereview
In my situation: I got the days which want to be enabled from ajax called. When I change the month ,I read the xml file vial ajax called and got the days of that month.How to make it out?? thank you very much!! array variable to hold the days: var $daysWithRecords = new Array() function to load xml files: function get...
stackexchange/codereview
...when I can access the data using the direct URL » http://www.tumblr.com/api/likes?email=myemail@gmail.com&password=mypassword&debug=1, which gives me the posts I'm looking for: Array ( [posts] => Array ( [0] => Array ( [id] => 1482002179 ...
stackexchange/codereview
I seem to be having trouble getting a 'proper' connection between my Java server and my JavaScript client. It appears to connect okay, the client sends its header okay, but that's as far as it gets. The onopen or onmessage functions are never triggered at all. Here's the code for the Java server: import java.net.*; im...
stackexchange/codereview
I am doing a snake and ladder game in VC++ using opengl. I think i can draw a snake using arc and line. But i don't have an idea of how to do it in opengl. Can anyone give me some guidance?
stackexchange/codereview
im trying to get the values of all the checked checkboxes and post those values(integer) to an action result, the problem is i get an empty array at the controller side ... my jquery code is as follow: function getIds() { var idList = new Array(); var loopCounter = 0; //find all the checked ch...
stackexchange/codereview
I want to create function which I will call in next context: update mytab set processed = myfunc(mytab.data) where processed = 0 In myfunc I want to modify other tables. How should I implement this func? Thanks.
stackexchange/codereview
I´m working with Eclipse 3.4.2 with PDT. I´ve added some libraries in the applications folder, and add that folder to the PHP Include Path. When I run as script, it works perfect, but if I access the page outside eclipse, the libraries are not accesible, i need to add this line: set_include_path( implode(PATH_SEPARAT...
stackexchange/codereview
we are using a third 3 party library which comes with its own application delegate class. In the main file of the of the application its initiating the UIApplication object as follows : retVal = UIApplicationMain(argc, argv, nil, @"3ThParty1AppDelegate"); Now, I don't have any source code of the app delegate class b...
stackexchange/codereview
I have written a VC++ dll. The declaration for one of the methods in the dll is as follows: extern "C" _declspec(dllexport) void startIt(int number) { capture = cvCaptureFromCAM(number); } I use this dll in a C# code using P/Invoke. I make the declaration as: [DllImport("Tracking.dll", EntryPoint = "startIt")] ...
stackexchange/codereview
Is there anyway to install Apple iOS in VirtualBox? i have installed Android on VirtualBox with live Android and i have installed Snow leopard on VirtualBox but i don't know whether i could do the same with iOS if there is a way please let me know.(i am using both Ubuntu 10.04 and Windows 7 as hosts) Thanks !! UPDATE :...
stackexchange/codereview
I have worked with mercurial for some time now and it feels like a big asset to what I do. It's great to never mess up code again by accident. I love the workflow and wants to setup versioning on all my projects. What is the best option of the two below illustrated alternatives? Alternative A: /repo/ /repo/ownWork/ ...
stackexchange/codereview
I would like to try out a demo (more like a proof of concept), which involves running a .Net language in a browser. I am talking about a kind of IDE that allows you to do the following: Step through code (i.e. debug) and inspect variables Run the application All through a web browser interface Is there any software o...
stackexchange/codereview
I'm putting together a WCF service using net.tcp and netTcpBinding to get duplex comms with my Silverlight client. I call into the service from the Silverlight app and the service calls out to another server, passing it a callback method in the WCF service class. The remote server calls back several times and each ti...
stackexchange/codereview
everyone ,i have a peoblem here ,when i install a apk the system wiil show a install Dialog ,one is "open",the other one is "done",how can i set the "open" button unusable and when user click "done",it will show the activity that i want to show?thanks!
stackexchange/codereview
After write the xml document into the memory stream. When I want to use it by using XMLDocuments.Load, I have to set the position back to 0. I am wondering If there any standard way to do it?
stackexchange/codereview
I'm having problem with replacing objects inside NSMutableArray which is an object inside another NSMutableArray. In the interface: NSMutableArray *tiles; In the implementation: tiles = [[NSMutableArray alloc] initWithObjects: [NSMutableArray arrayWithObjects: @"0",@"0",@"0",@"0",@"0",nil], [NSMutableArray ar...
stackexchange/codereview
I'm studying up on OS memory management, and I wish to verify that I got the basic mechanism of allocation \ virtual memory \ paging straight. Let's say a process calls malloc(), what happens behind the scenes? my answer: The runtime library finds an appropriately sized block of memory in its virtual memory address spa...
stackexchange/codereview
What is the unit of the difference of two System.currentTimeMillis ? start = System.currentTimeMillis(); longoperation(); elapsedTime = System.currentTimeMillis() - start; What is the unit of elapsed time here. It doesn't look like milliseconds. Is the above code segment the right way to find the time taken to execute...
stackexchange/codereview
First...if no one can answer this question it's ok... because I don't know how to ask this question in the correctly description my program is get the plist data from URL and show it on the iphone tableview My colleagues give me two URL to get the plist data So I have two tableviews(tableview1,tableview2) two URLs(URL1...
stackexchange/codereview
In the past, when I've wanted to do a nice fade animation from one UILabel text to another, I chuck in the following: [UIView beginAnimations:@"fade" context:nil]; [UIView setAnimationDuration:0.25]; myLabel.alpha = 0.0; myLabel.text = @"Different string"; myLabel.alpha = 1.0; [UIView commitAnimations]; As you can pro...
stackexchange/codereview
I have a master page with a background and 3-column layout. The start page "default.aspx" is a content Web Form and is linked to the master page. At the design time, everything looks great but when run, the master page background is invisible. It disappears. How to fix this? ** Edited ** Master Page Form Code <html xml...
stackexchange/codereview
Possible Duplicate: How to only select numeric data from mysql? Hi, I want to select all values that are only numbers from the db, using SELECT column_name(s) FROM table_name WHERE column_name = '0..9' How do I get only numbers. Thanks Jean
stackexchange/codereview
Suppose I have a ListBox bound to an ObservableCollection and I want to animate adding/removing of ListBoxItems eg. FadeIn/Out, SlideDown/Up etc. How can I do that?
stackexchange/codereview
I have a table in which the following query works fine: select * from session_actions where action_type IN ('login_failed','channel_recorded') Now I'm looking forward to some thing like the following: select * from session_actions where action_type IN ('login_failed,channel_recorded') As you see I want to give t...
stackexchange/codereview
In my iphone app i have implemented the SearchBar on TableView. Now the SearchBar Searches the items but the searched items are not shown in the tableview as the NSMutableArray which fills up the table with the search results is not retaining the values. I have put the screenshot of the code and the NSLog statements fo...
stackexchange/codereview
Running with -Xmx1024m, trying to open 100 CSV files as CREATE TEXT TABLE, SET TABLE SOURCE. Somewhere in the middle getting OOM. Tried to reduce cache_scale to 1. Works better, but still OOM at some point. What's the reason? I've found that memory is aggressivelly used to allocate lot of org.hsqldb.PointerNode instanc...
stackexchange/codereview
I have setup JAMES email server on my local windows system. Now I am trying to send mail to my yahoo account but I am getting the following error 13/11/10 12:39:56 INFO James.Mailet: RemoteAddrNotInNetwork: Authorized addresses: [127.0.0.1/255.255.255.255, 0.0.0.0/255.255.255.255, 192.168.2.0/255.255.255.0] 13/11/10...
stackexchange/codereview
I'm using svnnotify to do post-commit email notifications for projects in a repository. I can use the -P option to specify a subject line prefix, but I'd like to use different prefixes for the different projects matched by multiple invocations of -x. For example, all projects matched by regexp r1 in a -x field should g...
stackexchange/codereview
What's the difference using root node to select and using document object to select nodes? Which way is preferred. For example, 1. XmlDocument Doc = new XmlDocument(); Doc.Load(mem); XmlNodeList nodeList = Doc.SelectNodes(@"//@id"); 2. XmlDocument Doc = new XmlDocument(); Doc.Load(mem); XmlElement root = Doc.Documen...
stackexchange/codereview
I have a main page in Python/Pylons project, which have multiple different blocks (e.g. news/demo/(registration|private zone)/...). My thought is that each block should be generated in a separate controller. How can I call another controller method in a main page controller?
stackexchange/codereview
In IIS 7.5 i configured my asp.net website for "http,net.pipe" in "Enable protocols". Note: net.pipe configuration is done to call another module within the website (SOA). Every thing worked fine with simple asp.net & net.pipe service invocation calling other module. But When i try to call RIA service from silverligh...
stackexchange/codereview
I ran into this error and couldn't figure what's missing: {"Could not load file or assembly 'xxxxx, Version=1.0.0.42, Culture=neutral, PublicKeyToken=c5067b3d1110b13c' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)":"xxx...
stackexchange/codereview
I want to fade in/out a ToolTip how can I achieve that? Also, I wonder if its a good idea to fix the position of the ToolTip? eg. always at bottom? I guess the ToolTip may go off screen? And suppose I want to do that, how can I do that? Position the ToolTip a fixed position relative to the parent
stackexchange/codereview
I am having some trouble working with curl and headers returned by servers. 1) My php file on my_website.com/index.php looks like this (trimmed version): <?php $url = 'http://my_content_server.com/index.php'; //Open connection $ch = curl_init(); curl_setopt($ch,CURLOPT_URL,$url); curl_setopt($ch, CURLOPT_RETURNTRAN...
stackexchange/codereview
Im creating a WCF Service application, I dnt want to give the URL to the client use rather I need to give a Single WSDL file. How I can do it?
stackexchange/codereview
Greetings all, I realize this issue has been posed before in other forms, and believe me, I have been searching the net for days trying to find the answer. However, I'm fairly new to Android and Java, and I need a little guidance please. I presently have two version of my app, one for Android 1.5 and 1.6, and another ...
stackexchange/codereview
Please help me if any have ans for this question. Thanks Prashant
stackexchange/codereview
C++ style vs. performance - is using C-style things, that are faster the some C++ equivalents, that bad practice ? For example: Don't use atoi(), itoa(), atol(), etc. ! Use std::stringstream <- probably sometimes it's better, but always? What's so bad using the C functions? Yep, C-style, not C++, but whatever? This is...
stackexchange/codereview
I just looked at the implementation of password hashing in Django and noticed that it prepends the salt, so the hash is created like sha1(salt + password), for example. In my opinion, salts are good for two purposes Preventing rainbow table lookups Alright, prepending/appending the salt doesn't really make a differenc...
stackexchange/codereview
I have the following trigger to avoid updating a certain column. ALTER TRIGGER [dbo].[MyTrigger] ON [dbo].[MyTable] AFTER UPDATE AS BEGIN -- SET NOCOUNT ON added to prevent extra result sets from -- interfering with SELECT statements. SET NOCOUNT ON; IF UPDATE(SomeID) BEGIN DECLARE...
stackexchange/codereview
In my Rails app (running on rails 2.3.5, ruby 1.8.7), my application_controller.rb file is not being loaded automatically when config.cache_classes = false in environment.rb. It's in the load path. If I add require 'application_controller' to the end of my environment.rb or set cache_classes = true, then the app works ...
stackexchange/codereview
Table 1 id name text 1 apple hi 2 apple hello 3 apple good morning 4 betty hello 5 betty good afternoon Hello, let's say I have this table what is the most efficient/simplest sql to get count of similar rows in this case, how many texts for each name such that I get the results combined into 1...
stackexchange/codereview