instruction_seed stringlengths 1 35.8k | _source stringclasses 1
value |
|---|---|
In XCode, if I click on my Target->getInfo and go to the Properties tab I see that the Creator field has ???? in it. Is this just simply a field to insert the name of the company/individual that is making the application or is it for something else?
Also, does the Version field drive when an .ipa file is dragged into ... | stackexchange/codereview |
So I have a simple cpp file. Only one with one main function and 3 int a-la public variables. like:
int a;
int b;
int c;
void main()
{
startThredA();
startThredB();
while(1)
{
c = a + b;
printf(c);
}
}
I whant to create 2 threds A and B one of which should... | stackexchange/codereview |
I'm building a wp7 Silverlight app. I need a list that is able to switch into "edit" and "not editing" mode. In "editing" mode, the list slides over, revealing icons that the user can tap to remove items from the list. At the bottom of the list is a "add" icon that lets users add new content.
Is there a standard contro... | stackexchange/codereview |
I have a pipeline that I currently run on a large university computer cluster. For publication purposes I'd like to convert it into mapreduce format such that it could be run by anyone on using a hadoop cluster such as amazon webservices (AWS). The pipeline currently consists of as series of python scripts that wrap ... | stackexchange/codereview |
So i am designing an art project that will print to a dot matrix printer the contents of my internet history. i have found info online to parse out a plist (what os x uses to store internet history) so im all set on that front but what i am looking to find out is how to send a request to the printer to print a new line... | stackexchange/codereview |
I am very new to working with SQL queries. Any suggestions to improve this bit of code:
(by the way, I really don't care about sql security here; this is a bit of code that will be in a pyexe file connecting to a local sqlite file - so it doesnt make sense to worry about security of the query here).
def InitBars(QA = "... | stackexchange/codereview |
How can I set the backgroundcolor and fontcolor to be "normal" on a disabled (i.e. Enabled = false) RichTextBox?
Thanks
| stackexchange/codereview |
I have a scenario where I need to do relatively large amounts of inserts.
Lets say I have million rows a minute... that gets inserted into structurally identical tables, but with different levels of aggregation applied to the data.
Also, in order to access this data again , its quite heavily indexed.
Now, in order to... | stackexchange/codereview |
I guess, the problem is pretty common. Let's say, we have a source file and wish to replace some string with another string.
Usually, I use the following command:
:%s/test/testValue/gc
But, what if the string is pretty long and we need just to touch it up? It is boring to type something like that:
%s/someLongAndDirtyS... | stackexchange/codereview |
I'm looking for suggestions on how one might implement a toolbar that provides edit cut, copy, paste commands using the Tkinter framework. I understand how to build a toolbar and bind the toolbar commands, but I'm confused over how the toolbar button bound commands will know which widget to apply the cut, copy, or past... | stackexchange/codereview |
I am trying to create a screen (in portrait mode) that shows 4 images (same size, intended to scale down to fit screen), taking up the entire screen, breaking up the screen into quadrants (a tall, 2x2 grid). This will act as a main menu type of activity and each image should be clickable, in order to take the user to ... | stackexchange/codereview |
Im using this plugin: http://www.fyneworks.com/jquery/star-rating
It includes a star.gif (which actually contains the star in three different colors) and it only references this gif within the included css-file once:
div.star-rating,div.star-rating a{background:url(star.gif) no-repeat 0 0px}
I dont want to use the sta... | stackexchange/codereview |
I need some help regarding how to split Chinese characters mixed with English words and numbers in PHP.
For example, if I read
FrontPage 2000中文版應用大全
I'm hoping to get
FrontPage, 2000, 中,文,版,應,用,大,全
or
FrontPage, 2,0,0,0, 中,文,版,應,用,大,全
How can I achieve this?
Thanks in advance :)
| stackexchange/codereview |
I want a partial_sum of my elements in a vector, where each element is a pair<double, unsinged int>. The partial_sum should incrementally add the double values (first of each pair).
Example:
vector<pair<double, unsigned int> > temp_vec;
temp_vec.push_back(make_pair(0.5, 0));
temp_vec.push_back(make_pair(0.2, 1));
temp_... | stackexchange/codereview |
With my current project, I have to keep a counter of the number of insertions into a TreeMap<String, TreeSet<Song>>. The project is to run search of individual words in a string, in this case, song lyrics. I have three tests to determine the course of the map insertions, and my algorithm goes:
test if word has more t... | stackexchange/codereview |
Trying to use Oracle's Times Ten db instead of hsqldb for performance reasons. I read where you need to create a new hibernate.jar file using times ten sql dialect class file. This is proving to be a little challenging. Does hibernate now work with times ten dialect?
| stackexchange/codereview |
I have a VML question. I know... rare.
The problem is displaying an image using the "fill" element without a color behind it. I have repeating PNG patterns, so they are transparent in some places and I need to see through to underlaying elements.
So, here is the produced VML:
<fabCorners:shape style="CLIP: rect(1px 110... | stackexchange/codereview |
How much does a reference/pointer to an object cost in terms of memory and performance in Actionscript 3? Are weak references( using Dictionary object) less, the same or more overhead?
| stackexchange/codereview |
I have problems with Datareports in vb6.
I made a Dataenvironment with the command to access the rows I want to show
Then I made the Datareport and in the datamember property I used the Dataenvironment created.
If I use the code:
Load datareport
datareport.Show 1
Then if I open the report and then I add more rows to t... | stackexchange/codereview |
I already asked similar question here, but I still get some errors, so I hope you could tell me what am I doing wrong. Just know that I know assembler, and I have done several projects in 8051 assembler, and even it is not the same, is close to x86 asm.
There is block of code I tried in VC++ 2010 Express (I am trying t... | stackexchange/codereview |
I want to fire an event when the user select a file. Doing so with .change event it works if the user changes the file every time.
But I want to fire the event if the user select the same file again.
User select file A.jpg (event fires)
User select file B.jpg (event fires)
User select file B.jpg (event doesn't fire, I... | stackexchange/codereview |
I have a "a.adress" element in a div. on blur, the div dissapears. Whenever I click the a.adress element, I want the value of the a element to populate a field.(the same that gets blurred.
This is what I expected to work:
$('.field').blur(function() {
$("a.adress").click(function() {
event.preventDefault();
$... | stackexchange/codereview |
Bear with me I am pretty new to c#. Right now I am looking at a app.config file in the main project. Here is the code:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
<section name="dataConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Data.Configuration.DatabaseSettings, Mic... | stackexchange/codereview |
I'm using PostSharp, and I'd like to suppress (or change) an existing global attribute, for one method in the class.
In the example below, I want the class "thisIsLogged()" to be logged, and the class "thisIsNotLogged()" to not be logged.
However, it doesn't work: the attribute "[LogThis(false)]" simply adds to the exi... | stackexchange/codereview |
So i want to deo something like this and not sure how
for($s=0; $s < 5; $s++ ){
$pre_config_query = "select * from preconfig where code = '{$industry_string}_{$s}_{$class_string}'";
$pre_config_station = mysql_query($pre_config_query);
$it_exists = mysql_num_rows($pre_config_station);
if($it... | stackexchange/codereview |
Here is my issue. I want to have something like this:
class A {
protected:
int someInt;
virtual void someFunc() = 0;
};
class B : public A {
protected:
virtual void someFunc() { // uses someInt}
public:
B() {//tell the A inside of B to set someInt to whatever it wants}
};
so basically, someInt can be changed, it's n... | stackexchange/codereview |
Hi
For my programming project I want to write an application which would reconstruct image from pieces.
Could somebody tell me if there are some known algoritym to reconstrutin images ? I was trying to find some papers about that problem but I find nothing.
| stackexchange/codereview |
I'm automating some tasks using phing and yui compressor and I'm running into a memory problem. I'm curious if there is a better way to handle this.
Part of phing build script
<target name="finalize">
<property name="cssfolders" value="folder1, folder2, folder3" />
<foreach list="${cssfolders}" param="dir" target=... | stackexchange/codereview |
My Java application is not very big, but I would like to do it the "right way". Looking for suggestions to not make a big mess...
I am using Swing, the Swing Application Framework and H2 database.
It is a single frame application with different tabs. Most tabs will reflect some aspects of the data in the database. Some... | stackexchange/codereview |
I am working on project that converts database entities into DTO objects. To do it a special converter class is used for each convertion.
I am providing simplified example of the things we are doing. I intentionally missed setters/getters and some other things for code clarity.
So here are persistent entities:
class C... | stackexchange/codereview |
If I understand this correct, AUTO_INCREMENT= is only helpful for tables which are self growing, like a user log table, user details table, etc need to insert/delete records dynamically. But for lookup tables like cities, languages, etc which I manually need to inset/delete data there is no benefit correct, esp since I... | stackexchange/codereview |
I'm using GMaps V3 with MarkerClusterer from http://code.google.com/p/gmaps-utility-library-dev/
Markers displayed on the map are user-defined and often collapse, so no matter how much you zoom-in, the clusterer always shows there are multiple items in one location. But the user should be able to click each single mark... | stackexchange/codereview |
I reformat the data here. Basically, I tried to output the data from table1 into table2 but not sure how to write it in oracle 8i. I am running Aqua Studio but the database backend is oracle.
Thanks alot!!!
Table1:
Name Prods Cus_id
-----------------------
Mark Rice 87311870
Judy Rice 87364239
-------... | stackexchange/codereview |
I try to install fpc on open solaris doing this:
svn checkout http://svn.freepascal.org/svn/fpc/branches/fixes_2_4 fpcfixes2_4
cd fpcfixes2_4
gmake clean all install INSTALL_PREFIX=~
As described here: http://wiki.lazarus.freepascal.org/Getting_Lazarus#Building_and_installing_Free_Pascal_in_UNIXe
However I get this e... | stackexchange/codereview |
I'm trying to view some 3d geometry in a custom ipad application I'm writing. Problem I'm running into is that as I zoom, pan and rotate my model, the edges get clipped, and I'm not sure why. I don't think it's because of the near/far clipping planes because I change those and nothing happens, it still clips. Also, it ... | stackexchange/codereview |
I am creating a list item on the fly using the object notation (http://api.jquery.com/jQuery/#jQuery2) and I would like to be able to add a jQuery .data() (http://api.jquery.com/data/) to it.
I have the current code:
$('<li>', {
id: 'filter',
text: 'Data Filter 1',
click: function() {
... | stackexchange/codereview |
Can I test on a computer with a single core erlang programs for four or more cores?
When starting without using any parameter erlang smp assumes 2:2 like this:
Erlang R14A (erts-5.8) [smp: 2:2] [rq: 2] [async-threads: 0]
I am using a Pentium 4, does that mean I have two cores?
| stackexchange/codereview |
I have a keypress handler bound to all input elements on a form, and I need to perform different operations depending on which element received the keypress. All 3 variations below work, but I'd like to know if one (or something else) is preferred and why.
$(':input').keypress(function(e) {
if($(this).attr('id') === ... | stackexchange/codereview |
I have a class with all my data access code in it for my ASP.NET 4.0 application. There are two methods in the class which insert data into the database. I want to enlist these inserts in a SqlTransaction and roll the transaction back if one of the inserts fail. However I'm not sure how to do it though, because of the ... | stackexchange/codereview |
I am new to java and I have two classes (class calc and button) that I need to split into separate files and class calc uses class button. they both compile however when I run class A it fails. How can I do this?
This is the code for class calc
package start;
import javax.swing.*;
import java.awt.event.*;
import... | stackexchange/codereview |
I am going to try and explain this as best as I can, so here goes...
I have several <tr> tags each with a class="one" or class="two" and so on.
Here is the code. I added the class to each one of these via jQuery since I do not have direct access to the markup.
What I want to do is rearrange the complete td tag and all ... | stackexchange/codereview |
My CSV is like:
username, lastname, firstname, age, weight, location
If I don't have a value, I need to have just the comma with no data like:
blankman, man, blank,,,usa
Right now I have:
blankman, man, blank, '','',usa
Because I am doing this like:
users = User.....
users.each { |user|
age = ''
csv << [ ... | stackexchange/codereview |
I want to be able to extract text from received SMS's.
I'm not sure whether I should use content providers or the sms message is included in the intent received by broadcast receiver.
I have a broadcast receiver waiting for SMS's, and want to inspect the contents of the received message.
Thank you.
| stackexchange/codereview |
I'm using JBoss 5.1.0 GA together with JMS.
I have two message-driven beans.
Could someone explain the threading model to me? For example, does each MDB have a separate thread pool? Do they share a global pool?
| stackexchange/codereview |
im searching for a complete command line tool or even better a python wrapper to manipulate and retrieve image metadata.
i tried pyexiv2 which is very nice but i cant register a new namespace like 'XMP.imageapp.uuid' (maybe im missing something and i would be glad to hear a solution for that.)
with the command line too... | stackexchange/codereview |
We provide a webservice to a third-party that expects a 500 error when an application level error occurs. When this happens we construct a piece of custom XML with the error details (eventcode etc) and return this as the synchronous response.
However, it seems that IIS is intercepting the 500 error and replacing our c... | stackexchange/codereview |
I'm using Freemarker to generate an XHTML page from a POJO which contains a List of Objects, all of which are instances of subclasses of the same parent class. I'd like to generate different information for each object based on its class. How do you test for that in the Freemarker language? For example, if I had a L... | stackexchange/codereview |
If I have the following element with children elements inside, how do I go about accessing those children elements using Hpricot?
<p><b>Code</b> <i>base</i> is <a href="#">cool</a> stuff dude!</p>
| stackexchange/codereview |
This question is a bit of a convoluted brain-twister, I'm afraid. I'm writing a function test on an api, that when I query it, returns a bunch of json with embedded lists. Here is a significant fragment of what that looks like (with all the data anonymized for this question):
[{u'account': {u'account_name': u'Autotest ... | stackexchange/codereview |
I want to run a javascript function anytime other javascript on the page is run. This is to be able to post-process the dynamically generated content. I can't simply do the post-processing after the page loads, because I need to apply my post-processing to the content that is generated by javascript that does load an... | stackexchange/codereview |
I have a web application that will be used by the public. This application has a login credentials requirement.
I don't want to create yet another site that you have to create a custom username/password combination unless you really want too. I would like to support 3rd party logins like Facebook, Twitter, etc...
In... | stackexchange/codereview |
i have create a div class=box via Ajax call and appended to an main div.
This div class=box change its height based on its content. I need to have its height but .height() return 0....
$.ajax({ url: "json/news.json",
dataType: "json",
contentType: "application/x-www-form-urlencoded;charset=UTF-8",
... | stackexchange/codereview |
>> c.errors
=> #<ActiveRecord::Errors:0x3ee6758 @base=#<CsvHeader id: nil, csv_name: "kkk_version", model_name: "KkkVersion", delimite
r_char: ",", run_sequence: 3, csv_usage: "L", header_row: "Y", default_file_name: "kkk_version.csv", default_directory_nam
e: "public/uploads", each_row_instance_method: "junk", on_comp... | stackexchange/codereview |
I would like to understand the programmatic way of finding out(logging) IP address & physical MAC address of computers/devices from which web browsers would connect to a webserver (hosting some site) to access the site.
e.g.
Consider a web site which has many users posting threads in some forum on that website, throu... | stackexchange/codereview |
Lets say you have an xml document like
<parents>
<parent>
<element />
<element />
</parent>
<parent>
<element />
<element />
</parent>
</parents>
While processing I need to know that the elements are 1, 2, 3, 4 in the document, not that but calling position() will return... | stackexchange/codereview |
Using Eclipse on win XP. I've previously created an app or 2, but am now working on the 'real' version and get the above error.
I was having funnies creating a 1.5 version, so have started a new project for 2.1.
package xxx.guest;
import android.R;
import android.app.Activity;
import android.content.Context;
import an... | stackexchange/codereview |
So I'm still kind of new to Objective-C, and this was my first app that I'm now updating. The idea is this: The whole app is basically various lists of stuff. It asks the API for 15 posts, shows those with a Load More button. Click Load More, it loads 15 more, etc. The API that it loads these from has a token system wi... | stackexchange/codereview |
I looked at how to create trunk directory in existing svn repo without a trunk and move all, and it might be applicable, however, I have a "trunk" but the manner in which the developer, a senior one at that, imported the project to the svn repos may provide a difference worth review.
It appears, looking at the log, tha... | stackexchange/codereview |
This text
BEGIN:VCARD
N:Haven;Richard;;;
ADR;DOM;PARCEL;HOME:;;9999 Mission Street ;Daly City;California;94014;U.S.A.
EMAIL;INTERNET:richard@domain.com
EMAIL;INTERNET:richard@domain.org
TEL;CELL:831-555-9315
TEL;CELL:831-555-0740
END:VCARD
converted into this QR Code and imported into my Motorola Droid does not separa... | stackexchange/codereview |
I'd like to change one text file on my server to be parsed by PHP - how do I do this?
| stackexchange/codereview |
I want to call method of an ActiveX
BOOL GetMinutiaeData(const VARIANT FAR& MinutiaeData)
and here's my calling javascript:
var data = new Array();
document.getElementById("objFP").GetMinutiaeData(data);
alert(document.getElementById("objFP").ErrorString);
the ErrorString is "Invalid Parameter". anyone ha... | stackexchange/codereview |
Sometimes I need to expose some of the class members. For example in the following example class Mechanic may need direct access to Engine component. I have read many times that all fields should be accessed by mutator (accessor) methods because of several reasons. But is there any advantage when providing non-const re... | stackexchange/codereview |
Setup
Cost of Threshold for Parallelism : 5
Max Degree of Parallelism : 4
Number of Processors : 8
SQL Server 2008 10.0.2.2757
I have a query with many joins, many records.
The design is a star. ( Central table with fks to the reference tables )
The central table is partitioned on the relevant date column.
The parti... | stackexchange/codereview |
It's clear to me how to inject an object which is in my domain (I have access to the source) using Weld. You just annotate the implementation with e.g. @Named and @ApplicationScoped, and then annotate the target attribute with @Inject to get the implementation injected.
However, not sure how can I inject implementation... | stackexchange/codereview |
I have a structure like this
<div id="first">
<div id="second">
<div id="third">
<div id="fourth">
text
</div>
<div id="fourth">
text2
</div>
</div>
Some other stuff...
</div>
</div
Here's the css for it at the moment:
#first {
width:960;
}
#second {
position:... | stackexchange/codereview |
I was wondering if anyone has attempted to lazy load a subclass (where is isn't known what the subclass is until the result is returned) using EF and POCOs?
This is a bit of a nightmare in NHibernate, but works as long as you don't attempt to cast the returned result to a subclass (because a proxy of the base class is ... | stackexchange/codereview |
if(ac is ArrayCollection){do things}
I want something like that
if(ac is not ArrayCollection){do things}
but how?
thanks
| stackexchange/codereview |
I'm having a problem converting a regular expression from Python into Flex. My string is something like this:
SELECT "col", othercol,\n "othercol3" FROM doesn'tmatter...
Python matches just fine:
>>> re.search('select(.*?)from', 'SELECT "col", othercol,\n "othercol3" FROM doesn\'tmatter...', re.DOTALL|re.IGNORECASE).g... | stackexchange/codereview |
Possible Duplicate:
How do you find a roman numeral equivalent of an integer
I am looking for a simple algorithm (preferably in Python). How to translate a given integer number to a Roman number?
string Roman(int Num){...}
For example, Roman(1981) must produce "MCMLXXXI".
| stackexchange/codereview |
Easier to describe by showing a simplified view of the existing data structure and the desired result...
CURRENTLY...
Element Response ElementType ElementNumber
EntryVal.1 1234.56 EntryVal 1
EntryDes.1 'Current Value' EntryDes 1
EntryVal.2 4321.0 Ent... | stackexchange/codereview |
I've got a list of OpenID's, and I'd like to populate an input field based on the sending anchor.
Basically the goal will be to populate the input with "Google" if the first button is clicked, "Yahoo!" for the second, etc.
Does anyone know how I would do this?
<div>
<div class="openid openid... | stackexchange/codereview |
I'm looking for a javascript/css tooltip that can do the following:
Shows up when you hover over some page element (such as a help icon.)
Repositions itself based on the browser window (for example if it's on the far right of the page, it will show itself to the left of the page element, otherwise it'll show to the ri... | stackexchange/codereview |
Django 1.2 introduced a new template loader, that stores data in cache ( django.template.loaders.cached.Loader ).
Unfortunatly, i failed to find any info on how the cache is invalidated and when and how it is reset.
I want to use this on my server, but i'm not sure, that it would reset on django restart (that would be ... | stackexchange/codereview |
I have a route mapped like this:
routes.MapPageRoute("section-page-id", "{section}/{page}/{id}", "~/{section}/{page}.aspx")
I have a GridView with a HyperLinkField that use to look like this:
<asp:HyperLinkField NavigateUrl="<%$RouteUrl:RouteName=section-page-id,section=Clients,page=Groups,id=5%>" Text="Groups" />
T... | stackexchange/codereview |
I want to read the EXIF information from an image using C#, and everything is actually in place, I have a class where I send in the Image and I can then start requesting EXIF tags.
But the problem is speed, currently my only option is using Image.FromFile() while loads the entire image into memory, which in this case i... | stackexchange/codereview |
I am parsing a XML file using NSXMLParser. And there is a certain section that is completely f*#@ed up and ends up breaking the parsing process. Basically its a bit of HTML that they never wrapped in CDATA.
Is there anyway I can delete this before sending it through the parser so it doesn't break. (The information in ... | stackexchange/codereview |
We're using Numara Footprints for our helpdesk here at my company. Our workflow centers around CFBuilder/Eclipse on a Mac/OS X. We've successfully installed the Jira connector into Eclipse to see which open bugs are assigned to a developer. I'd like to do the same for incoming tickets.
Has anyone written a custom myly... | stackexchange/codereview |
This is probably a page life cycle thing I'm not completely following, but I have the following problem. I have a gridview object and a formview object. When the gridview is clicked, the formview is populated.
When I am in formview inserting mode, everything works perfectly. When I am in formview edit mode, the butt... | stackexchange/codereview |
How do I use multiple language views in a controller according to the url parameter?
I have a english version of a website in CodeIgniter.I want to make Greek and Arabic version of this website without changing the models and controllers.Anybody know how to do it so that i can get CodeIgniter to display different views... | stackexchange/codereview |
I'm customizing the UITableviewCells and I'm trying to figure out which is the most efficient way to do this.
So basically I need to add 3 text strings and 2 images. I could do this by creating UIImageViews and UILabels, but I could also draw it myself by subclassing UITableViewCell. Also I'm concerned about animation... | stackexchange/codereview |
I bought a new domain for my site, and when I access http://www.mysite.com i can see my site, but when I access https://www.mysite.com, I see a completely different site.
Is this a normal thing? I thought if I buy this domain, nobody can use it. Is this normal?
Thanks
| stackexchange/codereview |
I noticed that there are a few a classes such as CategoryFilter that can be used on the VolumeQuery in the Google Book Search Java API. Could this be used for only searching for specific kinds of books like textbooks, or is there a better approach to this kind of search? There doesn't seem to be too many examples onlin... | stackexchange/codereview |
Im using XCode 4 and working with CoreData. Now, how do I generate classes for entities? I used to do it in XCode 3 by clicking on a diagram entity, going to File->New and choosing NSManagedObject class.
For some reason i cant seem to find it in XCode 4, it's not showing up in the dialog...
| stackexchange/codereview |
I have configured the xml-maven-plugin to run with a locally defined XSLT schema, in order to validate all XSLT files defined in a project:
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>xml-maven-plugin</artifactId>
<version>1.0-beta-3</version>
<executions>
<execution>
<... | stackexchange/codereview |
We have a code-signing certificate, purchased from GlobalSign for Authenticode signing (as they call it). Now we need to sign Java applet and soon Adobe AIR module (applet?). The question is: from technical point of view is there any difference between certificate-for-Authenticode and certificate-for-Java or certificat... | stackexchange/codereview |
I've noticed that Ctrl+Backspace/Option+Delete doesn't delete the word to the left of cursor in the MATLAB editor, as it does in many (most?) other editors and programs. This is intensely annoying, as I often will want to change a function name or small section of code. Currently I am forced to hold shift, use option+l... | stackexchange/codereview |
I'm writing an application in C# using .NET Framework 3.5 to implement a series of transforms. I'm using the XslCompiledTransform class to perform the transforms. I'd like to avoid writing a bunch of for-each statements in my XSLT transforms so I'd like to select some data based on an attribute. My source data looks ... | stackexchange/codereview |
What is the right development process of Spring MVC / portlet-MVC application using JSPs as a view layer, when we don't take service/DAO layer in account - it is usually done already.
I mean, if I'm creating controller + JSP(s) at a time, I'm getting kinda lost in a while and everything seems a mess, I'm loosing the ov... | stackexchange/codereview |
I'm just starting out learning C# this may be really simple but in VB i have these namespaces
<%@ import Namespace="System.Data" %>
<%@ import Namespace="System.Globalization" %>
<%@ import Namespace="System.Data.SqlClient" %>
How do I go about using those namespaces in C#?
I tried
namespace System.Data
and
using Sy... | stackexchange/codereview |
I am about to use iPhone 4's gyroscope/GPS on a game, to detect rotation and translation. As far as I know, the gyroscope can be used to detect rotations in all 3 axis.
But rotations, at least on the horizontal plane can be detected with the compass, tilts can be detected with the accelerometer and positions with the ... | stackexchange/codereview |
I have been trying hard to figure whats going wrong the the code below.
I find this code working when app is running for the first time in the simulator.
but when I close the simulator, open it next time and try deleting a record, that time i get exec_bad_access error.
NSFetchRequest *requestToDelete = [[NSFetchReq... | stackexchange/codereview |
I have a static library. This library have the following function defined
int WriteData(LPTSTR s)
The sample to call the function is
LPTSTR s = (LPTSTR) L"Test Data";
int n = WriteData(s);
WriteData return 0 on success and -1 on failure.
I am writing a dynamic DLL to export this function.
int TestFun(LPTSTR lpDat... | stackexchange/codereview |
The following is the code snippet.
#include <stdio.h>
void bar(char* ptr) {
printf("bar(char*) is called\n");
}
void bar(bool ptr) {
printf("bar(bool) is called\n");
}
int main() {
const char* str = "abc";
bar(str);
return 0;
}
When bar() is passed a const char* parameter, why bar(bool) is called? Should... | stackexchange/codereview |
I have the following two SQL statements
First one:
IF(@User_Id IS NULL)
BEGIN
SELECT *
FROM [UserTable]
END
ELSE
BEGIN
SELECT *
FROM [UserTable] AS u
WHERE u.[Id] = @User_Id
END
Second one:
SELECT *
FROM [UserTable] AS u
WHERE (@User_Id I... | stackexchange/codereview |
A nice C interview question:
Can you write a function which swaps two int* in C and also write a call to that function?
int a = 10, b = 20;
int* first_pointer = &a;
int* second_pointer = &b;
/* Below line should print (*first_pointer) = 10, (*second_pointer) = 20 */
printf("(*first_pointer) = %d, (*second_pointer) = %d... | stackexchange/codereview |
ok the problem is that I have to sum two sums from two tables that are linked
first table points:
id | user_id | point | hit
1 | 1 | 4 | yes
2 | 1 | 2 | yes
3 | 1 | -3 | no
4 | 1 | 4 | mb
5 | 2 | 2 | yes
6 | 2 | -3 | no
7 | 2 | 4 | mb
seccond t... | stackexchange/codereview |
Given a seed string I would like to extend it using a prefix hash and read list,
I want to extend that string in this way:
Input seed string $seed
Extract the last k base of that seed
Check the prefix_hash for the reads in read_list (reads where the first k-base)
is the same with the seed.
Merge that reads to end of $... | stackexchange/codereview |
I have a customized UITableView that works just fine. With 4 lables and 3 pictures.
I am trying to add another lablel exactly the same as the others but the app crashes when in my
custon UITableViewCell class I try to release it (no matter if I try to release it before the other labels or after)
I tried everything, I g... | stackexchange/codereview |
I installed Erlang R14B using the --enable-darwin-64bit option and set the bin directory in my PATH. When I run rabbitmq-server script from the 2.1.1 release I receive the following message:
{"init terminating in do_boot",{undef,[{rabbit_plugin_activator,start,[]},{init,start_it,1},{init,start_em,1}]}}
Crash dump was ... | stackexchange/codereview |
If I have a nested list that looks like this:
bigstringlist = [['rob', 'bob', 'sam', 'angie'], ['jim', 'angie', 'tom', 'sam'], ['sam', 'mary', 'angie', 'sally']]
How do I iterate through this list and extract a list of names that appear in all the nested lists? i.e.:
finallist = ['sam', 'angie']
Would this be better a... | stackexchange/codereview |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.