instruction_seed stringlengths 1 35.8k | _source stringclasses 1
value |
|---|---|
Before giving me a link on StackOverflow on the existing post regarding this, I would like to apologize but that post didn't help me at all.
I'm looking more into detail on how I can really hook up TortoiseSVN to CruiseControl.net.
What I tried to do is to follow that post, but I got into a dead-end because I couldn't ... | stackexchange/codereview |
I can’t understand: is this really a bug or am I just missing out something?
I have box-sizing: border-box set for all my div within an HTML document (with all the -moz and -webkit prefixes, of course). So it means the height of a div always includes its padding. It’s reasonable to expect the min-height property to act... | stackexchange/codereview |
I have been using gvim at work for a year or so, just at the point where I'm loving it, getting the hang of it and trying to j,k all over Microsoft Outlook. Then my computer died. Now, originally I had installed gvim myself, which at the time was a "no-no" and is now is really a bad idea (what with all the people int... | stackexchange/codereview |
I have recently downloaded a trial version of YourKit and after playing with it for a while it looks great, but I am concerned about running it in the production environment. Previous profilers I have used have put unacceptable overhead on the servers.
Does anyone know the typical overhead of the YourKit software? Or h... | stackexchange/codereview |
I'm trying to create a .NET-based client app (in WPF - although for the time being I'm just doing it as a console app) to integrate with an OAuth-enabled application, specifically Mendeley (http://dev.mendeley.com), which apparently uses 3-legged OAuth.
This is my first time using OAuth, and I'm having a lot of difficu... | stackexchange/codereview |
How can I transform a HTML Canvas from a square to a trapezoid?
For example
___
| |
|___|
to
___
/___\
| stackexchange/codereview |
I'd like to create a class that is associated to another class in some sort of parent-child relationship. For this the "child" class needs a reference to it's parent.
For example:
template <typename T>
class TEvent {
private: T* Owner;
public: TEvent(T* parent) : Owner(parent) {}
};
class Foo {
private: TE... | stackexchange/codereview |
I'm wondering what is the best practise for gamedevelopment for actioncript 3.
I'm currently in the progress of creating a tile-based game, but I'm already having some troubles using seperate classes.
This is the current situation:
Main class
Generates the tiles
Adds player class
Adds interface class
The interface cl... | stackexchange/codereview |
In the following code, I get a warning that there is an implicit declaration of function getpgid. I know its only a warning, but its for a class and the professor wants us to treat warnings as errors. So, help please.
I have included the appropriate header file as well so I have no idea whats wrong:
#include <unistd.h... | stackexchange/codereview |
Sorry if this has been asked but can't find anything. I have a table that has two epoch timestamps (one is start of a session, other is end of a session), I want to find if a variable is in between column x and column y. I've used between to see if a column is between two variables but can't really think of the syntax ... | stackexchange/codereview |
I have just noticed my new script has a problem in ie 7 and 8 re: offset and position.
Everything works fine in modern browsers, but i can not account for the reason IE refuses to adhere to the offset position i specify..?
The Jquery:
$(document).ready(function() {
$("#%id%").css("margin" , 0);
var position = $("#%id%... | stackexchange/codereview |
I'm using the new jquery mobile 1.0 alpha 1 release to build a mobile app and I need to be able to toggle the text of a button. Toggling the text works fine, but as soon as you perform the text replacement the css formatting gets broken.
Screenshot of the messed up formatting: http://awesomescreenshot.com/03e2r50d2
... | stackexchange/codereview |
We're having huge problems with the delayed_job plugin - http://github.com/collectiveidea/delayed_job/
When we start tasks with "ruby script/delayed_job start", the process never lets go of RAM it acquires.
So it starts with 10%, 25%, gets to 80% and never lets go of the ram, even if it has no jobs to process.
Any idea... | stackexchange/codereview |
I venture that most but not all web services today are synchronous. A fundamental design decision existing if to implement asynchronous processing.
Is there value in implementing a processing queue system for asynchronous web services? It is a MOM/infrastructure decision with which I am toying. Instead of going syst... | stackexchange/codereview |
The following SQL takes 62 seconds to return:
select getCreditBalance(Customerid)
from business_apply
where serialno = '20101013000005'
How to tune it?
Please tell me in detail.
I just want to know the steps I should do to tune it .
we use IDS 9.04 .
As in JDBC I cant see output with SET Explain ON
shall I execute ... | stackexchange/codereview |
I am trying to find the most effective way to parse my System.Web.HTTPRequest.UrlReferrer to find the search term that was used to drive the visitor to my site assuming they arrived at my site via a search engine results page.
I am thinking (hoping) I'd use the HttpUtility.ParseQueryString method, but my problem comes ... | stackexchange/codereview |
Using iPhone SDK 4.1. Sometimes when returning from the background state on iPhone 3GS device the view returned to has lost one of its images or labels. The viewDidAppear method
doesn't get called either when returning from the background. Is there any way to force
reloading the view so these methods are called?
| stackexchange/codereview |
How can i empty the whole foxpro db table using any trigger or stored procedure
| stackexchange/codereview |
Is it possible to develop one app that can be used on mobile phones, tablets and GoogleTV?
Thanks!
| stackexchange/codereview |
I have the following code (I'm sorry for the lengthiness):
double primeValue( const func1D &func,
const double lowerBound, const double upperBound,
const double pole )
{
// check bounds
if( lowerBound >= upperBound )
throw runtime_error( "lowerBound must be smaller ... | stackexchange/codereview |
I have a website where at the top of each page I include a page that opens a mysql_connect connection, so I don't have to open up the connection each time I need to modify or insert stuff into the database. Is this safe, or should I open and close each connection once I'm done using it?
require_once("../include/mysqlco... | stackexchange/codereview |
There is at least three well-known approaches for creating concurrent applications:
Multithreading and memory synchronization through locking(.NET, Java). Software Transactional Memory (link text) is another approach to synchronization.
Asynchronous message passing (Erlang).
I would like to learn if there are other a... | stackexchange/codereview |
i have a dropdown list and text box. i disabled both controls using code behind. now, at one sight we can understand the dropdown list is disabled , because the background color of drop down list is changed automatically.
i want to make that same background color to the text box control too. But i dont know what color ... | stackexchange/codereview |
Read that deadlock can happen in a single threaded java program. I am wondering how since there won't be any competition after all. As far as I can remember, books illustrate examples with more than one thread. Can you please give an example if it can happen with a single thread.
| stackexchange/codereview |
i hope you can cast some light on my problem. I need to do an AJAX / PHP / MYSQL application to display posts and stuff on the page i'm writing.
I only discovered how to do some simple stuff in PHP after taking some mushrooms but that was years ago and now i don't have mushrooms and i'm just stuck!
So here's the probl... | stackexchange/codereview |
I used to run a phpBB forum for our class in school but we have now graduated and the forum isn't used anymore. I want to remove the phpBB installation but there is a lot written in the forum that is fun to read now and then.
I wonder if there is an easy way to convert the phpBB forum to some kind of static archive pag... | stackexchange/codereview |
I am using mTurk for surveys, and I need a way of making sure that people who have participated in a previous survey / HIT do not participate in certain future surveys / HITs. I am not sure whether I should do this as a qualification or in some other way.
I know there is some way to do this, but I have no idea how. I h... | stackexchange/codereview |
I'm using Cucumber to test end to end application behavior in my Rails-based web service. I currently have a Scenario outline that looks like the following (making up a hypothetical scenario here of creating a user with another user):
Scenario Outline: Create a user with another user
Given I want to create a user... | stackexchange/codereview |
I'm new to programming and am taking a C# class. I am getting compiler error CS1001 when I try to write this program.
I read the Compiler Error description (link below), but I'm really not getting it. What am I doing wrong?
http://msdn.microsoft.com/en-us/library/b839hwk4.aspx
Here is my source code:
using System;
pub... | stackexchange/codereview |
When I go into insert mode with the :normal command (:normal i) for example, how do I exit insert mode?
If I press <Esc>, or <c-c>, or <c-[>, VIM exits command mode and I can't run my :normal command.
I put imap <c-e> <Esc> in my .vimrc but when I type <c-e> in command mode, nothing gets inserted. I can't figure out ho... | stackexchange/codereview |
Why does this give me a memory error?
char* aVar= new char;
itoa(2, aVar, 10);
delete aVar;
Does itoa delete the aVar? How to know if a C++ function deletes the pointer, is there a convention about that?
If I do this then error doesn't occur:
char* aVar= new char;
delete aVar;
| stackexchange/codereview |
What is difference between $(".anything").click() and $(".anything").bind(click)
$(".anything").click(function() {
});
$(".anything").bind('click', function() {
});
| stackexchange/codereview |
In a stored procedure in SQL Server 2008, I need to parse strings like "12M" and return 12 * 30 days as an int. So, I am basically parsing and calculating the number of days the string represents.
I am not sure how this can be done.
I am thinking to do a while loop over each character in the string. Any suggestion?
Ed... | stackexchange/codereview |
I'm using HPricot's css search to identify a table within a web page. Here's a sample html snippet I'm parsing:
<table height=61 width=700>
<tbody>
<tr>
<td><font size=3pt color = 'Blue'><b><A NAME=a1>Some header text</A></b></font></td></tr>
...
</tbody></table>
There are lots of tables in the page. I want to find t... | stackexchange/codereview |
I need to get angle in radians. I have:
CGFloat angle = asin(myImage.transform.b);
This seems to be not working. I need to extract the angle of 'myImage' at any moment in time. How would I extract this?
| stackexchange/codereview |
I am working on the Rails 3 Test cases . While writing case i got Deprecation error like
DEPRECATION WARNING: Errors#on have been deprecated, use Errors#[] instead.
Also note that the behaviour of Errors#[] has changed. Errors#[] now always returns an Array. An empty Array is returned when there are no errors on the s... | stackexchange/codereview |
I have an app that I have written that works fine on the Samsung Galaxy S series (I have a captivate). However, the app apparently doesn't work on the Droid's as Motorola has laid out the file structure differently.
I'm looking for a way to detect the manufacturer so that I can switch out program behavior.
Does anyone... | stackexchange/codereview |
Okay, this may be involved...
Anyway, I am trying to learn how to use ASP.Net.
The environment is like this:
Windows 7 Professional
Visual Studio 2010
SQL Server 2008 Developer Edition
I am trying to follow the article here:
Developing and Unit Testing an ASP.NET MVC 2 Application - CodeProject
So far, I have install... | stackexchange/codereview |
I am coming up with a web application which will be primarily based on PHP. I would like to know some of the best practices and technologies that I can make use of to come out with the app as fast as possible. My team will be working remotely, so I want to know the best ways of collaborating through web resources too. ... | stackexchange/codereview |
I have to make a program which will print the network settings using "ipconfig" for Windows and "ifconfig" for Linux, but I need to do that with a unique implementation for both OS.
| stackexchange/codereview |
I have a simple php page, with the main content placed in a table which is centred. I want to place a menu which starts at the upper right corner. The code is like this:
echo "<table class=\"center\">";
while($row= mysql_fetch_array($query))
{
echo "<tr>";
echo "<td>";
... content...... | stackexchange/codereview |
I write android application.
How can I use Certificate in https connection when I initialize certificate from directory file and not from packages?
When I have packages file with password, this code works:
KeyStore keyStore = KeyStore.getInstance("PKCS12");
keyStore.load(certificateIs, pass.toCharArray());... | stackexchange/codereview |
I have created a simple mod_perl module, which writes a 0-terminated string to the Flash-clients connecting to the port 843. It works ok, but uses 20m per httpd-child at my CentOS 5 Linux machine.
So I'm trying to rewrite my module in C, but I'm not sure how to access the client socket through the conn_rec struct that ... | stackexchange/codereview |
I wanted to know how to apply flood fill on array , my array is two dimensional , which contains times new roman font type letter boundry.
The boundry line contains 1's and inside and outside all 0's.
I want to fill all 1's instead 0 in only inside.
But i need a logic which do not required more memory.
So avoid recursi... | stackexchange/codereview |
[I globally edited the question to be more "useful" and clear]
I was wondering about the complexity of the implementation of the function exp in cmath.
By complexity, I mean algorithmic complexity if possible. Otherwise cost compared to a floating point operation (addition for example)
The following lines :
double x = ... | stackexchange/codereview |
I have just begun scraping basic text off web pages, and am currently using the HTMLAgilityPack C# library. I had some success with boxscores off rivals.yahoo.com (sports is my thing so why not scrape something interesting?) but I am stuck on NHL's game summary pages. I think this is kind of an interesting problem so... | stackexchange/codereview |
I'd like to use JavaScript only (no jQuery) to replace an inline onmenuclick event handler generated by a third party control with my own.
The custom control has added the following HTML to the page:
<ie:menuitem
menugroupid="200"
description="Create a site for a team or project."
text="New Site"
onmenuclick="i... | stackexchange/codereview |
I've scoured the web and stackoverflow for a good SSL tutorial for an iphone app. I have been unsuccessful at finding something straightforward and easy to comprehend. Any pointers on where to read more about it? I just want to see how i can have a secure connection for login and data transfer via SSL. Thanks!
| stackexchange/codereview |
I am trying to understand what the value of X-forwarded-for really means?
By definition, it's value will be of the form: ip1, ip2, .... ipn.
The situation I am thinking of is this-
I am seeing these XFF values at Squid and requests to squid are coming from a CDN. And the CDN is in-turn requesting content on behalf of a... | stackexchange/codereview |
I'm developing an master rails app which controls other rails apps. It has a bash script to start those rails apps, and it works well while it's invoked in the command line manually.
But if I invoke it in the matter rails app, using backticks, system, or exec, the script will fail.
The error message is:
unicorn_rails ... | stackexchange/codereview |
I tried the solution given in "mysql SELECT COUNT(*) … GROUP BY … not returning rows where the count is zero" but it didn't work for me.
Here is SQL ::
SELECT empid, SUM (total_records) total_records
FROM (SELECT ID,
(CASE WHEN ID LIKE '2%' THEN '2____'
WHEN ID LIKE '3%' TH... | stackexchange/codereview |
if(pCoeff.size()>thisCoeff.size()){
difference=pCoeff.size()-thisCoeff.size();
for(int i=thisCoeff.size(); i<thisCoeff.size()+difference;i++){
thisCoeff.add(i, new Double(0.0)); //this line throws errors
}
}
I've isolated this portion of my program as being the cause of ... | stackexchange/codereview |
With SQL Plus for Oracle Database, I can call
SET autotrace on
and then see Execution Plan, statistics, etc.
The problem is that I want access to information about the Execution Plan and statistics in my Java program. I typically have done something like this to execute a sql statement,
Connection connection = //INITI... | stackexchange/codereview |
What are the applications for Google App Engine Expando Class?
And what are the good practices related to it?
| stackexchange/codereview |
I've been doing some work evaluating NHibernate for an upcoming project and am working through some use cases to see how it performs. I haven't yet been able to find a way to express the following query using the Criteri API.
Two fairly basic tables (cut down for the purpose of this example)
CREATE TABLE Person
(
P... | stackexchange/codereview |
I have a task to play with Java Collections framework. I need to obtain a users list from a database, and store it in a collection. (This is finished and users are stored in a HashSet). Each user is an instance of Person class described with name, surname, birth date, join date, and some other parameters which are not ... | stackexchange/codereview |
I have this :
ubuntu:~/tmp$ ls -l
total 4
drwxr-xr-x 2 abc abc 4096 2010-10-23 14:13 dir1
lrwxrwxrwx 1 abc abc 4 2010-10-23 14:13 dirln -> dir1
dir1 is empty
I want to rename dir1 to dir2 via dirln, like this:
ubuntu:~/tmp$ mv dirln/ dir2
mv: cannot move `dirln/' to `dir2': Not a directory
This gives error.
Can I r... | stackexchange/codereview |
Really quick and simple question but I can't find a decent answer to this - What is the best way to pass data from a controller to a block in Magento.
Incase it makes a difference, I am loading the layout as follows:
$this->loadLayout(array('default', 'myModule_default'));
$this->_initLayoutMessages('customer/ses... | stackexchange/codereview |
Every time I use this code in my applications:
tkMessageBox.showinfo("Test", "Info goes here!")
a message box pops up (like it is supposed to), but after I click OK, the box disappears along with most of the other widgets on the window. How do I prevent the other widgets from disappearing?
Here Is My Code:
from Tkint... | stackexchange/codereview |
Is there any idiom for getting an arbitrary key, value pair from a dictionary without removing them? (P3K)
EDIT:
Sorry for the confusing wording.
I used the word arbitrary in the sense that I don't care about what I'm getting.
It's different from random, where I do care about what I'm getting (i.e., I need probabilitie... | stackexchange/codereview |
Possible Duplicate:
JavaScript foreach Vs for
What's the difference between a for loop and for...in? I mean, if there is a difference, it can't be much.
And, I see within validation scripts sometimes the function written like:
function check() {
with(something) {
if(){
// do something
... | stackexchange/codereview |
I've been playing around with rail's to_xml, trying to create a really simple rest interface for a project i'm working on.
So far, i've come up with
cards = Card.all(:conditions => {:racedate => Date.today.to_s})
render :xml => cards.to_xml(:include => {:races => { :only => [:id, :number, :race_time, :name] } }, :skip... | stackexchange/codereview |
wizard.FindControl does not find the control.
How do I access it so, for example, I can change the text on a button? I'm using a 3rd party source for the button text so cannot use Globalization.
| stackexchange/codereview |
I want to be able to override models and controllers of my rails 3 engine in the base app.
Inspecting $LOAD_PATH, I found engine's 'app/{models,controllers}' there, but I can't explicitly require engine's model or controller file: require 'engine_name/model_name' fails with "no such file" (tried with both namespaced(ap... | stackexchange/codereview |
Let's say I've got a vector a = [1 2 4]. I want it converted into a vector which looks like this b = [1 2 0 4], i.e. each number is placed into a correct position and since 3 is not included into the vector a, it is replaced by 0 in vector b. This can be done the following way:
a = [1 2 4]
b = zeros(1, size(a, 2));
b(1... | stackexchange/codereview |
What it should do is represent objects of various types, but you should be able to control the representation remotely through some network-based api from another application (xml idealy). What I want to do is to have the logic of my application written in C++, where many kinds of "objects" are involved. I'd like to be... | stackexchange/codereview |
Is there a Java equivalent of DateTime.MinValue and DateTime.Today in the Java Date class? Or a way of achieving something similar?
I've realised how spoilt you are with the .NET datetime class, I also need the equivalent of AddDays(), AddMonths().
| stackexchange/codereview |
This is a very interesting wiki article about programs that print their own source code without any access to physical source file (in the filesystem). Examples in the articles include C and Scheme quine programs (yeah, it appears they are called like that). I remember someone asking me long ago (about 5 years) whether... | stackexchange/codereview |
when i am trying to parse an xml, i am getting following exception :-
java.net.UnknownHostException: hibernate.sourceforge.net
at java.net.AbstractPlainSocketImpl.connect(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.con... | stackexchange/codereview |
I have a domain object called User:
class User{
String username;
String firstName;
String lastName;
Zipcode zip;
}
I also have a Zip Code object:
class Zipcode {
String zip;
String city;
String state;
Float lat;
Float long;
}
The zipcode table should never be modified as it contains static reference... | stackexchange/codereview |
I just managed to get py2exe work on a Windows Virtual Machine but stumbled on another problem which I didn't have right after I installed GTK, Pango, Gobject etc. on that machine: When I launch a Python Script the window appears but it immediately stops responding. This happens too if I open a python interpreter and t... | stackexchange/codereview |
I have a class for objects ... lat's say apples.
Each apple object mush have a unique identifier (id)... how do I ensure (elegantly and efficiently) that newly created has unique id.
Thanks
| stackexchange/codereview |
Preface: This question is about a project I am working on with a professor at my university. It is NOT for a grade, but my reputation with this professor does matter. So while my success on this project is important to me, I do not see it as unfair to seek help from Stack Overflow.
That said, here is a high level overv... | stackexchange/codereview |
My JSON object is constructed like this:
var Source =
{
Object: [ //Array
{Title: 'Test', Type: 'Pet', Category: 'Cat', Description: 'Fluffy', Count: 2 }
]
};
I was able to figure out how to properly add to the 'Object' array, but I can't seem to figure out the jQuery syntax to query the object based o... | stackexchange/codereview |
I need a progress bar that's kind of in an odd shape, I've attached an image. It's not a preloader; it's for periodic progress while the user is performing other action on the website. I've played and played with tweens from a symbol of a fill of the bar to no avail. I'm not great at flash, so apparently even this simp... | stackexchange/codereview |
Hi i am looking to implement my own custom file like object for an internal binary format we use at work(i don't really want to go into too much detail because i don't know if i can). I am trying to go for a more pythonic way of doing things since currently we have two functions read/write(each ~4k lines of code) which... | stackexchange/codereview |
I am new to the DataGridView WinForm control and just do not like data Binding. I Used to use Spread OCX back 100 years ago and found it friendly. Now I am running into a problem try to do something simple:
I have a grid with two columns:
1) Name
2) Status
I want to loop through my collection of "ChinaVisas" and displa... | stackexchange/codereview |
My .htaccess file is:
Redirect 301 http://domain.com/news/articles?dtMain_start=150 http://domain.com/news/articles
Redirect 301 http://domain.com/news/articles?dtMain_start=160 http://domain.com/news/articles
Redirect 301 http://domain.com/news/articles?dtMain_start=170 http://domain.com/news/article... | stackexchange/codereview |
In wordpress, when you make a blog entry, it displays the date year etc of that blog.
Is there a php/jquery script that can take any kind of title and render an image of that?
In other words if the entry data is "20th july 2010" how would I get it to render each of the three items in a different font/image.
| stackexchange/codereview |
I'm very bad with recursion, never used it before. I know the theory of it .. not that that helps :)) For my problem i have a structure of TCollection that contains TCollection and TCollectionItem etc .. I have to write a recursion function that will read all my TCollectionItems.
Here is graphical view:
TCollection->TC... | stackexchange/codereview |
Consider the following situation. I have an Entity named ProductSupplier that is a Presentation Model. It is created by doing an inner join of Products and Suppliers, and creating a new projection from a Linq statement. The ProductSupplier projection also creates a list of PartType objects, which is also a Presentation... | stackexchange/codereview |
I'm creating a script for uploading and processing something.
user upload an excel file
in the destination script, the excel data are converted to a query
the query converted to json using SerializeJSON
and then this json data is submitted one by one using ajax and setInterval function
currently the interval for set... | stackexchange/codereview |
)
I'm developing a website and I want to use PHPBB auth system. I managed to get it working pretty well, following a few suggestions I found on this website, but I've got a problem.
Basically all I need to do is accessing template variables such as {U_PROFILE}, {L_PROFILE}, {U_PRIVATEMSGS}, {PRIVATE_MESSAGE_INFO} and o... | stackexchange/codereview |
I have a setup with multiple form fields..
<input type='text' id='Trait1' >0</input>
<input type='text' id='Trait2' >1</input>
<input type='text' id='Trait3' >2</input>
<input type='text' id='Trait4' >3</input>
(data used is just for example)
When I use
$.JSON.Stringify(form.serializeArray());
I get something like..... | stackexchange/codereview |
Objective:
The Leaves Management and Payroll system requires the official weekend hodiday scheme stored in the database to be referred to while generating the monthly salary for each employee in the organisation. Generating flexible Database Schema for storing the weekend scheme is the objective.
Problem:
The database ... | stackexchange/codereview |
I want to do something like this
<%#(DataBinder.Eval(Container, "DataItem.Age").ToString()=="0")
?"n/a"
:"DataBinder.Eval(Container, "DataItem.Age")"%>
is it possible?
| stackexchange/codereview |
I understand gmail does not support background-images or background: url('.. in Gmail. I was wondering if anyone had a sizeable workaround to this?
This is for emails I send via a server to a user's email accounts if they are using gmail.
| stackexchange/codereview |
I have a readonly access to a SVN project. I checked out the project, and now I want to work on local copy (and want to version it along the way, but I cannot in the same SVN because I do not have access, instead I would have just created a branch) So, I create a new SVN repository, and now I want to import the checked... | stackexchange/codereview |
i am new to SSRS and i have to generate sales report in which we have to apply different
conditions in different columns
i have three columns that has three conditions
in profit column condition is accountID=13 and TypeID=23
in units column condition is accountID=8 and TypeID=14
in Disbursement column condition is acc... | stackexchange/codereview |
Can anyone explain why the following occurs:
String.Format(null, "foo") // Returns foo
String.Format((string)null, "foo") // Throws ArgumentNullException:
// Value cannot be null.
// Parameter name: format
Thanks.
| stackexchange/codereview |
Hi why each none blocking server is build with C ? cant i build it with c++ ?
| stackexchange/codereview |
Let me say we have a simple programming task. But for the sake of clarity I start with few code samples.
First of all we written a some kind of data container class but for the purposes of task no matter what the class is. We just need it to behave const-correct.
class DataComponent {
public:
const std::string& get... | stackexchange/codereview |
I'm currently researching user authentication protocols for a website I'm developing. I would like to create an authentication cookie so users can stay logged in between pages.
Here is my first bash:
cookie = user_id|expiry_date|HMAC(user_id|expiry_date, k)
Where k is HMAC(user_id|expiry_date, sk) and sk is a 256 bit... | stackexchange/codereview |
I'm trying to prepend a string a read-only, multi-line TextBox using the following code:
private void AddText(string text){
// output is a StringBuilder object
output.Insert(0, "\r\n");
output.Insert(0, text);
this.textBox1.Text = output.ToString();
}
The issue is that sometimes the window ends up just hangin... | stackexchange/codereview |
I am using node.js for long held connections. I want to know how I can detect when the client connection closes (maybe when the user closes the tab). How do I specify a callback for that?
| stackexchange/codereview |
i have an array of 5 objects.
i want to assign object which is at index 1, to an NSSTRING.
nsstring *abc = [array objectAtindex:1];
i know this is wrong syntax, this is returning object , something like this.
how can i get value which is at index 1 and assign it to an string?
regards
| stackexchange/codereview |
I thought I was doing something relatively simple, but I guess not.
Running:
NSLog(@"%f",[[UIScreen mainScreen] scale];
returns 0.000000
The problem is that I am trying to check for a retina display and the:
if([UIScreen respondsToSelector:@selector(scale)] &&
[[UIScreen mainScreen] scale] == 2.0) {
// does not... | stackexchange/codereview |
I am trying to write a .oct function for Octave that, given a single sine wave value, between -1 and 1, and sine wave period, returns a sine wave vector of period length with the last value in the vector being the given sine wave value. My code so far is:
#include <octave/oct.h>
#include <octave/dColVector.h>
#include ... | stackexchange/codereview |
I wonder if there is a Node.js application that starts a server on the current folder to let me edit files through the web browser?
Kinda like http://www.cloud9ide.com, but for general editing (scripts, text etc).
| stackexchange/codereview |
I have form which is opened using ShowDialog Method. In this form i have a Button called More.
If we click on More it should open another form and it should close the current form.
on More Button's Click event Handler i have written the following code
MoreActions objUI = new MoreActions ();
objUI.ShowDialog();
this.Cl... | stackexchange/codereview |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.