instruction_seed
stringlengths
1
35.8k
_source
stringclasses
1 value
I'm using the NXT toolkit addon for LabView 2009 and I'm trying to download a program, targetted to the NXT onto the brick. When compiling, it fails with the error. Error 1003: The VI is not executable. Most likely the VI is broken or one of its subVIs cannot be located. Select File>>Open to open the VI and then verify...
stackexchange/codereview
I have taken a registered table... and for each registered detail there must be a specific id to be created in another table... which will start from and the id must start from 001 , how to do? i have taken sql server 2005 database
stackexchange/codereview
In Android how can I change a value to a negative number? If I have the following code and have entered 10 for pos1_deg, how can I easily change this to -10 using a radio button? Is the answer to concatenate a string such as pos1_deg = "-" + pos1_deg? Or is there some mathematical command I can use? pos1_deg =(EditText...
stackexchange/codereview
Are there any advantages to using object-oriented programming (OOP) in a functional programming (FP) context? I have been using F# for some time now, and I noticed that the more my functions are stateless, the less I need to have them as methods of objects. In particular, there are advantages to relying on type inferen...
stackexchange/codereview
I have duplicated Drupal files and database in order to not work on production website. I have changed the database name in the settings.php of the new drupal. However when I login with the new Drupal, I always land on the old Drupal. Also when I click on any link in the old destination the url changes to the old one. ...
stackexchange/codereview
I want a user control called Segmented Panel that contains 3 buttons of which I want to modify their names (Title1/2/3) from a XAML screen. MainPage XAML: <local:SegmentedControl HorizontalAlignment="Left" Margin="43,62,0,0" x:Name="segmentedControl1" VerticalAlignment="Top" Title1="ENTER BUTTON NAME HERE" Title2="blah...
stackexchange/codereview
Please view the page linked below to understand the question. http://forecast.weather.gov/zipcity.php How would I go about finding the name of that city/state/zip text input field? I need to allow a user to enter the city, state or zip into my own text field and then submit that to the above website's form but I don't ...
stackexchange/codereview
I'm very new to using Linq-to-SQL, that's why I'm asking this question. I've searched the site, but can't seem to figure out how to do this. My problem is: I have a database mapped with LINQ to SQL: Table 1: PersonalTasks TaskId Header [Content] IsDone CreatedDate Table 2: Comments CommentId TaskId UserId Comment Crea...
stackexchange/codereview
I have a screensaver issue and I wondered if anyone could offer some advise please. I'm trying to create an .SCR screensaver file from a Flash file. The Flash file reads in a XML playlist and displays a series of videos and images like a sideshow sequentially. The problem is when the Flash swf to turned into a screensa...
stackexchange/codereview
I am having a common problem doing animationdrawable in Android. I wanted to start an animation when the Activity starts, in the onCreate() method, but as many people have found, it doesn't work. I have read lots of advice but nothing seems to work for me. If I start the animation in onClick() it works, it requires use...
stackexchange/codereview
The below line works. It prints Success. wchar_t * s1 = (wchar_t *) L"INSERT INTO OE(sqltext) VALUES('this text')"; if(WriteToSQL(s1) == 0) printf( "Success"); //Success else printf( "Failed"); I need to take user input to create dynamic sql. I need to do what L prefix is doing. When i take input and do...
stackexchange/codereview
I have the following code: <!DOCTYPE html> <html> <head> <style> .tl, .tr, .bl, .br, .b, .t { background: #f00; width: 16px; height: 16px; } .m { background: url('https://www.google.com/images/logos/ssl_logo...
stackexchange/codereview
I've tried some of the editors/IDEs regularly recommended for coding JavaScript (Aptana, WebStorm, ...) but none of them has a satisfying autocomplete functionality. I'm probably spoiled by Microsoft's IntelliSense for .NET. There is some JavaScript-IntelliSense in WebDeveloper, but that seems to be a stripped-down ver...
stackexchange/codereview
I'm reading a book called JavaScript patterns but there's one part where I think the guy is confusing. The guy actually led up in the book to the klass design pattern, where he developed it piece by piece. He first he presents the problem: function inherit(C, P) { C.prototype = P.prototype; } He says: "This gives you...
stackexchange/codereview
I have developed an app for Blackberry 5.0. Now I am trying to make the app available for 4.2 version onwards. I have used Blackberry 1.1 plugin for eclipse 3.5, but I can't get the 4.2 JDE to show up in my Eclipse update list - using URL http://www.blackberry.com/go/eclipseUpdate/3.5/java I manually downloaded the 4....
stackexchange/codereview
I know how to validate a field for numeric values, but how can you validate the field if invalid characters have been pasted into the field. Often we have a numeric field, and then an action button, and the numeric field may not fire a blur event when the action button is clicked. How can you force (re)validation in th...
stackexchange/codereview
Here is what I'm trying to do. I have a folder called Agui which is the lib's folder. In that folder there is another folder called Widgets. I want a file from Agui/Widgets to #include base.h from Agui folder. How should I do this so that it remains cross platform? Should I simply include <Agui/base.h> ? Thanks
stackexchange/codereview
I am installing a new setup on my laptop, so I have installed Helios version of Eclipse. I downloaded the Blackberry Plugin for Eclipse and during install, when prompted for the path to Eclipse, it stated that 3.6.x is not compatible, press CONTINUE to upgrade to 3.5.x [sic]. I chose to continue, but I am concerned. ...
stackexchange/codereview
I want to start a script remotely via ssh like this: ssh user@remote.org -t 'cd my/dir && ./myscript data my@email.com' The script does various things which work fine until it comes to a line with nohup: nohup time ./myprog $1 >my.log && mutt -a ${1%.*}/`basename $1` -a ${1%.*}/`basename ${1%.*}`.plt $2 < my.log 2>&1 ...
stackexchange/codereview
I want to make fade in/out effect for export session. But it doesn't work. Please help me! Trim works perfect! But fade in/out doesn't :((( NSURL *assetURL = [song valueForProperty:MPMediaItemPropertyAssetURL]; AVURLAsset *songAsset = [AVURLAsset URLAssetWithURL:assetURL options:nil]; AVAssetExportSe...
stackexchange/codereview
I am writing a code for linux kernel module and experiencing a strange behavior in it. Here is my code: int data = 0; void threadfn1() { int j; for( j = 0; j < 10; j++ ) printk(KERN_INFO "I AM THREAD 1 %d\n",j); data++; } void threadfn2() { int j; for( j = 0; j < 10; j++ ) print...
stackexchange/codereview
I'm creating a WPF file explorer treeview (in C# 4) and I need it to work with UNC. For example, lets say I have these shared networks folders: \\share\test1 \\share\test2 \\share\test3 \\share\test4 If I only have \\share, how can I determine what shared folders are within that path? \share is not a shared folder in ...
stackexchange/codereview
debugging in MonoDevelop does not work for me. First of all, I have installed MonoDevelop, GNU Debugger plugin and ctags through Ubuntu software center and I'm using Ubuntu 10.10. When I press "Debug" it goes into debug mode but very quickly returns to "normal mode". My simple application contains some scanf so it shou...
stackexchange/codereview
What are some good procedures to follow when handing a project to another developer, in cases of when the original developer will still be around for a couple of months to aid in the transition? Let's assume a medium-sized web application if a concrete example is necessary.
stackexchange/codereview
Our database has a bunch of records that have the same invoice number, but have different dates and different notes. so you might have something like invoice date notes 3622 1/3/2010 some notes 3622 9/12/2010 some different notes 3622 9/29/1010 Some more notes 4212 9/1/2009 ...
stackexchange/codereview
Consider this classical setup: entry table: id (int, PK) title (varchar 255) entry_category table: entry_id (int) category_id (int) category table: id (int, PK) title (varchar 255) Which basically means entries can be in one or more categories (the entry_category table is used as MM/join table) Now I need to query 6 un...
stackexchange/codereview
i am trying to get this query in magento. Select merk, option_id from catalog ....... group by option_id Sofar i have this but it aint showing the option_id value unfortunately and also i dont know how to group by them... i hope someone is willing to help me [code] <?php function getMenuWatches(){ $collection = M...
stackexchange/codereview
i have friendly urls active on my website, but the old ones still work, and google keeps indexing them instead of the pretty ones. The platform this is on is called prestashop. So i need to redirect this kind of urls: site.com/category.php?id_category=20 site.com/product.php?id_product=398 to this kind of urls: site.co...
stackexchange/codereview
One way of looking at the history of programming language design is that there was a revolution with the introduction of the subroutine. Twenty or thirty years later, two refinements of the subroutine call were seriously considered: Polymorphic messages Unification and backtracking I've just been programming in Prolo...
stackexchange/codereview
I have a base web site (Asp.net WebForms application) running under ie. http://localhost:90/ Then I created a new (this time Asp.net MVC) application and added it under http://localhost:90/mvc/ but not just as a simple virtual folder, but as an application folder by defining a different application pool to run it, co...
stackexchange/codereview
I'd like to know if exists some function to automatically format a number by it's decimal, so if I have: <?php // $sql_result["col_number"] == 1,455.75 number_format ($sql_result["col_number"], 2, ".", ""); // will return 1455.75 // $sql_result["col_number"] == 1,455.00 number_format ($sql_result["...
stackexchange/codereview
I wanted to sign my silverlight application. Followed these 2 links but I still get unverified. WHen I double click on the pfx file and the cer file, it told me import successful. But when I install as OOB, I still get unverified. Tried using the default VS2010 signing by creating a Test Cert, but still same problem....
stackexchange/codereview
I have a method with the following signature: public void foo(String... params); So all of these calls are valid: foo("Peter", "John"); foo(new String[] { "Peter", "John" }); But why is this one not valid? foo("Peter", new String[] { "John" });
stackexchange/codereview
I have tried to trawl through an amazing amount posts - really valuable, because there are other aspects that you can absorb even though it's not directly linked to the primary question. In my case, as the title says, I really want to try to understand the "real world" pros/cons of using static classes/methods for data...
stackexchange/codereview
I have this C++ code that shows how to extend a software by compiling it to a DLL and putting it in the application folder: #include <windows.h> #include <DemoPlugin.h> /** A helper function to convert a char array into a LPBYTE array. */ LPBYTE message(const char* message, long* pLen) { size_t length = strlen(...
stackexchange/codereview
Is there anywhere on the web where i can get an idea of what the various programming language syntax take in terms of processor (Core i7 and Core 2) cycles? At university i learnt the ARM assembly language and we could map the number of cycles taken to do a subtraction operator etc. I just wondered if its possible to d...
stackexchange/codereview
I am using the provided ASP.NET SQL Membership & Role providers in my application. How can I prevent that the same user does login from different workstations using the same credentials? I can imagine to use the IP address for this but I dont really know where to start from... Also what about users behind the same rou...
stackexchange/codereview
I expect the next will print "()" 10 times in a second. But it hangs after a second. Why? adaptE $ fmap print $ filterE (const True) $ atTimes [0.1, 0.2 ..] I found that it is related to liftM used in filterE: filterE :: (Ord t, Bounded t) => (a -> Bool) -> EventG t a -> EventG t a filterE p m = justE (liftM f m) wh...
stackexchange/codereview
I want to write a Maven plugin in Groovy, but under Eclipse (Galileo). I've downloaded and installed Groovy-Eclipse plugin I've created my very simple POM file (included below). I've created a simple Echo mojo and place it under "/src/main/groovy/com/acme/maven/plugins/foo". I performed "Import Existing Maven Projec...
stackexchange/codereview
I wanted to use ASMifierClassVisitor tool to get the asm code of creating a class but when I use it I get the error java.lang.NoSuchMethodError: org.objectweb.asm.ClassReader.accept(Lorg/objectweb/asm/ClassVisitor;[Lorg/objectweb/asm/Attribute;Z)V at org.objectweb.asm.util.ASMifierClassVisitor.main(Unknown Sour...
stackexchange/codereview
If I swap two vectors, will their iterators remain valid, now just pointing to the "other" container, or will the iterator be invalidated? That is, given: using namespace std; vector<int> x(42, 42); vector<int> y; vector<int>::iterator a = x.begin(); vector<int>::iterator b = x.end(); x.swap(y); // a and b still val...
stackexchange/codereview
I have a grid view with scroll bars permanently displayed. When i set the android:paddingRight property (of the GridView) to say 10dip the vertical scroll bar is shifted to the left as well. I don't want the scroll bar to shift to the left, i purely want extra white space between the scroll bar and the grid views tiled...
stackexchange/codereview
What files does the Microsoft Visual C++ 2008 Redistributable Package contain ? I would like to bundle the files with my application. Thanks
stackexchange/codereview
Excel 2007, different from Excel 2003, uses hotkeys like Alt+C, Alt+S, Alt+V like shortcuts to specific features. So if I use in a VBA module Application.OnKey("%C","ProcAltC") It doesn't work. In other words, pressing Alt+C doesn't call "ProcAltC" routine. How can I override that default shortcut behavio...
stackexchange/codereview
I have a requirement to use VB6 generated dlls in .Net code but I am confused because compilation of both are differnet. and I am not sure that if .Net run time refuse to use VB6 dlls.
stackexchange/codereview
I am creating a login-function on my website, and I am thinking about regenerating the session ID on every page to make things more secure. I have read PHP:s information about regenerate_id but the posts on the PHP page are quite different from the information they provide about session_regenerate_id. Could somebody ex...
stackexchange/codereview
I'm trying to replicate the functionality of facebook's status update where tags within the post are highlighted. E.g, you hit the '@' character, and autocomplete to a page you are a fan of, and then that tagged piece of the text is highlighted even as you continue to type. After digging into the dom, it looks like th...
stackexchange/codereview
I am trying to attach a SQL Server 2005 database to an instance of SQL Server 2005 Developer Edition (w/ SP3) installed on Windows 7 Professional. I am getting a permissions error. Msg 5120, Level 16, State 101, Line 1 Unable to open the physical file "D:\FolderName\DatabaseName.mdf". Operating system error 5: "5(Acc...
stackexchange/codereview
In my camera function i have an custom overlayview, its is a square in the middle of the screen. Works all fine on the iphone 3gs but if I am launching it on my iphone 4 im getting troubles with the button to switch to the front camera, somehow it gets blocked by the overlayview. How to fix this? Thanks in advance, Dav...
stackexchange/codereview
I was wondering is there a way to escape all html tags from a a bunch of html code, and extract only the text i.e. <strong>this is strong</strong> <br /> <h1> this is a header</h1> and I want to get the text between the tags only, so basically only this is strong this is a header
stackexchange/codereview
I'm having problem with Jquery on Drupal. Here is what I'm trying to achieve, I needed to get the html() of my primary link. For example one of my primary link have a sub menus/child menus. I need to get those child menus using Jquery. My problem is I can't retrive it using $("#menuID").html(), it always returns null....
stackexchange/codereview
I am using unordered map like unorderedmap.insert(make_pair(5, 6)); How could I get the iterator for the position of the key (value 5)? Do I need to use find() again or could I some how get it from the return value? Thanks.
stackexchange/codereview
I am using Ajax.BeginForm to submit data etc, but when I look at Request.Url etc I get the URL of the Ajax request. Is there a way I can get URL of the actual page the user is on? Basically, I need to obtain id (routevalue) from the URL without passing anything to the Ajax-actionlink.
stackexchange/codereview
I've created a movieclip spawner class and animator class which animate movieclips along a set of x,y points. I've used Greensock's TweenMax to accomplish the animation and I have set the speed to be 1 second between each point. The issue is that when the distance between two points is small it looks too slow. What I w...
stackexchange/codereview
I'm trying to combine several 1 bit ALUs into a 4 bit ALU. I am confused about how to actually do this in VHDL. Here is the code for the 1bit ALU that I am using: component alu1 -- define the 1 bit alu component port(a, b: std_logic_vector(1 downto 0); m: in std_logic_vector(1 downto 0); result: out std_logic_vec...
stackexchange/codereview
Native C++ library that I am using in C++/CLI project raises events giving me results, If I try to handle the event by extending the unmanaged event, it says the ref class can only extend ref class. I then tried to create a native event but have manged object inside it to collect the results, but I get the error cann...
stackexchange/codereview
I used RelayCommand of MVVM Foundation, now, when I try to use the "normal" ICommand, I don't really get how to use it, particularly "binding" it to variables used my my main class. I am just wanting to create a OkCommand that raises an event (RequestClose) in the main class, view model. Also, I want to enable it only ...
stackexchange/codereview
I've noticed an increasing number of Windows applications that do not have the usual non-client window borders and maximize/minimize/close buttons. Examples include the Zune player software and the MetroTwit Twitter client app. My question is: how does one do this without resorting to native API coding? Is it possible ...
stackexchange/codereview
I thought I knew scan in Ruby: as if it is doing a single match, but repeat it for all results and put into array? ruby-1.9.2-p0 > "hello world".scan(/\w{2}/) => ["he", "ll", "wo", "rl"] ruby-1.9.2-p0 > "hello world".scan(/(\w){2}/) => [["e"], ["l"], ["o"], ["l"]] How come the second line resulted that -- and how...
stackexchange/codereview
I have a PreferenceActivity with settings for my app and I want to refresh activity if some preferences was changed. For example I have a checkbox which responsible for addtional tab in my layout, when checkbox is checked tab must be shown. To catch this event I used OnSharedPreferenceChangeListener. But this listener ...
stackexchange/codereview
I have a macro in my excel workbook that updates a specific record in the access database related to the spreadsheet. All works fine if the access database is closed. Problems arise if the database is open and a user is editing the specific record that the excel spreadsheet relates to.` I get the following Error Messag...
stackexchange/codereview
I have a wordpress website, and I want to create a simple web commerce. When I mean simple, it's really simple: Some posts/pages are going to have a custom field named "price". These pages are going to have a link on it, and clicking on it, the user is going to be sent to a simple shopping cart. From the shopping cart,...
stackexchange/codereview
I have a (likely common) case where I would like to reuse the same class for both adding a new entity and editing an existing entity in my silverlight app (SL4, WCF RIA, EF4, Linq-to-Entities). When adding a new one, I would like my custom validator to check for uniqueness and fail if it's not unique. However, when edi...
stackexchange/codereview
My applications uses SQLite for data storage. Everything was ok, but one day someone corrupted the data file and now application cannot read it. I cannot understand what is wrong specifically, but there are two things I know: 1) $result = sqlite_query($query,$db_path); When this code runs with the old backup (which,...
stackexchange/codereview
Hope you're all well. I am using Caliburn.Micro with Telerik's WPF controls to build a tabbed interface. Using RadTabControl I have the following code; <telerik:RadTabControl x:Name="Items" Grid.Row="1" TabStripPlacement="Bottom"> <telerik:RadTabControl.ItemTemplate> <DataTemplate> <StackPanel O...
stackexchange/codereview
Disclaimers first: I'm dealing with a legacy database with a pretty bizarre schema. Plus, I'm a complete SQL noob, so that's not helping either. Basically, I have a table that has product variations. A good example might be t-shirts. The "generic" t-shirt has a product id. Each type of variation (size, color) has an id...
stackexchange/codereview
I have a Django 1.1 model with unique_together on the owner and title where owner is foreign key on a user. This constraint is enforced but only after the clean. According to Django docs, I should be able to access self.instance to see non-form field object properties of a model instance. However, I get the error 'Jo...
stackexchange/codereview
Lets say I have two maven projects: moduleA and moduleB. moduleA has a dependency to moduleB in it's pom.xml. I use IntelliJ Idea, and I have 'Maven Projects' tool window, where I have both these maven projects. And it is possible to run maven plugin goals from there: I open 'Maven Projects' -> moduleA -> Plugins -> j...
stackexchange/codereview
I want to know that how many sites like jqueryui, etc. build online zip packages for download. And how it can be done in asp.net ?
stackexchange/codereview
I have to code for a operating system on which I can run a calculater.It is like a desktop calculater. For this I am reading the brokenthorn operating development series I have completed the second stage of bootloader The bootloader is in real mode. After this the author is explaining the protected mode. I don't want t...
stackexchange/codereview
I need to log-in using phpMyAdmin my user to MySQL server. I have my control panel, and i want put button "log into MySQL server as user1, user2, user3", when user click, it should open phpMyAdmin credits logged as user1, etc. I can generate via PHP form, with POST field, contain MySQL login data (password, login), and...
stackexchange/codereview
It is possible to store some application files and share it with another application? Can application A remove files created in such shared space by application B?
stackexchange/codereview
I'm using django.contrib.comments for allowing users to comment on a blog. How is it possible to make the comments display on the Django Admin /admin/comments/comment/ and make them clickable for editing? [Here should be an image, but since this is my first question and I have no credit, it is not allowed to include im...
stackexchange/codereview
When I try to invoke a Java service from an apex class with the wsdl2 apex class I get this error. Can anyone help me please? System.UnexpectedException: Got an unexpected error in callout : null. Contact support with error ID: 1502628612-2761 (-677061709)
stackexchange/codereview
In hierarchy viewer there are several IDs as shown above, for example "id/timepicker_input". But I can't find a respective timepicker_input - ID when typing myNumberPicker.findViewById(android.R.id. ...? ); So how to access these Views by their ID?
stackexchange/codereview
Consider a MxN bitmap where the cells are 0 or 1. '1' means filled and '0' means empty. Find the number of 'holes' in the bitmap, where a hole is a contiguous region of empty cells. For example, this has two holes: 11111 10101 10101 11111 ... and this has only one: 11111 10001 10101 11111 What is t...
stackexchange/codereview
Right now I have: $("#myElement").bind("buildTimeline", function (event, newViewObj) { curDomObj = $(this).children(".timeline"); //this refers to #myElement curDomObj.draggable({ axis:"x", drag:curDomObj.trigger("drag") }); }); I'd much rather just have one chain, but is there a way to re...
stackexchange/codereview
I'm coding a web crawler and I've been using WWW::Mechanize::Firefox to navigate some pages (for the others I use WWW::Mechanize) which keep loading content after the page loaded and I've never had an issue with that. Yesterday I added DBI and DBD::mysql to the script, adding queries to export data to a database (this ...
stackexchange/codereview
How can I cross compile my GTK+ app (written in C) from Linux to Windows? Could I just replace the "gcc" command with "mingw32"?
stackexchange/codereview
I have a question, which I was unable to Google because I really don't know the proper terminology for it, if concept exists that is. My question is this; Imagine having a while loop in C, which does 1 inline assembly instruction __asm { mov eax, ebp }; Then we would print it's output with printf, respectively. But wo...
stackexchange/codereview
I need to be able to export some data that is received from a stored procedure in SQL Server 2008. Once the data is returned I need to be able to output it or export it to a new excel spreadsheet. What is the easiest way of doing this, Can LINQ do this? or am i forced to use XSLT? I presume that i must first convert my...
stackexchange/codereview
hey, i have a dictionnary like "key2","value2" "key3","value3" "key1","value1" is it possible to sort it on value ? If not, any other object can do same thing? (sort value on key/value pair)
stackexchange/codereview
I am using a mobile network based internet connection and the source code is being rewritten when they present the site to the end user. In the localhost my website looks fine, but when I browse the site from the remote server via the mobile network connection the site looks bad. Checking the source code I found a pi...
stackexchange/codereview
I have a csv file with 160 columns and several lines of row data (1st column names, 2nd and further data). Columns are seperated by a ; and rows by , When opening the file in Excel is it formatted like this for example: A B C D E F 1 2 3 4 5 6 7 8 9 10 11 12 I want to read the CSV file in C# and use LINQ ...
stackexchange/codereview
How can I (using NHibernate) get all the entities that are joinable with certain entity? For example: Assume that we have the following tables as illustrated in the picture below: The joinable tables for Customer would be Contact and CustomerType. Assume that I'm using NHibernate and mapping each table of those to ...
stackexchange/codereview
I've worked on a CMS which would use Smarty to build the content pages as PHP files, then save them to disc so all subsequent views of the same page could bypass the generation phase, keeping DB load and page loading times down. These pages would be completely standalone and not have to run in the context of another s...
stackexchange/codereview
How do i find out programmatically if the wpf user control has been displayed? I cannot use the Loaded event because when the Loaded event gets fired the view is not displayed. I am looking for something when the view has been displayed.
stackexchange/codereview
I have the following code -(IBAction)ATapped:(id)sender{ //want some way to hide the button which is tapped self.hidden = YES; } Which is linked to multiple buttons. I want to hide the button which triggered this IBAction. self.hidden is obviously not the button. How do I hide the button which was tapped? The sender...
stackexchange/codereview
I am having some trouble with a scrapy pipeline. My information is being scraped form sites ok and the process_item method is being called correctly. However the spider_opened and spider_closed methods are not being called. class MyPipeline(object): def __init__(self): log.msg("Initializing Pipeline") ...
stackexchange/codereview
Is there any (non-microoptimization) performance gain by coding float f1 = 200f / 2 in comparision to float f2 = 200f * 0.5 A professor of mine told me a few years ago that floating point divisions were slower than floating point multiplications without elaborating the why. Does this statement hold for modern PC arch...
stackexchange/codereview
I am looking for a library which would give me the exact coordinates of each node in a tree (any tree, not just binary trees). Let's say I define the tree in the following notation (() (() (() () ())) And some library gives me the coordinates like this: [500 0]([200 50]() [600 50]([500 100]() [750 100]([600 150]() [7...
stackexchange/codereview
What is the suggested approach or best practice for handling exceptions in tiered applications? Where should you place try/catch blocks? Where should you implement logging? Is there a suggested pattern for managing exceptions in n-tiered applications? Consider a simple example. Suppose you have a UI, that calls ...
stackexchange/codereview
I'm working on fast 64-bit hash. Many existing secure hash functions are too way slow, some non-cryptographic hash functions like FNV are just bad. Well, I came up with a FNV-like hash: UINT64 hash=0; // for each input byte hash=(hash^(input_byte+1))*HASH_PRIME; Main question is about HASH_PRIME. Often, we may see a ...
stackexchange/codereview
I've got wiki style content which is sanitized and stored in another field of the db for output as html. The original body field I'm not sure how to deal with as when I santize it characters are escaped and don't display well in the textarea. What are the dangers of unsafe content in textareas? I'm sure I read previous...
stackexchange/codereview
I have dropdown menu and its made via a list and position absolute, however the dropdown links are very very very small area and do not cover the text completely. How can I fix this? Example http://outreviews.com/v%202/index.html (the dropdown menus)
stackexchange/codereview
Is there any way to do this? There are a few users who continuously write bad reviews for all my apps immediately after every update. They're always pointing out competitor apps in an aggressive way. And they come from the countries where those competitors live. I am sure they ARE the competitors or hired by the compet...
stackexchange/codereview
I was reading on internet these statements about SQL Server data types: VARBINARY(MAX) - Binary strings with a variable length can store up to 2^31-1 bytes. IMAGE - Binary strings with a variable length up to 2^31-1 (2,147,483,647) bytes. Is there a really big technical difference between VARBINARY(MAX) and IMAGE dat...
stackexchange/codereview
I want to create a PostgreSQL database on a Heroku server. My database.yml is production: adapter: postgresql encoding: utf8 database: ddb username: postgres port: 5432 password: admin host: localhost When I run heroku rake db:create it gives me the error: mydatabase already exists (in /disk1/hom...
stackexchange/codereview
I'm using application resource plugins in a .ini file to set up my Zend_Translate with this code: resources.translate.data = APPLICATION_PATH "/../languages" resources.translate.adapter = "gettext" resources.translate.options.scan = "directory" Now I would like to add the log functionality to the translate, which in...
stackexchange/codereview
This question is an extension to previously answered question How to give cname forward support to saas software Sample sites - client1.mysite.com client2.mysite.com ... clientN.mysite.com Create affinity by say client[1-10].mysite.com to be forwarded to europe.mysite.com => IP address. Another criteria is it should ...
stackexchange/codereview