instruction_seed
stringlengths
1
35.8k
_source
stringclasses
1 value
I have the following code: #include <stdlib.h> #include <stdio.h> typedef void (*func_t)(void * data); void func2(int * arg, func_t free_func) { free_func(arg); } void func(int * a) { printf("%d\n", *a); } int main(int argc, char ** argv) { int a = 4; func2(&a, func); return ...
stackexchange/codereview
I have an application in which an action triggers a number of emails to be sent out. The number of emails is variable and can be anywhere from 10 to 1,000 per action. I don't want the application to hang while the emails are being sent (thus annoying the user) and would like to send them in the background. I haven't us...
stackexchange/codereview
var str = "abcd1234"; var first = str.match(/^abcd(\d+)$/)[0]; //matches abcd1234 var number = str.match(/^abcd(\d+)$/)[1]; //matches 1234 only Why does this regex first match the whole of str and then match the numeric part? Looking at it I'd say it would always have to match abcd and then 1 or more digits? Isn't the...
stackexchange/codereview
I got my iPad yesterday, once synced all iPhone apps synced to iPad. Some of the apps "auto" adjusted to the iPad format while other where in iPhone format. How does that technically work? Or rephrase: How do I as app developer deploy both iPad och iPhone at once for both formats with that "auto" behavior? BR
stackexchange/codereview
I do not want to use tables. I want to make a styling file, such that it can be applied to all pages I want. It's like a template, using css note I am a beginner using this "css" yes there are numerous tutorials, that's the main problem. Please give specific examples and links which would help. Also, is it possible t...
stackexchange/codereview
It seems like Rails' console (script/console or rails console) is like in a controller, but self.class gives Object (Rails 3.0.1 with Ruby 1.9.2), so is it controller or none of M, V, or C?
stackexchange/codereview
I'm reading App Engine's documentation and i saw that i could nest some imports, for example: from google.appengine.ext import db, webapp #so on Is it a bad thing to do so? If it's not (since it works), what's the limit/advantages/disadvantages of that?
stackexchange/codereview
Sometimes in books I see this syntax for list and sequence comprehensions in F#: seq { for i = 0 to System.Int32.MaxValue -> i } This is from Programming F# by Chris Smith, page 80. In the F# which comes with VS2010, this doesn't compile. I believe -> has been deprecated. (See Alternative List Comprehension Syntax)...
stackexchange/codereview
I have table with ID, startIPNum and endIPNum. startIPNum and endIPNum are already converted long numbers not IP strings. Following query works and takes somewhere between 3000 and 3200 ms List<GeoIP> oneResult = new LinkedList(getHibernateTemplate().find( "from GeoIP where "+ipNum+" >= startIpNum and "+ip...
stackexchange/codereview
I have the [assembly:InternalsVisibleTo("GuiAssembly")] set in the other assembly but when wpf binding occurs on a class that lives in the other assembly, it throws an exception because of the property in that class being internal. I know this works with other applications but not sure why it is not working with this p...
stackexchange/codereview
I have these def MsgBox1_YesChosen(sender,e): if e.Key != "A": function0() else: function1() function2() function3() def MsgBox1_NoChosen(sender,e): if e.Key == "A": function0() else: function1() function2() function3() can both def be merged togethe...
stackexchange/codereview
As part of the deployment process for our rails 2.3 app, I'd like to save static versions of our error pages to the public folder. How do I get the rendered output of a controller's action without visiting the web page? I know it can be done because the functional tests do it - if I say get :errors, :id => 404 then ...
stackexchange/codereview
helper.method_name worked in some version of Rails... are there ways that work in both Rails 2.2.2, 2.3.5, and 3.0.1? (to use all view and helper methods)
stackexchange/codereview
in matlab you can color the area between two lines printed on a plot. The following code prints a dynamic plot. figure('doublebuffer','on') t=0; r=32; g=32 axes('xlim',[0 24], ... 'nextplot','add') p1=plot(t,r,'r','LineWidth',2); p2=plot(t,r,'b.','MarkerSize',15); p3=plot(t,g,'b','LineWidth',2); p4=plot(t,g,'g.',...
stackexchange/codereview
If significant changes are done to a project structure and simple source checkout wouldn't cut it, we have "changes.txt" file in a project that describes what extra actions are required: 10/10/2010: New table field, run following query: ..... 10/11/2010: Library X was replaced with library Y, copy it to tomcat folder ...
stackexchange/codereview
I'm using Microsoft Unity. I have an interface ICustomerService and its implementation CustomerService. I can register them for the Unity container using the following code: container.RegisterType<ICustomerService, CustomerService>(new TransientLifetimeManager()); If CustomerService has a certain parameter in its cons...
stackexchange/codereview
I am looking for a set of tools to help me design a GUI for an embedded device with limited resources embedded device overview: runs c code has an external EEPROM has 16-characeter lcd (it's no iphone) has keypad has limited amount of RAM (cannot contain all gui data in memory) and computing resources GUI overview:...
stackexchange/codereview
Not sure what I am doing wrong here. When I try to check the dictionary either by a specific key or allkeys I either get an error or null. (I know I'm using a string where I could be using a boolean for the conditional I just like having a check like that say true or false instead of YES and NO. Add that to my OCD list...
stackexchange/codereview
I'm currently teaching myself Python and was just wondering (In reference to my example below) in simplified terms what the sys.argv[1] represents. Is it simply asking for an input? #!/usr/bin/python3.1 # import modules used here -- sys is a very standard one import sys # Gather our code in a main() function def mai...
stackexchange/codereview
Its been noted that access to data elements that fall in same cache-line performs badly due to ping-pong effect. However, the code I wrote doesn't and tested with valgrind --tool=cachegrind doesn't show this behaviour. Would appreciate any insights regarding this?. Attached below is function that each pthread execu...
stackexchange/codereview
I create the following array using searchlogic named_scopes: todos = Todo.asset_is("Email").asset_id_is(self.id) For each value in the array, there is an attribute called original_date and current_date. I need to make changes to those with some logic, such as: difference = (original_date - date_entered) - self.days ...
stackexchange/codereview
I need to do: if user go to test.com then server must redirect to main.com/check.php, checks something and return back to test.com .htaccess: RewriteCond %{HTTP_HOST} !^main\.com$ [NC] RewriteRule ^(.*)$ http://main.com/check.php?url=%{HTTP_HOST}%{REQUEST_URI} [L] check.php header("location: http://" . $_GET['url']); ...
stackexchange/codereview
I developed a Windows application with 3D Animation for flipping, which code is present in my profile.Now while I am going to Browser kind of thing in it to improve my application and for Browser implementation I tried with a WebBrowser and also with a WindowsFormHost in Viewport2DVisual3D inside the ViewPort3D Control...
stackexchange/codereview
In a Windows Phone 7 page I have the following control: <controls:Pivot x:Name="Pivoter" Title="{Binding Name}" TitleTemplate="{StaticResource PivotTitleTemplate}" HeaderTemplate="{StaticResource PivotHeaderTemplate}" ItemsSource="{Binding Items}" ItemTemplate="{StaticResource DisplayItemDataT...
stackexchange/codereview
I'm trying to implement the function below. Would it be best to use some type of regex here? I need to capture the number too. function endsWithNumber($string) { $endsWithNumber = false; // Logic return $endsWithNumber; }
stackexchange/codereview
i want to implement the following .how would i do this in c ? id ::= letter { letter | digit | _ } | _main letter ::= a | b | c | d | e | f | g | h | i | j | k | l | m | n | o | p | q | r | s | t | u | v | w | x | y | z | A | B | C | D | E | F | G | H | I | J | K | L | M ...
stackexchange/codereview
i want my jsp page to display the operating system information to the user.
stackexchange/codereview
Let's suppose we have a base class which has a virtual method: class BaseClass { virtual void MethodToOverride() const { DoSomething(); } }; And a derived class which overrides the method (depending on the situation we can make it again virtual or not): class DerivedClass : public BaseClass { v...
stackexchange/codereview
I have been given a task of toggling nearly 200 users' permissions in an admin. I have access to the database, and I'm sure I can do this in SQL but I'm curious to find out how to do it this way as well, plus I suspect it will be less work because I don't have to study the SQL that's going on and I know exactly what to...
stackexchange/codereview
I'm trying to convert quite big project from .net 3.5 to .net 4.0 and we have wwf 3.5 in it. Googling this question i realized that i would need to rewrite workflow almost from scratch. so my question is , if i can use .net 3.5 workflow in .net 4.0 project ?
stackexchange/codereview
I found this helper code from rob allens' Zend_Auth login/logout tutorial class Zend_View_Helper_LoggedInAs extends Zend_View_Helper_Abstract { public function loggedInAs() { $auth = Zend_Auth::getInstance(); if ($auth->hasIdentity()) { $username = $auth->ge...
stackexchange/codereview
I'm trying to learn about strings, but different sources tell my to include different headers. Some say to use <string.h>, but others mention "apstring.h". I was able to do some basic stuff with apstring, but I've been told the other one is more powerful. When I include <string.h> and try to declare some string varia...
stackexchange/codereview
I'm developing my first iPhone app that downlaods some JSON data and presents it in a series of UITableView. I have a fundamental question about the place in the code where I should put the NSURLRequest. Most of the samples I've studied, including the LazyTableImages provided by Apple, starts the request in the App Del...
stackexchange/codereview
I get the following error when trying to compile swftools-0.9.1 or the current source on a EC2 small instance (which is only 32bit): make[1]: Entering directory `/home/ubuntu/src/swftools-2010-10-12-2000/lib' gcc -c -DHAVE_CONFIG_H -I/usr/include/freetype2 -fPIC -Wimplicit -Wreturn-type -Wno-write-strings -Wformat -O...
stackexchange/codereview
I'm trying to connect to a load-balanced virtual host specified in tnsnames.ora in my Grails application in DataSource.groovy, with no luck - it (obviously) throws an "Unknown Host Specified" exception. The tnsnames entry looks like this someServiceName = (DESCRIPTION_LIST = (FAILOVER=ON) (LOAD_BALANCE=ON) (D...
stackexchange/codereview
How can I calculate an age in years, given a birth date of format YYYYMMDD? Is it possible using the Date() function? I am looking for a better solution than the one I am using now: var dob = '19800810'; var year = Number(dob.substr(0, 4)); var month = Number(dob.substr(4, 2)) - 1; var day = Number(dob.substr(6, 2...
stackexchange/codereview
I'm trying to setup custom error pages. I put the pages in /error/ in the document root. However, I think this may have a conflict as .htaccess can not access the file I specified. I did set AllowOverride All in my apache config file. If I go to /error/, a 403 error appears. I can confirm that my .htaccess is being rea...
stackexchange/codereview
I want to know whether there is an effect on program efficiency by adopting object oriented approach to a problem as compared to the structured programming approach in any programming language but specially in c++.
stackexchange/codereview
I am using Jquery Tools and Jquery. I include the 2 libraries separately. I have chosen to use the Jquery tools effect: Overlay: Loading External Pages Into Overlay. ( I am a new user on stack overflow so I get 1 hyperlink per post- i saved it for below) The tool works beautifully in firefox and chrome. the css for t...
stackexchange/codereview
I have a UINavigationController in which I push / display several other UIViewControllers. I would like a specific title and button (a Cancel button to be precise, which appears on the right-hand side) to always appear in the UINavigationController's UINavigationBar regardless of the view controller being displayed wit...
stackexchange/codereview
How to assign one type of object to another type of object value in apex language
stackexchange/codereview
If you hover the mouse over the underlined table headings on this page, a tooltip appears However, in IE7, the tooltips appear about 300px above their intended position, and on the first table, they don't appear at all. Also, the tooltips are not as nicely styled when shown in IE, e.g. the corners aren't rounded, and...
stackexchange/codereview
I need a script that converts plain text into HTML (eg like the one in reddit comments system). There are plenty of those out there, yeah, but I need one that could work with Google App Engine (and Python). It could be great if the script could work both ways: for encoding the text and decoding it back from HTML (for ...
stackexchange/codereview
I have an iPad app with UI written in OpenGL ES 2.0, some UI elements are hidden by default and when I need to show them there is pretty big delay before they actually shown (about 300-500 ms on a control which contains about 20 other controls inside), using Instruments.app I determined that when I render every unique ...
stackexchange/codereview
I can get particular validator using Page.Validators[0] Can anyone tell me is there a way to get a specific validator searching using its ID?
stackexchange/codereview
when I double click setup.exe, then click on the Install VS 2010 link, nothing happens. I've tried running as administrator, to no avail. this means I have VS 2010 but I can't use it fml. Please help! thanks.
stackexchange/codereview
I have a file with various 'return BBQ;' statements. I'd like to change them all to 'exit(BBQ);\nreturn BBQ;' (with BBQ being an arbitrary value). Is this possible?
stackexchange/codereview
I have an array "$a" and the below code in my view displays all the elements in a single column. How do I display them into 5 columns? <ul> <% for w in $a %> <%= w %><br/> <% end %> </ul>
stackexchange/codereview
How can I control the browser's native textarea highlighting? Twitter's status textarea is a good example for that. They fade in a lighter border. Can it be removed completely? Thanks!
stackexchange/codereview
How can I get the active element(focussed textbox or rich text box) from a JavaScript bookmarklet? I want to change the text of a focussed textbox or rich text box when someone clicked on my bookmarklet. Is it possible?
stackexchange/codereview
Does the .NET BCL have an immutable Set type? I'm programming in a functional dialect of C# and would like to do something like new Set.UnionWith(A).UnionWith(B).UnionWith(C) But the best I can find is HashSet.UnionWith, which would require the following sequence of calls: HashSet composite = new HashSet(); composite...
stackexchange/codereview
How do you add a new line to a c++ string? I'm trying to read a file but when I try to append '\n' it doesn't work. std::string m_strFileData; while( DataBegin != DataEnd ) { m_strFileData += *DataBegin; m_strFileData += '\n'; DataBegin++; }
stackexchange/codereview
I'm really new to Rails (for coldfusion) and before I even start coding I want to make sure I understand the convention and apply it right. One of my concern is the following situation using Rails convention: I create a table called users I create a model called User.cfc I create a controller called Users.cfc create a...
stackexchange/codereview
#include <stdio.h> #include <stdlib.h> #include <fcntl.h> #include <unistd.h> #include <sys/types.h> #include <sys/mman.h> #include <sys/stat.h> #include <errno.h> int main(int argc, char *argv[]) { int fd, offset; char *data; struct stat sbuf; int counter; if (argc != 2) { fprintf(stderr,...
stackexchange/codereview
I am just looking for a simple tutorial/example to put me in the right direction, I cannot seem to find a good simple one. I am looking for a tutorial that explains how to share memory (not using pipes and files, but actual memory) between a parent and a child (using fork) process in UNIX (Solaris) in C. I really appre...
stackexchange/codereview
I have an app I'm trying to deploy and something is concerning me about security. Is there a way to avoid storing my e-mail password in plain text in setup_mail, and my database passwords in environment.rb?
stackexchange/codereview
I'm trying to follow this example http://www.boost.org/doc/libs/1_42_0/libs/serialization/doc/serialization.html#constructors but I keep getting errors. Following the example, I get an error trying to access a private variable (fair enough): bs.cpp:10: error: ‘const int my_class::m_attribute’ is private But, if I add...
stackexchange/codereview
I'm integrating facebook in my iphone app. I placed a button "Post" and when clicked, its showing "Facebook Login" view. I'm entering the credentials. Then did login delegate, i'm posting the message. Now,its showing the message view with two buttons at the bottom "Skip" and "Publish". "Publish" is working fine. When "...
stackexchange/codereview
What I'm trying to do is dynamicly edit a panel and readd it to the (Border)layout. The panel contains textfields and I want the user to be able to add or remove textfields to the panel. What I tried is the following: remove the panel from the layout, add another textfield to the panel, readd the panel to the layout. H...
stackexchange/codereview
hey guys, i found a very intersting website template that has in it's header file the following lines: (function($){ $(function(){ …normal jquery }); // end of document ready })(jQuery); // end of jQuery name space what does that mean? i thought if i want to use domready i hav to write: $(document).ready(function...
stackexchange/codereview
I have a construction that checks if a checkbox is checked (who can use more words 'check' so close to each other? =)) when the document loads and if it's checked, some rows in the table get hidden. It looks like this: if (jQuery('#navbar_disabled').is(':checked')) { jQuery('#navbar_disabled').parents('tr').pre...
stackexchange/codereview
I have a YouTube video embedded in my page. It is hidden (display:none). You need to click one of the video link buttons to display the video and play it. The links are defined like this: <a href="javascript:play('xxxxxxxxxxx')">Video 1</a> <a href="javascript:play('xxxxxxxxxxx')">Video 2</a> xxxxxxxxx represent YouTu...
stackexchange/codereview
I spoke to the boss of a major music software company a few years ago. He told me that if they were going to start again from the ground up, they might look at WebKit for their UI. This totally surprised me. But I'm wondering if other folks are thinking and acting this way. Is webkit working its way in to truly non-web...
stackexchange/codereview
how to handle the ajax response data in one place before the other handlers In my web application,I use a lot of $.ajax method to send request to the server and get the response data,and I also use some jQuery plugin like jsTree,datatables etc.(I use these plugin's ajax data source), and the app have a permission contr...
stackexchange/codereview
Is there a way to load a java library (.jar file) at runtime, if it is not on the classpath?
stackexchange/codereview
I have a listbox containing some items that have a template. The items are created at runtime. The template triggers an scale animation when the mouse is hovering over a ListBoxItem. I would like to change the background of the item when the user clicks the item. The code below does not work because I believe the IsMou...
stackexchange/codereview
In Programming in Scala: A Comprehensive Step-by-Step Guide, the author said: One way in which Scala is more object-oriented than Java is that classes in Scala cannot have static members. Instead, Scala has singleton objects. Why is a singleton object more object-oriented? What's the good of not using static ...
stackexchange/codereview
Bazaar User Reference export section contains: Purpose: Export current or past revision to a destination directory or archive. Usage: bzr export DEST [BRANCH_OR_SUBDIR] This command: bzr export --format=dir . lp:stevedore Creates the entire tree from the lp:stevedore branch without the .bzr directory. Can export be...
stackexchange/codereview
I am a newbe to android and have been following the tutorials posted online to experiment with coding for android. I am trying to display a list which has input from two different arrays, but every time i run the code i keep on getting a force close and can seem to figure out what i am doing wrong. here is my code ( th...
stackexchange/codereview
i have a html page sth.html containing <div id="recoverpass"> <h2>Recover Password</h2> <form action="#" method="post" name="recoverpass"> <p><label> Enter E-Mail Address: </label> <input type="text" name="email" id="name" /></p> <input type="submit" value="Recover Password" /> </form> </div...
stackexchange/codereview
I am going to execute a Process (lame.exe) to encode a WAV file to MP3. I want to process the STDOUT and STDERR of the process to display progress information. Do I need to use threading? I can't get my head around it. Some simple example code would be appreciated. Thanks
stackexchange/codereview
I'm setting up a proof-of-concept site and it seems that standard web design software doesn't hide the Razor syntax (which isn't a suprise). What does bother me is that my overzealous designers will delete these code blocks and replace it with Lorem Ipsum text. This worked fine with the ASPX syntax, since the angle b...
stackexchange/codereview
I have a web-site. We are using TinyMCE as our text editor. I just upgraded to the newest version and added the media plugin so our users can add videos to their enteries. The upgrade works great on Chrome, FireFox, IE7. However, it does not work with IE8. The frame around the editor disappears along with the toolb...
stackexchange/codereview
Is it possible to restart tomcat via JMX? Does tomcat has any mbean that supports restart of all its apps and services?
stackexchange/codereview
Using ActiveX - FileSystemObject I would like to: - Open an existing file - Read the first 28 bytes from it and store them in var str1 - Read the next 1000 bytes from it and store them in var str2 - Create a new file with this content: str1 + text_param + str2 This is my Javascript code: function exportFile(text) { ...
stackexchange/codereview
I'm working on a CMS in Python that uses reStructuredText (via docutils) to format content. Alot of my content is imported from other sources and usually comes in the form of unformatted text documents. reST works great for this because it makes everything look pretty sane by default. One problem I am having, however, ...
stackexchange/codereview
Possible Duplicate: Haskell Error: Couldn't match expected type Integer&#39; against inferred typeInt' How can I convert Int to Integer in Haskell?
stackexchange/codereview
I have been having tremendous trouble getting this to work. There is no reason (to my knowledge) that this shouldn't work. var xpath = '/course/module[@id=\''+modId+'\']/child::*'; var getData = sxe(xmldoc, xpath); var result = getData.iterateNext(); The function returns the xpath. Just looks cleaner. This works 100%....
stackexchange/codereview
I was expecting a flash notice when authentication failures occurs in devise. But get nothing during a authentication failure, just the page refreshes and remains still. I didn't change any stuffs. The default devise installation itself is not displaying flash errors with invalid authentication attempt. I just insta...
stackexchange/codereview
I am trying to allow for voting on posts in a Ruby on Rails blog that I created. I don't really want to go the plugin or gem route because I think I am close. Here is the situation: I am displaying all my posts in /posts/index.html.erb through the partial _post.html.erb. With each post I am rendering the following code...
stackexchange/codereview
I just started with OpenGL programming and I am building a clock application. I want it to look something simple like this: https://i.stack.imgur.com/E73ap.jpg However, my application looks very "un-anti-aliased" : https://i.stack.imgur.com/LUx2v.png I tried the GL_SMOOTH_POLYGON method mentioned in the Red Book. Howev...
stackexchange/codereview
in ASP-vbscript, I can use the GetFolder method of FileSystemObject to get the contents inside a folder if i pass the location of the folder Set fso = CreateObject("Scripting.FileSystemObject") Set folder = fso.GetFolder(Server.MapPath("myfolder")) Can i use the same method with a url instead of foldername like Se...
stackexchange/codereview
I have the word "subclass" in the title because that's the only idea I have for doing this, but maybe not? What I need is to only use the years of a calendar control - I don't need either the months view nor the days view. I thought of writing a custom control that does this, but since calendar already has the very coo...
stackexchange/codereview
How to find the number of occurrence of every unique character in a String? You can use at most one loop. please post your solution, thanks.
stackexchange/codereview
How can we configure JNDI using tomcat server similar to JBoss server using jboss-web.xml? Please help me on this? I want to know which file we need to write it? or is there any programmatic way to do this? Thanks in Advance, Pravin
stackexchange/codereview
What is the simplest way to tell if a user is using a mobile device to browse my site using PHP? I have come across many classes that you can use but I was hoping for a simple if condition! Is there a way I can do this?
stackexchange/codereview
I am trying to debug a small prototype for an iPhone App (iOS Simulator 4.1), compiled as Debug, with all the configuration apparently ok. The application makes use of Cocos2d graphic engine and GDataXMLNode library (for XML reading). There isn’t much stuff going on. But on certain method, if I set a breakpoint, gdb s...
stackexchange/codereview
Can't I use SET ANSI NULL in my normal parametrize query. In fact I want to take out records where first_name='Rupesh' or NULL but I am getting only the Rupesh name records. I have a stored procedure otherwise I could set set ansi null off and could get all records... What should I do now?
stackexchange/codereview
How do I serialize/deserialize a boost::program_options::variables_map? I can't find an already implemented serialize function, and I don't know what functions in variables_map I can use to extract and reassemble the map.
stackexchange/codereview
Im trying to start a new activity once i press a notification...the related code is: NotificationManager notifManager = (NotificationManager) getSystemService(NOTIFICATION_SERVICE); Notification note = new Notification(R.drawable.android, "New E-mail", System.currentTimeMillis()); PendingIntent intent = PendingIn...
stackexchange/codereview
I have a view with a huge paginated list of records that need filtering. Users can filter by records a few different ways (such as 'saved' records, 'read' records, and 'mark deleted' records) and I'd like for them to be able to combine these filters any possible way. My current, flawed, non-functioning approach. The co...
stackexchange/codereview
Part of a program that I am creating for myself allows for PowerShell commands and scripts to be run from within the program (no need to open a PowerShell cli because it is already there). For the most part, things work great, I can type in and execute commands and scripts just fine, but if it requires input before the...
stackexchange/codereview
Still trying to get back into C++ and fumbling on differences from Java. Can anyone tell me what's wrong here? Test.h #ifndef TEST_H #define TEST_H class Test { public: int x, y; Test(); virtual ~Test(); protected: private: }; #endif // TEST_H Test.cpp #include "Test.h" Test::T...
stackexchange/codereview
Please consider the following two domains: domain1.com and domain2. From domain1 I open an iframe that points to domain2. Now, I want these guys to communicate with each other, which I've successfully accomplished by applying hash change event listeners on both domains. That way, the hash in the parent window (domain1)...
stackexchange/codereview
When faced with the task of copying a record in a database and modifying just a handful of values, I tend to use a temporary table to avoid writing out all of the unchanged columns. Does anyone know how this would affect performance on a large scale system? A quick example (which also shows why I prefer the temporary ...
stackexchange/codereview
I'm learning MySQL now. I need your help in understanding the difference between these queries: select id from tab where id like '000'; select id from tab where id regex '000';
stackexchange/codereview
Suppose that I have two random number genertors RNG-A and RNG-B, such that: They both produce random, non-infinite floating point numbers when called I can call the generators repeatedly and generate as many random numbers as I like The random numbers generated are independent and identically distributed (i.e. the out...
stackexchange/codereview
I'm creating an application that needs to draw multiple line segments, each one starting in one colour and ending in another. At the moment I have the code below within my calculating loop but this seems like overkill to achieve what I want especially if the line could be hundreds of segments long. I'm realtively new t...
stackexchange/codereview
I want to make http://domain.com/index.php?query=query look like http://domain.com/query I know I need to use .htaccess, but I have no idea how to approach this.
stackexchange/codereview
I have an application in C# (winforms) that uses code generated by wizards for database management (datasets, datatables, etc.). If for example I have a datacolumn configured to allow null values (property AllowDBNull = true) and when a null value is entered (in a form) is configured to throw an exception (property Nul...
stackexchange/codereview