instruction_seed
stringlengths
1
35.8k
_source
stringclasses
1 value
Is a bluetooth connection between a android device and a laptop encrypted by default? The bluetooth server is started on the android smartphone and therfore, the connection is initiated by the laptop. Thanks, Peter
stackexchange/codereview
I know that we can delay the url redirection easily with plain javascript below, setTimeout(function(){ document.location = 'http://stackoverflow.com/';}, 2000 ); what if I want to use jQuery's delay()? $(window.location).delay(4000).attr('href', 'http://stackoverflow.com/');// fail to work! Any ideas? thanks.
stackexchange/codereview
I've long heard that html5 can replace flash. Video chatting is not hard to implement in flash, but how to implement it with html5?
stackexchange/codereview
I need to make a tool that allows to, Measure screen distances by using a ruler. I currently have no code for either of these tools, any code for measuring distances and angles would be much appreicated. Thanks in Advance
stackexchange/codereview
I get this error... Parse error: syntax error, unexpected '{', expecting '(' in /home/content/s/k/y/skyview09/html/clients/Cheryl/admin/admin.php on line 122 when trying to run a page with multiple conditional statements (if, elseif, else). The php that I'm tying to run is: <?php if(isset($_GET['m...
stackexchange/codereview
I need to launch a browser to example: "http://www.abc.com" with c#. The thing is, I don't want all those "Go Back", "add new tab", "search box", or "toolbar" appear on the launched browser, and I need a smaller browser, not maximized one. How to achieve it in C#? currently I am using System.Diagnostics.Process.Start(u...
stackexchange/codereview
Is that possible to cancel a window close in javascript (via mootools or not) with something like below? window.addEventListener("beforeunload",function(){doSomething(); return false;})
stackexchange/codereview
I was wondering if there is a counterpart to scipy.linalg.cho_solve in R. What the function does is given the cholesky factor L of A (A = LL') and b, it solves the original problem, Ax = b. (not Lx = b) (So it is different from backsolve/forwardsolve) Thank you, Joon
stackexchange/codereview
I have a c++ program file with two functions in it. If I change the first function alone, why should both of them have to be recompiled? Is there any build system which recompiles the first one alone and put it back in the same object file? Is this possible? The instructions of one function shouldn't depend on other ri...
stackexchange/codereview
I've had this problem several times now, and never found a satisfactory solution: If I want to move a group of items with a view all together in Interface Builder, and these items are all on top of a larger background item, I can't put a selection rectangle around the items in the view because any click and drag in t...
stackexchange/codereview
When I load a library from a function it doesn't load and even crashes the page! What's up with that?? HTML head: <script type="text/javascript" src="https://www.google.com/jsapi?key=INSERT-YOUR-KEY"></script> <script type="text/javascript"> // --- LOADING LIKE THIS WORKS FINE --- // jQuery is completely loaded...
stackexchange/codereview
I am creating a Datagridview programmatically in a dll file. It's datasource is a Datatable, and my code is as such: DataGridView dgv = new DataGridView(); DataSet ds = new DataSet(); ds.ReadXml(rdr); DataTable dt = ds.Tables[0]; dgv.DataSource = dt; Why then when I check how many columns and rows the datagrid has, i...
stackexchange/codereview
I have a weird requirement. I want to have input controls on a xaml page based on some condition. There are two ways to do it. Either create them at runtime and position them accordingly or have them on the page by default and set its visibility. In short, I want to dynamically control the position of input controls li...
stackexchange/codereview
I want to do this for (int i = 0; i < 100; i++ ) { Byte[] receiveBytes = receivingUdpClient.Receive(ref RemoteIpEndPoint); } But instead of using UdpClient.Receive, I have to use UdpClient.BeginReceive. The problem is, how do I do that? There aren't a lot of samples using BeginReceive, and the MSDN example is not ...
stackexchange/codereview
how to send files to mobile phone from pc using Bluetooth. What are the libraries i need to do it.
stackexchange/codereview
If I do simply dirInfoObj.GetFiles("*.jpg") , it will return the 2 jpg's I have there. But if I try and get both jpg's and png's, like dirInfoObj.GetFiles("*.jpg,*.png") , it won't return anything. Am I doing something wrong? Thanks!
stackexchange/codereview
I am having trouble with the Asp.net page life cycle. I am trying to create a custom menu using HtmlTextWriter with an asp.net LinkButton to fire a server event. I can not get the server event to fire and I get the 'object reference not set to instance of object' when I click my linkbutton. Here is some code. protec...
stackexchange/codereview
Currently I'm creating my XML-RPC using (xml-rpc.net) interfaces statically with the following statement: [XmlRpcUrl("http://dillieodigital.wordpress.com/xmlrpc.php")] public interface ICSBlog : IMetaWeblog { } However, I'd like to be able to specify the URL for the service at runtime, so I can dynamically switch to d...
stackexchange/codereview
I am curious to know what happens when we de-serialize an object. For example if my class object is composed of many other objects, how does the object creation process takes place in De-serialization process
stackexchange/codereview
Little bit confused.. In the git community manual, it says The git log command can show lists of commits. On its own, it shows all commits reachable from the parent commit; but you can also make more specific requests $ git log v2.5.. # commits since (not reachable from) v2.5 I thought git log by itself onl...
stackexchange/codereview
I'm using msysgit and for files starting with a slash, e.g. .classpath it automatically sets the hidden flag which makes it impossible for IDEs to overwrite it. How to prevent setting this hidden flag?
stackexchange/codereview
I don't undersatnd why I get 8:00AM instead of 00. This also happens if I set it to other hours. Ok, I now tryed to present in a label the value of [dateFormatter stringFromDate:dateTest]; And in a wierd way it presented the time I formatted... But if I check the NSDate object on a breakpoint then it says 08:00:00 an...
stackexchange/codereview
I would like to use Crystal reports with an ODBC (Sybase) data connection in PHP to display my database reports. I selected Crystal Reports because of its advanced features, professional abilities, and its support for Sybase databases. I also found PHP Reports but it doesn't support Sybase. My configuration is PHP v5, ...
stackexchange/codereview
I have the need to send an array of ID's to my server-side in the form of a JSON Object.I am using a dropdownlist where multiple values can be selected to do an action with them. To get them in an array, I've used: var selectedArray = []; var selectObj = document.getElementById('addedList'); va...
stackexchange/codereview
Let's say I have a class like: class Basket < ActiveRecord::Base has_many :fruits Where "fruits" is an STI base class having subclasses like "apples", "oranges", etc... I'd like to be able to have a setter method in Basket like: def fruits=(params) unless params.nil? params.each_pair do |fruit_type, fruit_data...
stackexchange/codereview
Are there any tools available for this type of package conversion?
stackexchange/codereview
Recently I have conversation with a colleague about what would be the optimal way to convert List to Map in Java and if there any specific benefits of doing so. I want to know optimal conversion approach and would really appreciate if any one can guide me. Is this good approach: List<Object[]> results; Map<Integer, Str...
stackexchange/codereview
I have been trying to use HG convert to migrate a local CVS repository to HG. When I run the command... hg convert CATools I see the following message: "Valid-requests", but got '') "Valid-requests", but got '')> assuming destination CATools-hg initializing destination CATools-hg repository connecting to :sspi:s...
stackexchange/codereview
Is it me or is there a bug in the MailAddress class in System.Net.Mail? This code will always throw an excpetion: MailMessage mail = new MailMessage(); mail.From = new MailAddress("me@me.com"); mail.To.Add("joe-blow@me.com"); mail.Subject = "Test email" mail.IsBodyHtml = true; mail.Body = "<b>Does not work</b>"; ...
stackexchange/codereview
So I just installed paperclip and am trying to get it working in my brand new Rails app. But this is the error I keep getting, when I go to localhost/upload/new: NoMethodError in Upload#new undefined method `uploads_path' for #<#<Class:0x00000102d1b8e0>:0x00000102cf24e0> Extracted source (around line #3): 1: <h1>Uploa...
stackexchange/codereview
Ok this is bizarre and has been bugging me for days now.... I did it correctly (I think) but it This was all done in the AppDelegate: //Initialize the controllers navController = [[UINavigationController alloc]init]; iVacationTabBar = [[UITabBarController alloc] init]; //Define the viewcontrollers myTools* vc_t...
stackexchange/codereview
I have an OLAP cube containing a numeric measure that represent a foreign key against a parent table. I would like display the 'name' field from the parent table instead of the measure in my reports. it is possible?
stackexchange/codereview
I have a date and I'd like to print the offset from that date. I can do this: dbms_output.put_line(to_char(g_startDate - interval '4' month ,'YYYY-MM-DD')); and it works fine. The problem is that the interval is variable. When I try this: dbms_output.put_line(to_char(g_startDate - interval g_dateOffsetAmt month ,'YYYY...
stackexchange/codereview
I have two applications with id-s: com.myCompany.mayApp and com.myCompany.mayAppPro. How can I use one pref file com.myCompany.mayApp.plist for two these applications? Is it possible to use class NSUserDefaults for this?
stackexchange/codereview
Last week I learned that Silverlight on the Windows Phone uses a "compositor" thread to cache bitmaps and animations and run them independent of the UI thread. This allows animations to run smoothly even if the UI thread becomes blocked. My question is: why was this introduced only for WP7, and not Silverlight (web) or...
stackexchange/codereview
How can I automate the creation of a user in IIS7? I'm using C#. I have code that automates the creation of a website, and I found some examples for automating the creation of an FTP site. I also need to automate the creation of a IIS user for each FTP site that I create. I could possibly just edit the administratio...
stackexchange/codereview
In iOS 4, when a user presses the Home button, the running app will save the current state and go to background. However I'm developing an app and I don't want it to go to the background. I want it to kill itself, just like in iOS 3 and before. How can I do it? Thanks.
stackexchange/codereview
What is the best way to implement a cron like scheduler in jsp & servelet based web application ? Came across one option using the "Timer Service". Any other alternatives or any comments on timer services ? Thanks in advance Shamika
stackexchange/codereview
I'm trying to return some results spread over a rolling 12 month period eg: MONTH IN OUT January 210 191 February 200 111 March 132 141 April 112 141 May 191 188 etc... How do I spread the results over a date range, populating the first column with the month name? IN MSSQL...
stackexchange/codereview
I am building a simple class to hold related methods. Part of this code includes synchronising to a database. The built in SyncOrchestrator class includes a SessionProgress event handler which I can wire up an event to. What I would like to do is instance my class and then hook up an some code to this event so that I c...
stackexchange/codereview
What is the best practice in handling multiple windows and/or tabs in a web application? What are the pros and cons of a given approach? I'm not looking for an answer that specifies a particular framework solution. The best practice should apply to all HTTP/HTML based web applications whether they are ASP, .NET, Java S...
stackexchange/codereview
i have a question on stored procedures. I try to get a page of result set and the record count of the whole set. Each of this is working on it's own, but I'm unable to combine it: ALTER PROCEDURE dbo.pagingSCP @PageStart INT, @PageSize INT, @RecordCount INT OUTPUT AS BEGIN WITH AllRecords AS ( SELECT ROW_NUMBER() OV...
stackexchange/codereview
I use Twitter-OAuth-iPhone to POST tweets by [_engine sendUpdate:myText];, which works fine. However, the letter & in the 'myText' will be changed to &amp; in the tweet shown on Twitter.com. The & is for coordinates link: @"http://maps.google.co.uk/maps?f=q&source=s_q&hl=en&geocode=&q=%f,+%f". I tried to replace the &...
stackexchange/codereview
In Objective-C you can say something like: NSArray *anArray = [NSArray arrayWithObjects:obj,obj2, nil]; In case you are not familiar with objective-c it is saying I want an object of type of NSArray, anArray, and I want to call the method arrayWithObjects and then it acts as a sentinel and accepts as many parameters (...
stackexchange/codereview
I'm trying to add a record but I get an exception. Any ideas? private void Form1_Load(object sender, EventArgs e) { string _connStr = @"Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\Database1.mdf;Integrated Security=True;User Instance=True"; string _query = "INSERT INTO Table1 VALUE...
stackexchange/codereview
First of all, I admit I'm a newbie in WCF. Still not out of the training wheels. I was assigned to develop a WCF service, and part of the requirements is that a sort of "session token" needs to be passed with each request as an HTTP cookie. (Predictably, such token needs be generated in the HTTP response headers of a s...
stackexchange/codereview
My question is that How database stores data and how it performs query internally. Suppose we have following fields in our table: ID Name Age Weight Manager and we query select * from Table1 where age>50 and weight<100 I am just curious that how it perform query internally. What will the Node of B-Tre/B+Tree contain...
stackexchange/codereview
Hello I have an User with some Roles User.class public class User { private Long id; private String firstName; private String lastName; private Set<Role> roles = new HashSet<Role>(0); public Long getId() { return id; } public void setId(Long id) { this.id = id; } public String getFirstName() { return this....
stackexchange/codereview
How do I make the setup and deployment project to include my resources in the installed Windows Forms project? My resources are in the default resources folder and its information is in the properties.resources.resx file...
stackexchange/codereview
I have a python question that I'm sure is pretty simple - please feel free to disabuse me of any sort of bad practice while you're at it. I have the following code: class User(dict,BaseDBI): def __init__(self,uid=None,username=None): self['uid']=str(uuid()) if uid == None and username is not No...
stackexchange/codereview
I have an EF model where I logically have a "template" type and an "instance of the template type" Basically my templates are like a work flow and the instances are those templates applied to an object. The association is that a template has zero to many instances, an instance is always based on a template. For example...
stackexchange/codereview
I am trying my hands on creating and consuming wcf services. when i try to call a service operation that expects a data contract as a request, it gives me a compile time error. It says that data contract can't be converted in to string. I thing, I have to serialize it first. But I don't know how to do serialization or ...
stackexchange/codereview
I've got a dialog which shows a list of checkboxes. The info which boxes should be checked each time it opens comes from an edittext. I searched for a way to not allow caching of the dialog but couldn't find out how to do that. Now I override onPrepareDialog to set the checkboxes before the dialog opens. I deleted the ...
stackexchange/codereview
#include <stdlib.h> main() { char string[23] = "2345,"; char aString [sizeof string]; int i = 0; while((aString[i] = string[i]) != ',') ++i; char *ts = aString; printf("%s\n", aString); } I want to copy everything but the comma from string to aString. However, this isn't working -...
stackexchange/codereview
I have a UIView that contains about 80 UIImageViews. When I create a new set of 80 UIImageViews each time the UIView is loaded with new images, memory from the discarded UIViews is not being recovered. (The solution is to keep recycling the same set of UIImageViews, but my concern is that the memory is not being recove...
stackexchange/codereview
I have a WebView on my Android application which loads (WebView.loadUrl()) different local HTML files from phone's internal storage. I would like to include some custom css styles for them. Now, I could have my app edit every HTML file and add linking reference for the CSS file. I could also read the file contents, add...
stackexchange/codereview
Some one give me the some Sample Code to make my Grid like this.I read in document that jqgrid just supports subgrid. like this page in Hierachy http://trirand.net/demoaspnetmvc.aspx thanks !
stackexchange/codereview
I would like to do something like: struct mystruct { char *info; }; // here is where I'm not sure how to void do_something(struct mystruct **struc){ int i; for (i = 0; i < 10; i++){ *struc[i] = (struct mystruct *) malloc (sizeof (struct mystruct)); *struc[i]->info = "foo"; } } int main(in...
stackexchange/codereview
This is a theoretical question, I don't really run a fab or anything ;-) For small N, N-by-N multiplier can be implemented as a tree of 3-to-2 adders of depth log(N) and with N^2 gates - let's ignore Booth encoding etc. This is super-fast, but requires unreasonable amount of hardware. This gate count will become unreas...
stackexchange/codereview
My application is performing a lot of consecutive XHR calls. This means establishing a lot of HTTP connections. I'm trying to analyze the performance of all these connections. I found out that the first HTTP connection made spends about 10% of its duration on Blocking (following definition quoted from Firebug Wiki): B...
stackexchange/codereview
Why does $(OBJDIR)\%.o:$(SRDDIR)\%.s $(GCC) -c -g -I$(SRCDIR) $(ASFLAGS) $< -o $@ $(OBJDIR)\%.o:$(SRDDIR)\%.c $(GCC) -c -g -I$(SRCDIR) $(CFLAGS) $< -o $@ gives warning (says ignoring the first rule) where as %.o:%.s $(GCC) -c -g -I$(SRCDIR) $(ASFLAGS) $< -o $@ %.o:%.c $(GCC) -c -g -I$(SRCDIR) $(CFLAG...
stackexchange/codereview
I am working on an Android application that deals with graphical operations in native code on a shared memory buffer. I have made functions to call my native code from Java using JNI, and my native code uses the JNI API to call Java from native code. Since copying large arrays of pixels has a significant effect on perf...
stackexchange/codereview
I'm using Paperclip and s3 to upload a simple Image file on article. I've browse all these tutorials explaining on how to actually make a delayed job, for the images, but i feel that they're too old and perhaps there's an easier way to accomplish this. My question is, what's the "rails" (quick and easy) of accomplishin...
stackexchange/codereview
Whenever I commit, I worry that I may have missed out a dependency and I'm looking for the simplest way to test my git tree in isolation to ensure whatever is in the git index ("staged") will in fact compile/run on their own. My code's dependencies exist in the filesystem from where I do the 'git add' and so simple com...
stackexchange/codereview
I am developing a web application that is supposed to display land traffic in real time in any part of the world. For a couple months I've been developing it using JavaScript and OpenLayers (http://www.openlayers.org) framework. Unfortunately, this solution appears to be inefficient. There are hundreds (200-300) of ob...
stackexchange/codereview
I'm trying to secure the data users submit via forms on my website so they cannot submit data in HTML. I am trying the following but when I test it, I'm still able to submit HTML data and it writes to the DB just as I entered and displays the HTML when I read from the DB. if (isset($_POST['submit'])) { if ( strlen...
stackexchange/codereview
hello I have a plain text emial (preformated with simple line-breaks) which I would like to convert to RTF to store it in database I have a desktop application written in .NET/C# and have to create a web interface (written with JAVA ) for that So that's why I need rtf2text and, text2rtf conversion I could do the rtf...
stackexchange/codereview
I tried to load a New solution > C# > Console project, while pressing Ctrl+F5, it does not run or showing anything, do I need to install .NET SDK? I could launch the GTK# windows create on my own.
stackexchange/codereview
I have to start a command line program with System.Diagnostics.Process.Start() and run it as Administrator. This action will also be run by a Scheduled Task every day.
stackexchange/codereview
I'm only getting the default validator message. What am I doing wrong? class Questao { static hasMany = [alternativas:Alternativa] static constraints = { alternativas (validator: {val, obj -> if(val.size() < 2) return ['validator.message'] //custom message }) } } /i18n questao.altern...
stackexchange/codereview
I have a list of quotes in an XML document. Each quote is wrapped like this: <Item> <Quote>This is a quote!</Quote> <Source>-- this is the Source of the Quote!</Source> </Item> Here's the jQuery: var html = ''; var tmpl = '<li class=""><p class="quote">__quote</p><p class="source">__source</p></li>'; ...
stackexchange/codereview
I want to verify a string is being set to a specific value in a Moq object. I created a little console application to simulate what I want done. using System; using Moq; namespace MoqVerifySet { public interface MyInterface { string MyValue { get; set; } } class Program { static vo...
stackexchange/codereview
I need to play back 30 second audio clips, 1 per second, in winforms dotnet. I am currently loading/playing the wav files from the filesystem, which works fine on a notebook, but is causing problems on a netbook. Can I pre-load all sound files into memory, if so how?
stackexchange/codereview
Is there a way to alter the color or the "hue" of an HTML element that already has a background image associated? I would like to display two elements on the screen with the same background image, but I would like to alter one of those elements to have a slightly different shade of the original image. So far I have ...
stackexchange/codereview
The PHP manual for anonymous functions (ie, Closures) states that: Anonymous functions are currently implemented using the Closure class. This is an implementation detail and should not be relied upon. (Emphasis is my own) Is it possible to test a variable, such that the test returns true only if the variable is a Cl...
stackexchange/codereview
I'm using the PHPCrawl class and added some DOMDocument and DOMXpath code to take specific data off web pages however the script stalls out before it gets even close to crawling the whole website. I have set_time_limit set to 100000000 so that shouldn't be an issue. Any ideas? Thank you, Nick <?php // It may take a w...
stackexchange/codereview
What exactly does the const keyword in C++ mean when it's written at the end of a member function (after the argument list)?
stackexchange/codereview
I have two JTables that I would like displayed in one window. Currently I am able to display only one of the tables using: JTable table1 = makeTable(1); JTable table2 = makeTable(2); JFrame frame = new JFrame(); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); JScrollPane scrollPane1 = new JScrollPane(table1); JS...
stackexchange/codereview
My overall goal is just to get the logged on users information for an Intranet site I'm developing without them providing their login (since they are already logged into their computer). So far I just get 401.1 errors and it keeps asking for my login/password. Even though I provide my login/password, it still won't l...
stackexchange/codereview
We are in the process of certifying our health care product (Hitech certification). One of the criteria of the certification process is that our product should be capable of using "hashing" when sending patient information over the network. Our product is a thick client that connects directly to Sql Server 2005 datab...
stackexchange/codereview
We have an in-house .net 2.0 winforms app currently developed on Visual Studio 2005 in Windows XP. Everyone in the office until now is running Windows XP, and there are no issues. We recently ordered a new computer with Windows 7 for one of our managers we were hoping to use, and the app installs fine. The issue is th...
stackexchange/codereview
I'm building a wp7 app. I'm using WebClient to grab data from a server. In the past, it's been working, although all of a sudden it's failing. static void downloadData(string uri, Action<object, DownloadStringCompletedEventArgs> onComplete) { Debug.WriteLine("Downloading: " + uri); WebClient dat...
stackexchange/codereview
I am trying to understand joins and im a bit confused. I know how to join tables using = <= IN exists and not exists I was trying to try and understand the use of INNER JOIN, LEFT OUTER JOIN, USING etc but it is so confusing. The major problem i am having is that different people refer to them using different nam...
stackexchange/codereview
I have to make an AJAX call on the onchange event of a dropdownlist which is part of a view. On the change event i need to call the database, do some calculations display the UI and then use the calculations to populate a chart control. The UI display is in this sequence. Chart Dropdown categories list list of sub cat...
stackexchange/codereview
I know, it is not recommended. The possible risk of SQL Injection. In my present app., I created a class containing reusable functions. One such function is this: public static Int32 InsertNewRecord(string myQuery) { ModCon.OpenConnection(); MySqlCommand cmdInsert = new MySqlCommand(myQuery, ModCon.myCN); t...
stackexchange/codereview
OData is being touted as a new open standard for REST-style data services, but I can't find much evidence of it being used in anger by anyone who isn't plugged into the MSFT developer community. If it's an open standard I would have expected to some more traction from the Java/Ruby/Python/PHP communities. The backgroun...
stackexchange/codereview
I have looked at both cloudvox and Twilio while looking for a phone gateway (please note that I am not talking about an SMS gateway). The problem with cloudvox is that it supports outbound calls only for US/Canada. While Twilio fixes this problem, it still requires the billing address to be in US/Canada. Is there a gat...
stackexchange/codereview
hey all, Im stumped. I have the following code..works fine in all browsers except IE (shocking...I know) $('#lbAvailableResources option').live('click', function() { if($('#ulResourcesAssigned').text() === 'No resources assigned') $('#ulResourcesAssigned').text(''); //create a new listitem that will ...
stackexchange/codereview
How to validate whether the commit with given sha exists in current branch? There are many ways to parse outputs, but I need optimal way which returns boolean (for usage in bash script). e.g. sha=$1 if [ -z `git magic --validate $sha` ]; then echo "Invalid commit sha: $sha" exit 1 fi
stackexchange/codereview
I'm starting to build a Youtube player and I have an XmlDocument object to store the video's meta information, but I'm having some issues figuring out how to update the XmlDocument. Here's my code so far: public void UpdateVideo(string video_id, string title, string download_url) { if (this.DownloadExists(video_id)...
stackexchange/codereview
im trying to keep a object in a certain position in the screen, without resizing it too (with the stage) function Resize(e:Event = null):void { if ((stage.stageWidth)/(stage.stageHeight) > fundos.width/fundos.height) { fundos.width = stage.stageWidth; fundos.scaleY = fundos.scaleX; } els...
stackexchange/codereview
I`m wonder why this not working echo gettype($_GET['id']); //returns string if(is_int($_GET['id'])) { echo 'Integer'; } How to validate data passing from GET/POST if it is integer ?
stackexchange/codereview
I try to create a table from hibernate annotations. I need to have a column of Double type, with the length specified like : (10,2). So SQL syntax show like: ... DOUBLE(10,2) .... I have tried to do that: @Column(length = 10, precision = 2) ... but when i look at my created table, it is not specified the length for D...
stackexchange/codereview
My understanding is that the find method for any rails object will expect the id column of that object. But I want to find a row of that table/object using another column of that table. How do I do that ? For example I have userstats model as follows: create_table "userstats", :force => true do |t| t.integer "user...
stackexchange/codereview
In a project, how do you guy assign task among programmers? Do you distribute the task by use-case basis, or by class basis? Which one do you think is the most efficient? I plan to assign task by class basis. I can come up with architectural design and give them interface for them to implement.
stackexchange/codereview
The title really says it all. I need help in creating a custom font from either a set of separate image files or from one image with a series of characters setup in a grid fashion in C#. I have searched everywhere and haven't found any useful resources on the subject. If you have any advice, thanks in advance.
stackexchange/codereview
As we all know, including <windows.h> pollutes all namespaces in C++ by having one preprocessor #define per Win32 API function that can either take multibyte or UTF-16 input. An example is: #ifdef UNICODE #define CreateFont CreateFontW #else #define CreateFont CreateFontA #endif I've used the native Win32 API for quit...
stackexchange/codereview
paramList = new ArrayList<String>(); paramList.add(line.split(",")); When I used this, it gives me the error: cannot find symbol symbol: method add(java.lang.String[]) location: interface java.util.List<java.lang.String> With this, I would get output in this manner: "abc" "bvc" "ebf" . Now can I use trim to ...
stackexchange/codereview
Basically I need a pause (based on just a few seconds) to be put into one action so that the user can see what happens before the next action is taken. So for blackjack, when it's the dealer's turn and he decides to hit, he hits, a card is added, and then he decides what to do next. So before he decides on what to d...
stackexchange/codereview
Is there any way how to create an functioning index for this query and to get rid of "filesort"? SELECT id, title FROM recipes use index (topcat) where (topcat='$cid' or topcat2='$cid' or topcat3='$cid') and approved='1' ORDER BY id DESC limit 0,10; I created index "topcat" ( columns: topcat1+topcat2+topcat3+approve...
stackexchange/codereview