instruction_seed stringlengths 1 35.8k | _source stringclasses 1
value |
|---|---|
I am using Ubuntu telnet client.
I am trying to send 2 lines over the telnet connection that I have made.
For example:
> telnet en.wikipedia.org 80
GET /wiki/Main_Page http/1.1 <CR> // line 1
Host: en.wikipedia.org <CR> // line 2
<CR>
where CR stand... | stackexchange/codereview |
I searching minmax heap algorithm implementation,
i remember some things about this structure, her implementation is on one heap.
Even levels (floors) in heap tree is a min colored, and rest of nodes is max colored.
I remember some draft of workings of this but i searching some good document about it or some C or C++ c... | stackexchange/codereview |
What I would like to do is the following:
I'm currently deploying a huge collection of lists and codebehind. But, what I also want to deploy is the 'visual side' of the package. But, currently, this is done using Sharepoint Designer 2010.
My guess is that all the modifications I do in Sharepoint Designer 2010 can be do... | stackexchange/codereview |
I feel like I'm missing something obvious here!
seq = {'a': ['1'], 'aa': ['2'], 'aaa': ['3'], 'aaaa': ['4'], 'aaaaa': ['5']}
for s in seq:
print(s)
outputs:
a
aa
aaaa
aaaaa
aaa
Whereas surely it should output:
a
aa
aaa
aaaa
aaaaa
What's going wrong here?
| stackexchange/codereview |
In Oracle, there's a view called V$SQLAREA that lists statistics on shared SQL area and contains one row per SQL string. It provides statistics on SQL statements that are in memory, parsed, and ready for execution.
There is one column -ROWS_PROCESSED that sums the Total number of rows processed on behalf of this SQL st... | stackexchange/codereview |
I am doing an assignment about use blowfish to do encryption & decryption in java.
I had added a provider, and get instance "Blowfish/ECB/NoPadding", but I still get this error when I do the encryption.
Security.addProvider(new org.bouncycastle.jce.provider.BouncyCastleProvider());
e.g.:
public static byte[] encrypt(... | stackexchange/codereview |
I have a WindsorContainer with a IModelInterceptorsSelector. It works well except for component's that have no implementation (eg. have all behavior handled dynamically by an IInterceptor).
If I try to resolve a component with an interface only, I get:
Castle.MicroKernel.ComponentActivator.ComponentActivatorException o... | stackexchange/codereview |
In at least some of the PowerShell v2 CTPs, there was a cmdlet known as "push-runspace" which (I'm told) allowed you to get what was essentially a local window running a remote PowerShell. This cmdlet, however, and all of the *-runspace ones, are not present in PowerShell v2. The only mention I can see of this sort of ... | stackexchange/codereview |
I feel like this should not be this complicated, but I'm sure I'm missing something trivial.
Thanks for anyone that can help!
XSL:
<select id="mySelectList">
<option id="1" description="Blue" />
<option id="2" description="Black" />
<option id="3" description="Green" />
</select>
JS:
$("#mySelectList option[id='... | stackexchange/codereview |
Lets say I have a listener interface defined as:
class Listener
{
public:
virtual void doSomething(void) = 0;
}
and an abstract class that inherits publicly from my interface:
class AbstractBase: public Listener
{
public:
virtual void doSomething(void){ ...do something }
}
My derived class inherits ... | stackexchange/codereview |
It is working properly every time the page loads at the first time. However when we do a Postback the editor disappears with just the textarea.
The postback is happening due to a dropdown on the page.
<asp:TextBox runat="server" ID="TBClosingInstructions" TextMode="MultiLine" Rows="8" Columns="40" TabIndex="2" Font-Nam... | stackexchange/codereview |
We have a huge amount of htmlsuite deisgned by business analyst and we want to launch them during continuous integration (or every night) automatically. The problem is that the machine with selenium-RC is not the same one than the continuous integration :
In java, we used the client-driver and it works fine :
seleniu... | stackexchange/codereview |
I hope the question makes sense, anyways. I'm looking to know if in VB.NET, when we call an object's constructor, is there some kind of a reference that points back to the caller?
I'm interested because of a corner case where I want the object being created to first be able to validate the existence of some data in th... | stackexchange/codereview |
My controller has this:
public JsonResult Json()
{
return Json(myJsonObject);
}
My issue is that the returned json needs to be somewhat escaped like so:
json.Replace("\"", "\\\"");
So ideally I would return something like
JavaScriptSerializer.Serialize(myJsonObject).Replace("\"", "\\\"")
... | stackexchange/codereview |
I am using this to pop open a down load option but for some text files it works and for some it doesnt. please help
$fp = fopen($savingFolder.'/'.$fileName, 'r');
header('Content-type: '.$savingFolder.'/'.$fileName);
header('Content-Disposition: attachment; filename="'.$savingFolder.'/'.$fileName.'"');
fpassthru($fp); ... | stackexchange/codereview |
i know i might be asking the same question as other used to ask but i'm really confused with when to use ID and class. I have googled about it and read some posted questions on Stackoverflow here as well but still have doubt about it. I understand that ID can only be used once in a page and class can be use more than o... | stackexchange/codereview |
So I am trying to create some service model for my app. I need it to be in C++, based on free libs like boost ffmpeg and so on. So I found boost services. I wonder will be capable of making 2 or more apps (each of my services is stand alone app/process) share same port and just have difrent url endings. Like http://adr... | stackexchange/codereview |
Possible Duplicate:
What does the term Plain Old Java Object(POJO) exactly mean?
I know those are recent concepts proposed by Mark Fowler. can anyone explain what the purpose of POJO or POCO and their usage?
| stackexchange/codereview |
I'm new to php, so apologies if I've overlooked something simple. I want to install the php extension pecl_http. I have followed the instructions here http://www.mkfoster.com/2009/01/04/how-to-install-a-php-pecl-extensionmodule-on-ubuntu/, specifically:
sudo apt-get install php-pear
sudo apt-get install php5-dev
sudo... | stackexchange/codereview |
I have a page containing a mix of HTML and Flash content produced by Fusion Charts Free. I'd like people to be able to print this page, but it looks like browsers other than IE are not capable of doing that; content from plugins like Flash just turns up empty in the printout.
I did some research and came across this f... | stackexchange/codereview |
I'm writing an application using Ruby and the Eventmachine library. I really like the idea of non blocking I/O and event driven systems, the problem I'm running into is logging. I'm using Ruby's standard logger library. Its not that logging takes forever but it seems like something that shouldn't block and it does. Is ... | stackexchange/codereview |
I have written a template function like this:
template <class T>
const T& max1(const T& x, const T& y)
{
if(y < x)
return x;
return y;
}
Now, how can I use this function to compare two objects of class A where class A is like the following?
class A
{
public:
A(int x){i=x;}
private:
friend bool operat... | stackexchange/codereview |
I am writing a script in php4 that downloads a xml file that has been compressed into a .gz file. The normal file is 25MB, when compressed into a .gz file its only 2.5MB. My question is, is there any benefits of downloading the file in compressed .gz file other than the smaller file size? In order to process the xml fi... | stackexchange/codereview |
How to test that a void method throws a specific exception in .NET.
I have a method that throws 3 different types of exceptions depending on inputs. How would I test that I get the current one each time, AND ALSO test that it doesn't throw any when passed with the correct inputs.
Thanks!
| stackexchange/codereview |
I'm trying to implement The Android LicenseChecker in my app, and I've followed the instructions almost verbatim from the developer site. Everything seems hooked up correctly, but every single time I get the "Check timed out." message.
I increased the timeout value to 30 seconds, I'm logged into my device (which has ... | stackexchange/codereview |
I was using Apple's Instruments "Allocations" tool and noticed that when I went back and forth between two views, the allocation always grows. Investigating, I found that all of the memory is from objects that are subviews of my UIViewController's UIView.
I checked and my UIViewController is being dealloced, but appar... | stackexchange/codereview |
I know what' im trying to do is simple. I had this working before with a change function but now I am switching out the dropdown for 2 images and a mouseover event. If a user clicks on image 1 then div 1 would show with a nice slide effect if 2 by chance was active they would swap. If they click on 2 then div 2 would s... | stackexchange/codereview |
I want to do some REST style cording using java sevelets and jsp. I have implemented doPUT in the servelet but when i send a Ajax request using HTTP PUT, this gives the following error.
type Status report
message HTTP method PUT is not supported by this URL
description The specified HTTP method is not allowed for the... | stackexchange/codereview |
I've been customizing SharePoint 2007 through SP Designer and Visual Studio, but until this point I haven't done any development that required a SharePoint template in VS. Now I have to create a custom workflow in VS and getting my environment setup seems to be a major hurdle.
Here's my current setup:
64-bit PC with W... | stackexchange/codereview |
My header file is as follows:
#include <iostream>
#include <string>
#include <windows.h>
#include <math.h>
//using namespace std;
std::string StringMultiply(string Str, int Mult)
{
std::string Return;
for (int Index = 0; Index <= Mult; Index++)
{
Return += Str;
}
return Return;
}
Compil... | stackexchange/codereview |
I’ve been searching Google and Stack Overflow like crazy for days and have yet to find any recent, completely relevant information to answer the following question: What are the best C#/F#/.NET math libraries (specifically, those that wrap or implement the same functionality as Lapack, etc.)?
One of the better posts on... | stackexchange/codereview |
Can anyone suggest some good resources and/or books on profiling, importance of profiling, profiling techniques?
thanks
| stackexchange/codereview |
would like to know if there is any web service testing tool eclipse plugin.
I looked at soap ui eclipse plugin , but its to big to get it installed in my environment.
Is there a simple eclipse plugin that is free and let me fire soap requests and see soap responses in Eclipse?.
Thanks.
| stackexchange/codereview |
I want to convert words containing alphabetical characters into a representative number in Java.
For example, four hundred four should evaluate to the number 404.
If the letters are gibberish like asdf then that's an error.
I know I can convert bare Characters to their ascii equivalent Integer, appending those togeth... | stackexchange/codereview |
I have an ActivityInstrumentationTestCase2 (which is a subclass of InstrumentationTestCase). When running my testcases, I need to launch my activities using a custom TestApplication object, since this TestApplication objects has some configuration necessary for my tests.
However, I don't see a way to customize my Acti... | stackexchange/codereview |
I am building an API where the user requests a 'command', which is passed into a class. Assuming the command matches a PUBLIC function, it will execute successfully.
If the command matches a PROTECTED function, it needs to throw an error.
The idea is that functions can be disabled by changing them from PUBLIC to PROTEC... | stackexchange/codereview |
I am a little stuck. Why wont this work? I just get a error saying:
java.lang.NoSuchMethodError: main
Exception in thread "main"
import java.awt.*;
import javax.swing.*;
@SuppressWarnings("serial")
public class ShowPNG extends JFrame
{
public void main(String arg)
{
if (arg == null ) {
arg... | stackexchange/codereview |
Are Java's and C#'s Threads based on User-Space Threads or Kernel-Space Threads?
| stackexchange/codereview |
How many lines of code can a method have with a good design before you need to make the design better?
| stackexchange/codereview |
I have list with items in my data class:
public ObservableCollection<Node> NodesFromDatabase
{
get
{
if (_nodesFromDatabase == null)
_nodesFromDatabase =GenerateMenuNodes();
return _nodesFromDatabase ;
}
set
{
_nodesFromD... | stackexchange/codereview |
We're currently migrating our ASP Intranet to .NET and we started to develop this Intranet in one ASP.NET website. This, however, raised some problems regarding Visual Studio (performance, compile-time, ...).
Because our Intranet basically exists of modules, we want to seperate our project in subprojects in Visual Stud... | stackexchange/codereview |
I'm trying to display custom menu items similar to copy-paste menu item, is there any way I can do this?
| stackexchange/codereview |
I have two Integer variables like
int Max = 10;
int limit = 5;
and a Dictionary
Dictionary<String , String> MyDict = new Dictionary<string,string>();
I need to fill the dictionary with Max elements and if the index is greater than or equal to limit then the value should be none.
Here is my sample code which will cl... | stackexchange/codereview |
I am trying to display a list of tags as the tag.name (instead of the list). However when I try and run a for-loop over the list, it throws the "Caught TypeError while rendering: 'BoundField' object is not iterable."
<dd>{% for tag in form.tags %}{{tag.name}}{% endfor %}</dd>
Iterating through .all will load the pag... | stackexchange/codereview |
I have a template class that has lots of functions but is essentially a vector class. I want to add one function to just the bool type.
#include <vector>
template <typename T>
class reflected{
private:
T*dev_;
T*host_;
ar_size size;
reflected<T>& operator=(reflected<T>& rhs);//do no... | stackexchange/codereview |
How can you check if a window is minimized via the terminal in linux?
| stackexchange/codereview |
Let's say you're given http://nytimes.com
How would you pull out the "main" image?
The reason I'm asking is because Flipboard is able to grab the main image from a website, just using the URL.
You could parse out all the image tags. But then what?
| stackexchange/codereview |
I'm using setExtensionJs with an user-extensions.js file that defines a doFoo prototype.
This throws an exception everytime Selenium starts:
CHECKPOINT-FAIL com.thoughtworks.selenium.SeleniumException: ERROR: Unknown command "doFoo"
The setExtensionJs call is of course before of the start call.
Launching Selenium with... | stackexchange/codereview |
Possible Duplicate:
How to force my application to open one exe only? qt, linux
Hi,
I want to force my application to open one exe only, how to do it by QsystemSemaphore?
i.e. if the proce
10x!
| stackexchange/codereview |
I am working on a network application with threading. I have an event handler which results in a form showing on the screen. The problem is that the thread that makes this call blocks right after, so the form that shows blocks as well.
I have hacked this problem by making that function change something in the form it's... | stackexchange/codereview |
How does this new "Instant Personalization" Facebook feature work? It seems like a terrible idea to me. But if Rotten Tomatoes can use it, then can I too? Or is it only available to certain special partners?
| stackexchange/codereview |
Ruby (and the Rails framework) is the first new programming language that I've learned since graduating with a CS degree way back in 1987; so, please bear with a virtual newbee on this question.
I've been working through Michael Hartl's truly excellent tutorial, Learn Rails By Example. After making my way through the ... | stackexchange/codereview |
I'm trying to get a list of elements out of an XML document where the nodes have a specific attribute value. The document is structured something like this:
<root>
<node type="type1">some text</node>
<node type="type2">some other text</node>
<node type="type1">some more text</node>
<node type="type2">even more ... | stackexchange/codereview |
My task is to do minor refactoring of some elements of XML tree in python 3, namely replace following structure:
<span class="nobr">
<a href="http://www.google.com/">
http://www.google.com/
<sup>
<img align="absmiddle" alt="" border="0" class="rendericon" height="7" src="http://jira.atlassian.com/icon.gif" widt... | stackexchange/codereview |
Previously, while I am looking for the data structure with the following characteristic.
Avoid duplication
Iteration order will be same as insertion order
In Java, I use LinkHashSet, In Python, I use OrderedDict
Now, on the top of 2 requirements, I would like to have an additional requirement
Able to random access t... | stackexchange/codereview |
I have 2 labels and input fields that are wrapped in dt and dd tags. The label and input field are on separate lines giving me 4 lines total. I'm trying to style it so that each input field is on the same line as its label, for a total of 2 lines. I tried float left for #dd1dd and dd2dd but that doesn't work. Can someo... | stackexchange/codereview |
I have two hashmaps. This is just example of 2 hashmaps, there can be n hashmaps.
They look like this
HashMap A = [(a, 23),(b,25),(c,43),(d,34)]
HashMap B = [(a, 32),(b,52),(d,55)]
Now I want to compare these hashmaps in such a way so that I can put the missing key of 'c' into HashMap B with value as 0.
How can I d... | stackexchange/codereview |
I have an app where I have a main window that can contain other docked/attached windows. Right now, when my user control loads I get its parent using Window.GetWindow. This returns a reference to the main window, which is fine. However, when I undock/detach the child window that the user control is on, the parent ch... | stackexchange/codereview |
I want to have potentially thousands of painted shapes on a panel and be able to identify them when I mouseover or click on them. What is the best way to do this?
My guess is I have to have some shape regions in a table. And have some clever way of looking up matches when I hover across page. Seems computationally inte... | stackexchange/codereview |
Newbie question:
As a response to a request, my server returns a Tree-like data structure , and I want to present it as a tree at the client. However , the logic of transforming it into a tree widget is a bit complex.
Should I build the GWT Tree widget at the server and just return it as-is , or should I stick with ra... | stackexchange/codereview |
I am new to sql so please bear with me here.
I have two tables, COURSES and RESPONSES which have a common field userID. I am making a grid view which displays each users available courseName from the COURSES table and dateTaken from the RESPONSE table. So I simply wrote the query as:
SELECT c.*, r.*
FROM COURSES c, RES... | stackexchange/codereview |
Rather than have visual studio open a new browser or tab every time you hit debug is it possible to just refresh the currently opened tab or browser?
I see that in web.config->Web there is the option to not open a page, but that is only half the battle. How do we trigger the browser refresh. Too good to be true?
Also i... | stackexchange/codereview |
Go this tag:
<a href="javascript:{}" onclick="document.getElementById('_paypal').submit(); return false;"><span id="order_now_btn">Order Now</span></a>
Here's the CSS:
#order_now_btn {
background: transparent url("../images/order_now_btn.gif") 0 0px no-repeat;
height: 33px;
width: 111px;
display: block;
font-... | stackexchange/codereview |
I am having some trouble understanding how to use Unix's fork(). I am used to, when in need of parallelization, spawining threads in my application. It's always something of the form
CreateNewThread(MyFunctionToRun());
void myFunctionToRun() { ... }
Now, when learning about Unix's fork(), I was given examples of the ... | stackexchange/codereview |
I would like to insert a little extra space before each <h2> tag I use. Is there a way to accomplish this with CSS?
| stackexchange/codereview |
is there any way to open OpenOffice with the URL when I click on the link in Chrome browser?
To be a bit more precise: I have a WebDAV folder that contains documents.
https://myserver/documents/doc1.odt
https://myserver/documents/doc1.odt
I can open (and modify and store) these documents via open the file using t... | stackexchange/codereview |
I am building an MVC application and am designing a custom model binder for a class; Essentially one of the fields of the model is an object that exists in the database, but it is proving very difficult to associate this with the appropriate objects in HTML. (since a select list will only let me pick an int/string fiel... | stackexchange/codereview |
Any ideas how to "retain" CGPDFDictionaryRef? CFRetain not working, but there must be way to "retain" it.
| stackexchange/codereview |
I have the following code in an html page
jQuery("input[name='newstate']").change(function(){
if(jQuery(this).attr("checked")) {
jQuery('input[name="new-state-name"]').show();
} else {
jQuery('input[name="new-state-name"]').hide();
}
});
But jquery lint gives following message.
You should ... | stackexchange/codereview |
I have a rad grid which fetches the data from database and displays required number of records even though there are number of records
eg: if there are 10,000 records which comes under search criteria. But we are retriving only the records equals to page size. ie., if paze size is 10 then 10 records will be retrived e... | stackexchange/codereview |
I am writing a pthread program now. From what I experienced in C#, I think there might be a race condition in the creation of a thread.
for (i = 0; i < 10; i++)
{
pthread_create(threads[i], NULL, &do_something, (void*)&data[i]);
}
Is it possible that local variable i is updated before the new thread is created? Th... | stackexchange/codereview |
I have two master pages and a content page. On my local machine this code works, but once I uploaded to the server I got the following error:
Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and mo... | stackexchange/codereview |
so i wrote a simple timer class
public class ConsoleTimer : IDisposable
{
private Stopwatch _watch;
private IList _items;
public object Count = "0";
public ConsoleTimer(IList items) {
_watch = new Stopwatch();
_items = items;
_watch.Start();
}
public void Dispose() {
... | stackexchange/codereview |
i am unzipping a file on background thread and i am calling HomeViewController on main thread.in this view controller i have a UIBarButtonItem on UINavigationBar.
if i click this button it goes to StoryViewController and the unzipped data is used there. so i want to show the Home view Controller though the unzipping... | stackexchange/codereview |
How do I get the average cost per visit in a TSQL statement?
I have the total count of visits and summed the cost.
| stackexchange/codereview |
I have SQL Server 2008 with a linked Sybase server and I am trying to execute a stored procedure on the Sybase server using OPENQUERY. If I have a stored proc that doesn't take parameters it succeeds fine. If I have a stored proc with parameters it fails. I even tried a very basic stored proc that only took an int an... | stackexchange/codereview |
This query will show you all of the unread topics in a given forum. The output of EXPLAIN EXTENDED was a bit alarming. I'm wondering if someone here can provide some insight into how I can optimize.
SELECT topic.*
FROM topic
INNER JOIN board ON topic.board_id = board.id OR topic.board_id = board.mirror_board_id
INNER... | stackexchange/codereview |
Here are 2 type of code snippets which have the same outputs.
char *p = "abc";
::printf("%s",p);
And
::printf("%s","abc");
Is there any difference as to where the "abc" string is stored in memory?
I once heard that in the second code, the "abc" string is placed by the compiler in read-only memory (the .text part?)
Ho... | stackexchange/codereview |
I experienced some odd behavior while using C++ type traits and have narrowed my problem down to this quirky little problem for which I will give a ton of explanation since I do not want to leave anything open for misinterpretation.
Say you have a program like so:
#include <iostream>
#include <cstdint>
template <typen... | stackexchange/codereview |
In a project I have to use HTML Quick forms to create elements.
I have created checkbox element with name hobbies[]. When I the form is posted I do get the array of hobbies and their values and would display the same form again.
Now I want to remove those checkboxes which were not selected.
Basically in HTML Quick form... | stackexchange/codereview |
How do I convert a Image stream from the Picture to an imagesource?
Im using this
MediaLibrary library = new MediaLibrary();
foreach (Picture Alb in library.Pictures)
{
Z.ImageSource = Alb.GetImage();
}
| stackexchange/codereview |
I'm wondering how to implement some permission logic in a Rails 2.3.8 app.
For example, a user can only edit tasks the user created (aka "owns").
Should I do something like this:
user.can_edit_task(task)
or this:
task.can_be_edited_by?(user)
#Method needs to be passed in a user object (from controller). But then how
... | stackexchange/codereview |
I am pulling a date and it only has the month and day. I need to add the year before saving to database. The dates being pulled only go as far a year off. Is there a way to do this?
The way I am receiving the date is Nov 12 or "M d"
| stackexchange/codereview |
In my application my users can generate statements, monthly and weekly. I've recently been
asked to allow the users the capability to associate a customer with either weekly or monthly
but not both, to a customer. This then leads to...if a user selects a weekly customer and runs a monthly
statement, he or she, should b... | stackexchange/codereview |
The following code works fine
#include <functional>
using namespace std;
using namespace std::placeholders;
class A
{
int operator()( int i, int j ) { return i - j; }
};
A a;
auto aBind = bind( &A::operator(), ref(a), _2, _1 );
This does not
#include <functional>
using namespace std;
using namespace std::placeho... | stackexchange/codereview |
I think it would greatly simplify function overloading if I could just write the case that takes the most parameters and then simply stuff each case having less parameters with dummy params. For example..
// Add two integers
Func<int, int, int> addInts = (x, y) => { return x + y; };
// Add one to an integer
Func<int... | stackexchange/codereview |
I have one model based on ActiveRecord and another based on a Mogoid::Document. Is that possible to do an association together ?
For Example, the 2 models :
class User < ActiveRecord::Base
has_one :avatar, :dependent => :destroy
end
class Avatar
include Mongoid::Document
field :file_name
end
And retrieve User's... | stackexchange/codereview |
Consider a MessageBox to prompt the user to answer yes or no. It works in our XP machines and one Windows 7 build machine.
However, it doesn't work on our Windows 7 Embedded machine. There is no error message, no MessageBox shows up. It just assumes the user clicked the Yes button because I can find the debug file cre... | stackexchange/codereview |
This is the skeleton of the code I have:
if(CheckForSomething())
{
try
{
//do something
}
catch (UnauthorizedAccessException ex)
{
LogException(ex, item.server);
}
catch (Exception ex)
{
LogException(ex, item.server);
}
}
else
{
string error = "Some error"... | stackexchange/codereview |
In my Qt project i have enum:
enum Field {EMPTY=0, WHITE=1, BLACK=2};
And array of this enum:
Field field[8][8];
Now i need create Stack of this array. Ever element of stack must be field[8][8]. How can i make it?
| stackexchange/codereview |
I have created an application wherein on click of a button an email with attachment is sent. The attributes for this email is hardcoded in the service method as below in my service class.
mailService.sendMail {
to "a@xyz.com"
from "a@xyz.com"
cc "a@xyz.com"
bcc "a@xyz... | stackexchange/codereview |
I saw the following code:
http://sourcemaking.com/design_patterns/singleton/cpp/1
class GlobalClass
{
private:
int m_value;
static GlobalClass *s_instance;
GlobalClass(int v = 0)
{
m_value = v;
}
public:
int get_value()
{
return m_value;
}
void set_value(int v)
{
... | stackexchange/codereview |
I am building a dynamic (food) menu system for a website. Users will be able to add and remove menu items as they like and alter price etc. If the menus were static then I would have a static form for example
<form id="order_form" action="order.php" method="POST" class="form">
<ul>
<li>cheese burger<input type="text" ... | stackexchange/codereview |
I have a simple HTML page that rotates through several status pages that I display on several tv's around campus. I regularly update the page and the links. Many times the pages require authentication. It is a pain to remote to ever terminal to supply credentials. Some are HTTP authentication and some are some <form> b... | stackexchange/codereview |
Where does the jquery ajax success callback return to?
I have written a request method that makes an ajax call, detects if I have supplied a callback or returns the datanode of the response XML.
Request Method:
function request(request, dontRefresh)
{
var requestXML = composeRequestXML(request);
$.ajax({
... | stackexchange/codereview |
I currently have the following array in a Java program,
byte[] data = new byte[800];
and I'd like to compress it before sending it to a microcontroller over serial (115200 Baud). I would like to then decompress the array on the microcontroller in C. However, I'm not quite sure what the best way to do this is. Perf... | stackexchange/codereview |
As far as I know, the > (#test>div) means that the div is required to be a direct child of #test.
Where a space (#test div) means that it can be a descendant/ancestor relationship. So #test p div would be affected by simply a reference to #test div
What browsers support the first one mentioned?
| stackexchange/codereview |
I'm using the Google Maps v3 library, with the Multi-Marker library which extends the functionality of Google Maps for super fast adding of map marker icons to a map.
I can't figure out how to remove a single, individual map marker using the multi-marker library linked above.
Does anyone have any ideas how I'd do this ... | stackexchange/codereview |
I've been scouring throug the examples and tutorials but I can't seem to get my head around how to handle recycling within a subclassed SimpleCursorAdapter. I know that for regular ArrayAdapters you can check convertView for null and inflate if null from the xml and if not null, recycle, but I'm having a little troubl... | stackexchange/codereview |
I have some questions regarding timezones. We store all our date in UTC time, but we need to show some of them in local (US Eastern) time and UTC at the same time.
Here is my test, I have a date in UTC and want to display it in UTC and local time:
<html>
<!-- let's assume this date is in UTC, I get it from Database i... | stackexchange/codereview |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.