instruction_seed stringlengths 1 35.8k | _source stringclasses 1
value |
|---|---|
I've successfully posted to a fan page as the actual page via the Graph API.
The problem is that the post says it was posted at "time via application name". Is there any way to hide this, so my post looks exactly as if I typed it directly into Facebook?
I'm building a messaging center that can easily deliver messages o... | stackexchange/codereview |
Could someone explain me this strange result on python 2.6.6 ?
>>> a = "xx"
>>> b = "xx"
>>> a.__hash__() == b.__hash__()
True
>>> a is b
True # ok.. was just to be sure
>>> a = "x" * 2
>>> b = "x" * 2
>>> a.__hash__() == b.__hash__()
True
>>> a is b
True # yeah.. looks ok so far !
>>> n = 2
>>> a = "x" * n
>>> b = "... | stackexchange/codereview |
I need a regex that will only find matches where the entire string matches my query.
For instance if I do a search for movies with the name "Red October" I only want to match on that exact title (case insensitive) but not match titles like "The Hunt For Red October". Not quite sure I know how to do this. Anyone know?
T... | stackexchange/codereview |
I've created a server/client application and in my client app i initialized my connection in the Program.cs file in which i also initialize my Form application . How can i, lets say, click on an button on my form and call a function in my Program.cs file ?
| stackexchange/codereview |
I have a button named start and I want to know in the method that it calls what it's name is and I'm not really sure how to do it. This is the method the button calls.
-(IBAction) startMotion: (id)sender {
UIButton * buttonName = (UIButton *) sender;
NSLog(@"Button Name: %@", buttonName.currentTitle);
}
The ... | stackexchange/codereview |
I have a Java application with a number of components communicating via JMS (ActiveMQ). Currently, the application and the JMS Hub are on the same server, although we eventually plan to split out the components for scalability. We have significant issues with performance, all seemingly around JMS, most notably, and the... | stackexchange/codereview |
I've recently enabled Digest Authentication on an intranet website/application I am creating for my company in ASP.NET.
The reason I have done so is because Windows Authentication seemed to only work for some users, and not for others. I could not figure out why nor do I know enough about IIS to try and trace the issue... | stackexchange/codereview |
I have developed a small application and now I want to create and administrator module. In the future I would like to add different modules but for now i would like to treat this admin as a module and to access it like http://host/module/controller
I have read about zend_autoloader and wrote this in my Bootstrap.php
pr... | stackexchange/codereview |
I am working on an OpenGL renderer in Win32... I was wondering, when a texture is bound to an ID if it is automatically destroyed and wiped from the video memory when the rendering context is destroyed, or does that count as a memory leak if they are left bound when the process terminates suddenly.
Thanks
| stackexchange/codereview |
I want to measure bandwidh using c#. Here what I did. Comments and suggestions are welcome.
Find maximum udp payload(on my test bed, its 1472 byte)
Create non compressible data with 1472 byte size
Send this data from a server to a client multiple times(on my test, its 5000 packets)
Client start stopwatch at the time t... | stackexchange/codereview |
If I had a label on a view that I wanted to have the width equal to the width of two columns in one of my grids on the same view, how would I set up the binding without using a converter? Should I use properties to preform my calculation and store a value? It is my intention that if the view's grid size changes then t... | stackexchange/codereview |
I set cookies on main.com, but i need to get these cookies from other my domain2.com, how to do this with curl or another ways?
It`s my code in domain2.com/get.php:
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, 'http://main.com');
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, false);
curl_setopt($curl, CURLOPT_HEA... | stackexchange/codereview |
I have just installed EclEmma into my Eclipse setup and run it against a test suite to see what code coverage I had on its target methods.
I have found that any lines where I throw a new NullPointerException are not covered, despite asserting in the test that one will be thrown when the method is invoked. I am finding ... | stackexchange/codereview |
Let me start off by saying I'm a PHP developer, not an ASP one. (And I really wish ASP had isset().) And I'm working in a live environment so I don't really have an opportunity to do any testing.
All the resources I've found suggest different ways to test for the existence of a variable.
Here's what I'm trying to do:
... | stackexchange/codereview |
From a DOS command I want to move all files that do not match a file name pattern.
Something like this:
For example I want to move all files that do not start with "aaa"
for %i in (*) do if not %i == aaa* move %i .\..
| stackexchange/codereview |
I am trying to do a simple update to a sqlite database using EGODatabase and although the code runs the update does not occur?
NSArray *params = [NSArray arrayWithObjects:@"TEST", nil];
EGODatabase *database = [EGODatabase databaseWithPath:[[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"db_USB... | stackexchange/codereview |
I'd like to use Google Calendar for adding party events, so I added a new calendar, "events". Is there a function for deleting all events in that calendar?
Or is it only possible by deleting the whole calender and re-creating it?
I'm having offline data which updates daily, so I thought the best method would be flushin... | stackexchange/codereview |
My Objective is : I want to test a piece of code (or function) performance, just like how I test the correctness of that function in a unit-test, let say that the output of this benchmarking process is a "function performance index" which is "portable"
My Problem is : we usually benchmarking a code by using a timer to ... | stackexchange/codereview |
I searching function something like OpenFileDialog on .NET but on win32, i can't find this function on this name on msdn and i remember this function exists.
Can anyone give me name?
Greetings,
| stackexchange/codereview |
What am I doing wrong here?
Created:
CustomTab.h
#import <UIKit/UIKit.h>
@interface CustomTab : UIView {
IBOutlet UIView *view;
}
@property (nonatomic, retain) IBOutlet UIView *view;
@end
CustomTab.m
#import "CustomTab.h"
@implementation CustomTab
@synthesize view;
- (id)initWithFrame:(CGRect)frame {
if ... | stackexchange/codereview |
I have a little problem.
When I set the css rule using some property, say, background-image in an external .css file and then try to access it using javascript in another external .js file, it does not work. That is to say I do not get any value for document.getElementById(someId).style.backgroundImage.
But when I set... | stackexchange/codereview |
In my C++ app, I'm making a call to System() that crashes the app sometimes (it's a service). I'd like to catch the exception that is thrown and log it. I don't know what exactly to catch, though, and I can't even do a blanket catch:
try
{
system(myCommand);
}
catch (...)
{
Log("Error!"); // this is a custom log ... | stackexchange/codereview |
Spoiler alert: Maybe a stupid question. :)
#include <iostream>
using namespace std;
class Base
{
public:
virtual void YourMethod(int) const = 0;
};
class Intermediate : private Base
{
public:
virtual void YourMethod(int i) const
{
cout << "Calling from Intermediate" << i <... | stackexchange/codereview |
If I want an empty map or a one element map, Java Collections has a method for that. Why is there no method for more than one element? What's the best way to create a static final map with 2 elements in it? I know I can do something like:
private static final Map<String, String> MAP = new HashMap<String, String>() {
... | stackexchange/codereview |
I tried to write a small script to automate the creation of playlists (m3u) for dozens of folders/subfolders of mp3/mp4 files, while omitting various other misc files therein. I know very little about Powershell but managed to piece together something that almost works. The only blip is that when I use "$_.extension -e... | stackexchange/codereview |
The range for x and y is from 0 to 99.
I am currently doing it like this:
excludeFromTrainingSet = []
while len(excludeFromTrainingSet) < 4000:
tempX = random.randint(0, 99)
tempY = random.randint(0, 99)
if [tempX, tempY] not in excludeFromTrainingSet:
excludeFromTrainingSet.append([tempX, tempY])
... | stackexchange/codereview |
I know that there have been plenty of topics describing this topic but I still can't put up my mind what to choose.First of all, I need you to know that I am a student in his last year, who will probably continue studying for a few years. However, I'm trying to find what I would benefit most from.
I've been in contact ... | stackexchange/codereview |
I am implementing a testcase in Android Juint. I am facing problem in
handling threads. After the successful running of a test case, it will
not wait for child thread to be finished. e.g. If one testcase call
some services in server. testcase will successfully send request to a
server, but it will not wait for a respon... | stackexchange/codereview |
My code for opening an input dialog reads as follows:
final AlertDialog.Builder alert = new AlertDialog.Builder(this);
alert.setTitle("Dialog Title");
alert.setMessage("Request information");
LayoutInflater factory = LayoutInflater.from(this);
final View textEntryView = factory.inflate(R.layout.edittextautotextla... | stackexchange/codereview |
I am currently building a web application in PHP that will allow users to create content and upload to the website.
My website has differnet types of pages, and i'm looking for the best way (most efficient CPU wise/speed/load etc..) to load different parts of each page.
So for instance, my main page currently includes ... | stackexchange/codereview |
I have have a form element like this
input type='text' name='phone[]'
input type='text' name='phone[]'
input type='text' name='phone[]'
How do i retrieve all three name element using PHP.
Thank you.
| stackexchange/codereview |
HTML
<div id="header">
<ul id="nav">
<li><a id="ho" href="#spread1-anchor">Home</a> /</li>
<li><a id="bg" href="#spread2-anchor">Background</a> /</li>
<li><a id="ap" href="#spread3-anchor">Approach</a> /</li>
<li><a id="se" href="#spread9-anchor">Services</a> /</li>
<li><a id="cl"... | stackexchange/codereview |
I would like to come up with as many HEX HTML values to have a smooth color gradient from red to green:
I would like this to be similar to the following:
http://www.utexas.edu/learn/html/colors.html
I don't have the best eye for color choices, so I'm hoping a standard chart is already put together showing how to tran... | stackexchange/codereview |
I have an ASP.NET MVC model that I'm working on which contains a property for a List. The code example is below.
public class Foo
{
private List<Bar> _myList;
public List<Bar> MyFilteredList
{
get
{
return _myList;
}
set
{
_myList = value;
... | stackexchange/codereview |
I'm brainstorming a search function for the user that is similar to iTunes Smart Playlists. I can currently display all of the release years for all of the films in the database. A user can pick a year and see all of the films released in that year. Or I can show all of the genres of movie. A user can choose a genr... | stackexchange/codereview |
let's say i want to build a smartphone app that tells a user when/where to get off a subway station. i can think of two ways of doing this:
1) using GPS and map of the subway routes, track the location of the user and notifies him when the destination is reached
2) have him press start when he gets on a train as the t... | stackexchange/codereview |
To select the text here:
Alpha Bravo Charlie Delta Echo Foxtrot
from this HTML structure:
<div id="entry-2" class="item-asset asset hentry">
<div class="asset-header">
<h2 class="asset-name entry-title">
<a rel="bookmark" href="http://blahblah.com/politics-democrat">Pelosi Q&A</a>
</h2>
</di... | stackexchange/codereview |
I use the following class to encrypt and decrypt a string. After creating two identical strings, I encrypt one of the strings and then decrypt it. However, the decrypted string is no longer equal to its twin (even though they look identical in text form after the conversion) . Also, after taking the encrypt-decrypted s... | stackexchange/codereview |
I want to chain 2 Map/Reduce jobs. I am trying to use JobControl to achieve the same. My problem is -
JobControl needs org.apache.hadoop.mapred.jobcontrol.Job which in turn needs org.apache.hadoop.mapred.JobConf which is deprecated. How do I get around this problem to chain my Map/Reduce?
Anyone has any better ideas fo... | stackexchange/codereview |
What's the preferred method of updating other controls when a TreeViewItem has been selected?
Currently I have the following structure in my TreeView
DataStoreType - (DataStoreTypeViewModel)
DataStoreEntry - (DataStoreEntryViewModel)
DataStoreEntry - (DataStoreEntryViewModel)
DataStoreEntry - (DataStoreEntr... | stackexchange/codereview |
i'm new in LINQ.
I wanna query all rows that the description column string (example value "i am feeling lucky today.") contains/match any item in a List<string> lst.
Example the list items contain {"lucky", "bad", "ok" }.
I would like to achieve by using linq only, but I am confuse are below methods correct??
thanks. ... | stackexchange/codereview |
I'm pretty new to powershell. I've built a custom cmdlet. I already have it registered in powershell but i wanted to test it before i started using the cmdlet. So i added a simple testapp to my solution. I'm trying to call my custom cmdlet like the following:
var deploy = new DeployCommand();
deploy.Bra... | stackexchange/codereview |
I have a standard button in my default.aspx page.
<asp:Button ID="Search_Button" runat="server" Text="Search"
onclick="Search_Button_Click" />
and like this i have many buttons in my project. what i wish to do is make the button look fancy and i know it can be done in the CSS file, but i dont kn... | stackexchange/codereview |
I'm creating a Wordpress plugin for collectively managing a Twitter
account. I want to allow the user to add accounts via the Admin panel
similar to the way twitterfeed.com does.
However, the only way I can see of doing it is to get the user to sign
in to their account, register the application under a unique name ... | stackexchange/codereview |
I have several versions of a Ruby gem installed on my machine. I'm using one version for development, but the other is used for production and deployment, so I need them both. Is there a simple way to specify which version of the gem should be used?
Since they are the same gem, their binary names conflict, and I have ... | stackexchange/codereview |
My query seems to be very similar to example from http://dev.mysql.md/doc/refman/5.1/en/in-subquery-optimization.html, but unfortunately receipts from this manual don't work for me.
When I run them separately, both inner and outer queries use indexes, but when I run the whole query, outer query scans the whole table..... | stackexchange/codereview |
I am having a very strange deadlock in a Java application that uses two threads. Both threads read and write data to a shared hashmap. To avoid synchronization problems I made synchronized the functions that read and write data the hashmap:
private synchronized boolean identifiedLinksHasKey(String linkKey){
ret... | stackexchange/codereview |
Is there anyway to identify when or what conditions should I use the different attributes? I looked over the apple documentaries and it seemed quite confusing to me. Can someone give me the definitions and some examples for them? Thanks.
| stackexchange/codereview |
Possible Duplicate:
Access the camera with iPhone SDK
How do I take a photograph in an iPhone app?
Which API can I use?
Please provide sample code.
| stackexchange/codereview |
I am creating a user manager page which updates and adds users in the same page.
Relevant parts of the view:
<h:outputText value="Existing User: "/>
<h:selectOneMenu value="#{userManagerBean.existingUser}" valueChangeListener="#{userManagerBean.updateDetails}" onchange="submit();">
<f:selectItems value="#{userManag... | stackexchange/codereview |
I've come across this issue a few times and would like find out if there is a simple method or pattern I can use to solve it.
Imagine a tree structure where each node contains a STL container (vector) of pointers to children. I want client code to be able to traverse this tree, and iterate through the child containers... | stackexchange/codereview |
I am working on an MFC aplication and i need to make following thing: Add a new popup edit control with three choises - "Red", "Green" and "Blue". I am working on VS 2005 and in the Toolbox i have only "Edit Control" to drop. How can i make the options of it so it became popup edit control and i can write my three choi... | stackexchange/codereview |
I have a name/value collection like this:
for k,v in sorted(userlist):
print k, v
How can I write this out to a file, having each key on a single line, and I want it to overright anything if the file exists.
I will then modify the file by hand, and then I want to read the file back into the dictionary.
sorry new t... | stackexchange/codereview |
My Rails app needs to retrieve an updated count from the server every minute.
I'm attempting to have a javascript timer reload the specific div where I display this count.
<%= javascript_include_tag "http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js", "http://ajax.googleapis.com/ajax/libs/jqueryui/1.8... | stackexchange/codereview |
I've got a project where I'm reading data from an Excel worksheet and saving it in Access tables (not a direct import--see this question if you're interested). My current problem is that any time I run my "import" and then try to open the workbook in Excel, it's "locked for editing" unless/until I close Access. I don't... | stackexchange/codereview |
I have the following create method for a Contact controller:
def create
puts "in create method"
@contact = Contact.create(params[:contact])
unless @contact.vcard.path.blank?
paperclip_vcard = File.new(@contact.vcard.path)
@vcard = Vpim::Vcard.decode(paperclip_vcard).first
@con... | stackexchange/codereview |
im working on a Rails project that should create XMl files, or to be more specific
use existing XMl templates and put content from the database in it.
So i dont need to create the xml structure, basically just rendering a template with content.
What would be the smartest way to do that?
So far i have a file.xml.erb in ... | stackexchange/codereview |
I need to declare two dates in "Ymd" format: $toDate and $fromDate.
$toDate represents today's date and $fromDate needs to be 4 months earlier than today.
$toDate = Date('Ymd');
$fromDate = ?
How do I create $fromDate?
| stackexchange/codereview |
My c# windows service is dying due to an unknown error deep down in one of the worker threads that it creates.
Is there any way to find out the exception that causes the service to be terminated?
(Without writing in a dozen try / catch / log the error codes).
Just a simple one-time report on the error that caused th... | stackexchange/codereview |
We're all familiar with the autocomplete tagging setup here on SO.
I'm wondering what is the most efficient method for querying the tag table in this scenario.
A busy site with many users tagging away with the autocomplete feature requires a lot of querying. Say at any one time there are 100 users typing an average of ... | stackexchange/codereview |
I created a new page, I have the skeleton in .xaml, but the content of the page is dynamically generated. How am I able to navigate to this page ? Is there another way than setting the root frame's content to the new page? In the latter case I cannot handle the back key press event on the new page, because the mainpage... | stackexchange/codereview |
Is it possible to make a folder transparent in the URL like in the following example:
example.com/test/
changed to
example.com/
using mod_rewrite?
I like having folders for organization, but I want a nice clean url.
| stackexchange/codereview |
I am learning C. In the following code why does replacing "*ptr_str" with "ptr_str[i]" in the for loop truncate?
/* 13L01.c: Initializing strings */
#include <stdio.h>
main()
{
char str1[] = {'A', ' ',
's', 't', 'r', 'i', 'n', 'g', ' ',
'c', 'o', 'n', 's', 't', 'a', 'n', 't', '\0'};
char str2[] = "Another string c... | stackexchange/codereview |
I have an issue that I presume should be simple to fix but I just can't seem to find a solution. I have an xml file I want to display. For that, I am currently using an XSLT file to do that. Now, I just changed my CSS from embedded in the XSLT for a CSS file instead, which is better since I will be able to use the same... | stackexchange/codereview |
It's a very simple question. Is
if q and r:
always guaranteed to be equivalent to this?
if q:
if r:
| stackexchange/codereview |
I'm using an external token service to validate my users and they then get redirected to the portal (portal url + some get parameters).
Now I would like to log these users in the portal.
Since the external authentication service is outside of my control I can't just tie it in with the portal login. And since I can't de... | stackexchange/codereview |
Possible Duplicate:
What does the caret mean in C++/CLI?
System::String is a class. What does the additional caret mean?
System::String^ productString = L"";
Has anyone seen this before? I can't find anything in Stroustrop on this one.
| stackexchange/codereview |
To add items to a multi column listbox, using AddItem(), I understood that the text for each column should be delimited with a semicolon.
But what happens if the text to go in one of the columns already contains a semicolon? Is there a way to escape it so that AddItem() treats it literally? Currently the text gets spr... | stackexchange/codereview |
There seems to be two options for registering your classes in a container - explicitly (RegisterType().As) or auto-wiring (RegisterAssemblyTypes()). Both seems to have pretty significant disadvantages.
Registering explicitly means I get a god class that knows about every type in my module, and gets large and unwieldy p... | stackexchange/codereview |
I'm trying to use the following code to load an external page into a div:
$("a.btn").click(function(){
$("div#cart_load").load("*url_here*");
});
The problem is, I have multiple links (a.btn) in a page; each with different URL (e.g. http://myurl.com/product/ID) corresponding to different product.
How do I make the... | stackexchange/codereview |
I need to parse a series of short strings that are comprised of 3 parts: a question and 2 possible answers. The string will follow a consistent format:
This is the question "answer_option_1 is in quotes" "answer_option_2 is in quotes"
I need to identify the question part and the two possible answer choices that are i... | stackexchange/codereview |
I'm trying to serialize a Doctrine_query object in Symfony :
var_dump(serialize($this->pager->getQuery()));
The result is :
string(2) "N;"
What am I doing wrong?
| stackexchange/codereview |
I'm having trouble using DataBindings in a Windows Form / User Control. For example:
Create a windows form, place a single text-box on it & place two buttons on it. The code behind the form is:
Imports System.ComponentModel
Public Class Form1
Implements System.ComponentModel.INotifyPropertyChanged
Public Even... | stackexchange/codereview |
I got like answer from WebClient String (xml). How to extract with Linq some attributes, for example lat and lng ?
<?xml version="1.0" encoding="UTF-8"?>
<GeocodeResponse>
<status>OK</status>
<result>
<type>route</type>
<formatted_address>Prince Michael St, Belgrade, Serbia</formatted_address>
<address_compon... | stackexchange/codereview |
I'm maintaining a Classic ASP app written in VB Script by an outside company long, long ago.
I have an array of imagefile paths, like so:
dim banners, arrKeys, i
set banners=CreateObject("Scripting.Dictionary")
banners.Add "banner1.jpg", "http://www.somelink.com"
banners.Add "banner2.jpg", "http://www.somelink.com"
ban... | stackexchange/codereview |
Hans Passant gave me a great answer here, so I thought of asking for more details to try to understand the way Application.Run() works.
As far as I understand from the docs, it seems that Application.Run() starts a message loop on the current thread, which in turns enables it to process user input (Is that right?). The... | stackexchange/codereview |
I currently use MyIasm as my default engine, i ran mysqltuner to check some statistics for my mysql server.
I tried to disable innoDB support with skip-innodb, but this doesn't seem to disable innodb support on my server.
I am using Ver 14.14 Distrib 5.1.41. Everytime i run mysql tuner i keep getting the innodb warning... | stackexchange/codereview |
I am currently getting request time out for my JSP application when I run it on google app engine. This is due to the 30 seconds respond time.
Since my application request takes some time, I discovered I am required to send multiple request to the servlet from the JSP page to resolve this issue of request time out.
I... | stackexchange/codereview |
I load GNU emacs in it's own window by typing emacs in the terminal.
I like to use the keybindings from pc-selection-mode, which allows you to highlight characters using shift-right or shift-left, or entire lines by pressing shift-up or shift-down.
The problem is that when I run emacs in the terminal by typing emacs -n... | stackexchange/codereview |
In my view I have the following:
<g:hiddenField name='expandableEducationList[${edIdx}]._deleted' value='false'/>
<button
onclick="dojo.byId('expandableEducationList[${edIdx}]._deleted').value='true'; getContainer(this, 'tr').style.display='none'"
style="width:auto;"
ico... | stackexchange/codereview |
<table>
<tr>
<td>A</td>
<td>B</td>
</tr>
</table>
I think I can replace my td's with div tags, but not sure how.
| stackexchange/codereview |
I've recently started learning Python (long time Java programmer here) and currently in the process of writing some simple server programs. The problem is, for a seemingly similar piece of code, the Java counterpart properly responds to the SIGINT signal (Ctrl+C) whereas the Python one doesn't. This is seen when a sepa... | stackexchange/codereview |
In wpf app I have binded Dictionary to listbox. I have own style on listbox.
Listbox item consit image and 3 texblocks.
Friend class is here:
public class FriendData
{
public string idUser { get; set; }
public string nick { get; set; }
public string sefNick { get; set; }
public string status { get; set;... | stackexchange/codereview |
Is it possible to output the SQL change scripts that 'rake db:migrate' produces?
| stackexchange/codereview |
Possible Duplicate:
When to use IComparable<T> Vs. IComparer<T>
while IComparer works for both the cases.
| stackexchange/codereview |
On the first run of my app, I am downloading a pretty big file to /sdcard/
I already know this can fail if the internal SD card of the user's phone is full or not mounted (e.g. if the phone is connected to a PC as a mass storage device, or has not been properly disconnected from a PC).
But are there any android devices... | stackexchange/codereview |
I have an executable called A.exe (say it is cmd.exe). I want to launch it (and also I want multiple instances of it) inside another window (that is I have to create) like,
How can I create such a window (program) using win32 or MFC ? Or this isn't possible ? Thank you.....
regards,
| stackexchange/codereview |
I have several folders of images and would like to create a plist containing the file's name and the name of the folder its in too.
For example:
YELLOW
MARKIN.PNG
MARKOUT.PNG
BLUE
ARROW.PNG
RAZOR.PNG
I would like a plist, with an array root node, containing dictionaries such that:
<plist version="1.0">... | stackexchange/codereview |
Can't see what I'm doing wrong?!!! gotta be the numerical names right?
<fieldset>
<input type="checkbox" class="checkbox" name="187" />
<label for="187">Easily accessible</label><br />
<input type="checkbox" class="checkbox" name="311" />
<label for="311">WiFi Internet</label><br />
<input typ... | stackexchange/codereview |
I generally avoid casting types as much as possible since I am under the impression that it's poor coding practice and may incur a performance penalty.
But if someone asked me to explain why exactly that is, i would probably look at them like a deer in headlights.
So why/when is casting bad?
Is it general for java, c... | stackexchange/codereview |
Page1.html has
<html><head>
</head>
<body>
[<span class="foo">span unchanged</span>]
<script type="text/javascript">
var a = document.getElementsByClassName('foo').item(0);
var synth = '<object data="http://localhost/~bruceaxtens/Page2.html">Page2.html not found</object>';
a.innerHTML = synth;
</script>
</... | stackexchange/codereview |
I came across this code while I was browsing for html5 canvas examples.
I have pasted the code and I have given a comment in the place where i have a doubt.
if(window.addEventListener) {
window.addEventListener('load', function () {
var canvas, context, tool;
function init () {
canvas = document.getElement... | stackexchange/codereview |
I wrote a program that record my voice write it and then play it
Fs=11025;
y= wavrecord(2*Fs,Fs,'int16');
wavwrite(y,Fs,'t1.wav');
wavplay(y);
I heard my voice clear
then I want to write another program that reads that file and play it
y=wavread('t1.wav');
wavplay(y);
when I run the second program I didn't hear my v... | stackexchange/codereview |
I am working on a custom admin module where I show a list of customers based on a custom attribute, the grid loads fine but then I am having problems whenever I try to sort/filter the grid.
This is the error I am getting :
Fatal error: Call to a member function toHtml() on a non-object in <b>/***/***/public_html/***/a... | stackexchange/codereview |
How can I get the user to be redirected if their IP was matched on the deny of an IP address, e.g.
<Limit GET POST PUT>
order allow,deny
allow from all
deny from {removed IP address}
</Limit>
I need them to be redirected to a specific website when they are denied from accessing.
Needing help with this..
| stackexchange/codereview |
What i need is a little application which allows me to search multiple .class files for a word. Can that be done with which application?
| stackexchange/codereview |
I have this code
function getSelectData(id) {
jQuery(id).change(function () {
var value='';
jQuery(id+" option:selected").each(function () {
value =jQuery(this).val() ;
});
console.log(value);
});
return value;
}
var d = getSelectData("#sort_post_date");
console... | stackexchange/codereview |
We've got an app that needs to run in a Java app server. I've got to develop a webapp to go with it. I've started reading about Ruby on Rails, and I really like the approach: MVC, convention over configuration, tons of stuff taken care of for you.
I may be dreaming the impossible dream, but are there any Java webapp de... | stackexchange/codereview |
When we Subclass Thread, do we override its run method? We know Thread class itself implements Runnable, but there is no body for run method defined in Runnable class.
This is picture in my mind:
Runnable - Parent class-it has a run method in it, with empty body.
Thread- Child,
classA extends Thread- Child of Child,
w... | stackexchange/codereview |
I've been working with a school project, and one of the tasks is to make sure it doesn't leak at all. So, I ran my program through valgrind, and because I'm not using any dynamic memory allocation, I didn't think I would find anything.
Oops, I did. Valgrind gave me this:
==22107== 16 bytes in 1 blocks are definitely ... | stackexchange/codereview |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.