instruction_seed stringlengths 1 35.8k | _source stringclasses 1
value |
|---|---|
I need to show an image by using the file name only, not from the resource id.
ImageView imgView = new ImageView(this);
imgView.setBackgroundResource(R.drawable.img1);
I have the image img1 in the drawable folder. I wish to show that image from the file.
How can I do this?
| stackexchange/codereview |
I need to display a news-tip daily and my table structure as below.
| id | ndate |News Tip |
+------+----------------------+
| 1541 | NULL | news1 |
| 1545 | 14-10-2010 | news2 |
| 1567 | NULL | news3 |
| 1568 | NULL | news4 |
| 1582 | NULL | news5 |
.... ....
|... | stackexchange/codereview |
I'm using django 1.2, and I had to setup a second database on my
project. As soon as I setup the second connection and the router on my
project, all my test cases which aren't even referring to that second
database start to fail. Running the application works fine, syncdb
works fine, is just the testing (unit testing) ... | stackexchange/codereview |
I have spent way too much time (over an hour) on what I though would be a two minute task.
On the iPhone:
NSString * dateString = @"2010-09-11T00:00:00+01:00";
NSDateFormatter * formatter = [[NSDateFormatter alloc] init];
[formatter setDateFormat:@"YYYY-MM-dd'T'HH:mm:ssTZD"];
NSDate *date = [formatter dateFromString:d... | stackexchange/codereview |
is there a way of getting table name for each column in a postgre result in PHP?
Imagine you have a select with join, for example:
$Q = <<<E2OD
SELECT * FROM user U
LEFT JOIN department D ON U.department_id = D.id
E2OD;
In PHP/FirebirdSQL:
$R = ibase_query($Q);
$D = ibase_fetch_row($R);
$info = ibase_field_inf... | stackexchange/codereview |
I have a Jython script properly running on a Windows 7 machine with PostgreSQL 9. Trying to run the same script on RHE5 Linux with PostgreSQL 8.2 yields the error
zxJDBC.DatabaseError: driver [org.postgresql.Driver] not found
I tried running the script like so:
CLASSPATH=$CLASSPATH:/path/to/postgresql.jar /path/to/jyt... | stackexchange/codereview |
I have some complex object graphs, when I want to send them down to the client, I'm creating a separate DTO and serializing the objects into that. This is a pain in the ass. Is there anyway to serialize objects and only say, "Go one references deep" so if I have an object:
public class Test {
public Project { get; set;... | stackexchange/codereview |
My app connects to a .NET web service via KSoap2 library. When I'm using HttpConnection everything works great and is very fast. However, when i switch to HttpsConnection the app slows down to a crawl and freezes up the phone. This happens when making soap calls as well as downloading files from my app. I know that htt... | stackexchange/codereview |
How do I recreate the easing/friction for touch events in Mobile Safari? For example, if I have a scroller and drag the contents it will bounce back when you go past the top or past the bottom?
I tried messing with the cubic-bezier easing function but couldn't emulate the friction in Mobile Safari on an iPhone/iPod.... | stackexchange/codereview |
I want my application shaped changed by modifying org.eclipse.ui.workbench plugin.
but the problem is even though I import it with source , it is not operated.
How do I solve this out?
| stackexchange/codereview |
I'm writing a simple program that makes multiple connections to different servers for status check. All these connections are constructed on-demand; up to 10 connections can be created simultaneously. I don't like the idea of one-thread-per-socket, so I made all these client sockets Non-Blocking, and throw them into a ... | stackexchange/codereview |
Are there any updated tutorials for using OpenID with Authlogic? I'd heard good things about Authlogic, and the documentation makes it seem much better than Restful Authentication... but in trying to implement OpenID, 100% of the tutorials and information I've come across have been outdated (including Railscast #170). ... | stackexchange/codereview |
Lets say i have a class like this
class book {
public $title;
public $author;
public $page_num;
.....
....
public function show_book($limit=1){
....
$result = mysql_query("SELECT title,author,page_num FROM book limit=$limit");
while($row = mysql_fetch_array($re... | stackexchange/codereview |
(this is about the LocationManager class in android).
Is there a way of using requestLocationUpdates, but in some way that allows it to give me results for the best active provider every time? I could pass it the result of getBestProvider, but then it will always return results from that provider, and it wouldn't work ... | stackexchange/codereview |
Is it possible for an iPad/iPhone app to intercept the play/pause/rwd/fwd keys on a connected keyboard? I've heard that it can but cannot find a reference to it.
| stackexchange/codereview |
Using code blocks or Dispose method hasn't used in this MSDN example about dialog boxes.
But why it is not disposed despite it has Dispose method ?
| stackexchange/codereview |
Suppose that I have a table my_table(id, x, y). I want to write a trigger to prevent updating the y col and setting it to a non-null value if x is already null. As SQL Server doesn't have a before update trigger, how can this be done? Apparently we can use an instead of trigger for this purpose, but how can we check th... | stackexchange/codereview |
I'm developing an Android application. I'm very new on it.
I have the following classes:
class CustomGLSurfaceView extends GLSurfaceView
class CustomRenderer implements GLSurfaceView.Renderer
CustomGLSurfaceView uses CustomRenderer to render a cube on onDrawFrame method.
I've added an onTouchEvent(MotionEvent event) ... | stackexchange/codereview |
Background: I have written a bookmarklet (JavaScript) that appends an iframe to the current page you are viewing. This iframe's src attribute is pointing to a form back on my application.
Problem: I am trying to utilize addEventListener to detect if that form has been submitted. However, I don't seem to be able to acc... | stackexchange/codereview |
Currently to access my dynamic web project (running in a tomcat servlet container) I access the following url:
http://localhost:8080/[Eclipse_Project_Name]
I have a couple questions about this:
Where is the configuration that
is forcing the url to require the
Eclipse project name? I don't see
this in the ... | stackexchange/codereview |
I have worked out about 90% of this, but can't seem to get the last 10%:
I have a form that asks the user to select a location. On select, I want the page (and the request form) to fade in opacity, and a new div to fade up on top with pricing information.
Right now, everything works as expected for the first selected o... | stackexchange/codereview |
Creating a voting system just like stackoverflow. Questions like this have been asking several times and i have checked but i havent found one on a voting system where you are rating thread and comments. Im wondering what is the best way to do this?
Is this the best way to do it?
thread table
id PK
userid
title
descrip... | stackexchange/codereview |
The javadoc for SimpleDateFormat states that SimpleDateFormat is not synchronized.
"Date formats are not synchronized. It
is recommended to create separate
format instances for each thread. If
multiple threads access a format
concurrently, it must be synchronized
externally."
But what is the best approach t... | stackexchange/codereview |
My question is very similar to this one: How do I add a method to a ruby gem without editing the gem source?. However, this question is almost a year old and the solution that was chosen isn't the cleanest, not to me at least.
The person who provided the answer offered 3 suggestions. The first suggestion was chosen as ... | stackexchange/codereview |
I'm VERY new to the concept of git for managing source code. Before I make the leap, I do have a very basic question.
I understand the concept of cloning etc. But what I'm looking to do is have a central area such as a project on GitHub, where I can store all my code, commit changes etc.
Is there a command in Git to ju... | stackexchange/codereview |
I'm looking for good examples of multithreading practices in C#. I'd like to see common methods of executing multithreading processes.
| stackexchange/codereview |
I have a class that contains a vector of object pointers. I have a GetObject(..) function in that class that looks through the vector, finds the object desired, and returns a pointer to it. However, if the user of the class does a delete() on that returned pointer, my program will crash because the vector still has a p... | stackexchange/codereview |
I've been trying to use the airport library and my problem is that it won't print special characters like ä, ö, &, etc.
I've looked at this post but that doesn't solve my problem either.
I've included the library like this:
<script language="javascript" charset="utf-8" src="path/jquery.airport-1.1.js"></script>
Can ... | stackexchange/codereview |
I know that the best solution against the padding oracle attack is to wrap and append a HMAC to the complete encrypted message. But what other solutions are there? What if my data is so large that I need to stream it? I can check the HMAC at the very end, but I cannot afford loading the whole file twice and check the H... | stackexchange/codereview |
I'm desperately trying to solve this one. I have a bunch of files stored outside of the webroot and I need to serve them to a user after a few auth checks. These files have been uploaded using a Flex application or have just been manually uploaded through FTP. I have a serving script that looks something like:
<?php
$... | stackexchange/codereview |
I'm implementing RichFaces checkbox tree, and I've got a problem... I need to mark all the child nodes as selected when user selects root node...
I guees it should be done using some javascript function called when users selects root node...
any ideas??
| stackexchange/codereview |
I wanted to add a live picture rotation to my site and i could not find any other way to do it so i decided that i need a cgi script that will:
1. Delete the first picture in the rotation (e.g. pic1.jpg)
2. Rename the rest of the pictures (e.g. rename pic2.jpg to pic1.jpg, pic3.jpg to pic2.jpg, pic4.jpg to pic3.jpg, et... | stackexchange/codereview |
I see these kinds of messages on twitter and other places.... how do they work? Is it MySQL connections?
| stackexchange/codereview |
Say I have generated the following binary file:
# generate file:
python -c 'import sys;[sys.stdout.write(chr(i)) for i in (0,0,0,0,2,4,6,8,0,1,3,0,5,20)]' > mydata.bin
# get file size in bytes
stat -c '%s' mydata.bin
# 14
And say, I want to find the locations of all zeroes (0x00), using a grep-like syntax.
The bes... | stackexchange/codereview |
Is it possible to use hibernate search with hibernate but without jpa.
I only use jpa annotation but I don't use entityManager.
In this case, how hibernate search is able to know that he has to index an object when I create a new object in the db using hibernate session.
So far, I just have an entity called "person".
I... | stackexchange/codereview |
Hey everyone, im hoping someone can help me. I have a search page in a web app and im trying to construct a custom query to hand to my repository so that when a search is done, only when there are search parameters it will do something. I have the logic done so that it detects when there are parameters, but i still don... | stackexchange/codereview |
We are running GWT using GWT-RPC. GWT-RPC is really JSON and is getting Eval()'ed in the client browser.
Since the browser doesn't cache what is Eval()'ed, then I imagine I would be re-downloading the whole app each time.
Are there library files, etc. which are brought down into browser cache? Has GWT found some tricky... | stackexchange/codereview |
How can I calculate the arc between two circles? The arc must be tangent to the two points on the circles.
Here is a picture illustrating it. I'm trying to code and calculate the orange arc and the blue arc.
more details:
Your applet should have 2 modes: 2D and 3D. The user should be able to switch between them by pr... | stackexchange/codereview |
I rebuilt a huge svn repository (over 350GB - took more than 11 days to complete).
How can I validate the new repo against the existing one.
I tried "svn ls" on both and they are same - but that just dumps the root directory.
Are there any better ways of doing it or I just have to do random tests?
fyi, repository has ... | stackexchange/codereview |
Just for experimenting, I added multiple null keys in a Hashmap instance. And it didn't complain. What's the benefit of doing that?
The code is,
Map hmap = new HashMap();
hmap.put("sushil","sushil11" );
hmap.put(null,null);
hmap.put(null,"king");
hmap.put(null,"nagasaki");
hmap.put(null,null);
How many keys are there ... | stackexchange/codereview |
When starting a BizTalk project I generally follow the naming conventions found here. Where you name your projects and assembly's something like:
MyCompany.MyProject.Orchestrations.dll
MyCompany.MyProject.Schemas.dll
MyCompany.MyProject.Pipelines.dll
MyCompany.MyProject.Transforms.dll
MyCompany.MyProject.PipelineCompo... | stackexchange/codereview |
I'm working on a Windows application that's written in VBScript and I need to check a string for any non-numeric characters, specifically anything a-z. I realize I could probably do this using the InStr() function in conjunction with a loop that checks for a-z but that just seems ridiculous. I have very little experien... | stackexchange/codereview |
i am trying to insert some rows and update some rows inside a pl/sql loop.
however all i get to see is the pl/sql procedure is successfully completed.
i do get to see dbmbs_ouput statements but not the output status of insert and/or update queries.
the serveroutput is set to on.
how do i get to see the status of inse... | stackexchange/codereview |
What do two ampersands separating function calls do? Note: this is OUTSIDE any if statement or case statement
Like so:
functionCallOne() && functionCallTwo();
| stackexchange/codereview |
For my customers, iterating through multiple counters is turning into a recurring task.
The most straightforward way would be something like this:
cntr1 = range(0,2)
cntr2 = range(0,5)
cntr3 = range(0,7)
for li in cntr1:
for lj in cntr2:
for lk in cntr3:
print li, lj, lk
The number of counters... | stackexchange/codereview |
I have a command binding whose CommandTarget is supposed to always be the parent application.
The binding looks like this:
CommandTarget="{Binding MainWindow, Source={StaticResource Application.Current}}"
However, the CommandTarget is never getting bound to the MainWindow - it's always null.
As a result, the "sender"... | stackexchange/codereview |
I have a GridView that I would like users to edit as much as they want, but not to save any changes back to the binding object until the user clicks the save button. For textboxes and such I have used binding groups, but this approach does not seem to work for the GridView.
What is the best approach for delayed edits f... | stackexchange/codereview |
I adapted this tutorial (http://www.screaming-penguin.com/node/7749) to an Android app I've built to allow for a button press to export the current database to the user's sdcard. It works flawlessly.
But I'm afraid that users of my app would be unfamiliar with the db file, and I'm looking for a way to convert that to a... | stackexchange/codereview |
I have a designer insisting on a single form field submitted by hitting enter and the post made by AJAX and the response presented by Fancybox.
Problem is the the return false is not preventing the submission of the page.
What am I doing wrong there?
<form id="home_stay_informed_form">
<input name="informed_email" id="... | stackexchange/codereview |
I'm having some trouble with my error handling in my ASP.NET MVC 2 application. I'm using LINQ to SQL for ORM and am only using Stored Procedures for getting and changing data in the SQL Server. My SP use TryAndCatch blocks, and raiseerrors. But when calling a SP in my client application that raises an error the client... | stackexchange/codereview |
How can I calculate the number of lines in a "Java Project"?
I'm using Netbeans 6.9.
| stackexchange/codereview |
I need to obtain static google map by passing latitude and longitude in the URL.
this is Where i'm downloading the map image
google return the map image where the coordinates are of the center location of the map.
i can download this image using the above URL.
PROBLEM: what i need is to get the X0 and Y0 coordinates of... | stackexchange/codereview |
using System;
class A
{
public virtual void F() {
Console.WriteLine("A.F");
}
public virtual void G() {
Console.WriteLine("A.G");
}
}
class B: A
{
sealed override public void F() {
Console.WriteLine("B.F");
}
override public void G() {
Console.WriteLine("B.G");
}
}
c... | stackexchange/codereview |
Is it possible by default to resize a JTable row in the same way you can resize a column by dragging the mouse at the header? If so, how can you do this?
| stackexchange/codereview |
I want to remove an object from a collection if the object does'nt satisfies some condition
foreach (var data in infData)
{
if(data.Id==0)
{
//Remove this object from the collection
}
}
How to do this.
EDIT: This is the complete code
foreac... | stackexchange/codereview |
Can anyone please tell me the difference between IIS Server and Development server provided by Visual Studio.
| stackexchange/codereview |
I am doing a project that involves processing data from my Gmail history.
Specifically, I want to generate a multi-page styled PDF that has a custom page for each of 100 or so people - showing data such as number of e-mails sent in the past year, number of e-mails received in the past year, average word length of e-mai... | stackexchange/codereview |
Here is the code I have for the tableview customizations.
How would I make the accessory indicator be an image (arrow.png)
-(UITableViewCell *)tableView : (UITableView *)tableView
cellForRowAtIndexPath : (NSIndexPath *)indexPath {
static NSString * CellIdentifier = @ "Cell";
UITableViewCell * cell = ... | stackexchange/codereview |
<div id="container" style="float:left;">
<img src="{{ p.sizes.2.url }}" width="200" height="auto">
<div class="trans_caption" style="position:absolute;background-color:#cccccc;">
Picture Caption
</div>
</div>
How do I overlay the caption on top of the picture...but aligned... | stackexchange/codereview |
I'm new in python and I'm having many troubles in using global instruction.
Here is a code example:
mouse = "a"
background = "b"
list_ab = [mouse, background]
def func ():
for item in list_ab:
global item # I want to modify the GLOBAL item, which is mouse
# and background.
it... | stackexchange/codereview |
In Google App Engine, I tried reading a .txt file from a URL. Because the maximum allowed size is 1MB and the file is slightly larger, I'm using an alternative method described here.
So, what I'm trying to do is this:
FetchOptions fo = FetchOptions.Builder.allowTruncate().doNotFollowRedirects();
HTTPRequest request = n... | stackexchange/codereview |
I need to write a program for Pascal that makes array in spiral form like this:
(7) (8) (9) (10)
(6) (1) (2) (11)
(5) (4) (3) (12)
(16)(15)(14)(13)
Start from 1 and continue to 36 but this is not so important.
After 3 days thinking I have no idea how to realize this.
Problem is not in language syntax or arrays, it is ... | stackexchange/codereview |
So I've been trying to integrate FB with my iPhone application with FB connect. However, after using the tutorial (http://www.mobisoftinfotech.com/blog/iphone/iphone-fbconnect-facebook-connect-tutorial/), it seems when the FBDialog box is called, it pops onto the screen for a few seconds and then disappears. I'm not ... | stackexchange/codereview |
I have an WinForms application with this Main Form :
ICountRepository countRepository;
public MainForm(ICountRepository countRepository)
{
this.countRepository = countRepository;
}
public void IncrementCount()
{
countRepository.IncrementCount();
}
but i am struggling to inj... | stackexchange/codereview |
Perl has the \u operator to lowercase a match when using string replacement and regular expressions. Does .Net have anything similar? For example, uppercase all words that start with a <
s/<\(\w*\)/<\U\1/
| stackexchange/codereview |
i am creating instances of Form1() on the fly.
i need to be able to show it every time i open it. the result would be a bunch of popping up forms. here is my code. how do i show the form as soon as it is created>?
List<Form1> forms = new List<Form1>();
string analyte;
for(int i = 0; i < cbAnalytes.Items.Count;... | stackexchange/codereview |
content.tpl
tratata 'hey' tratata <br/>
okay 'aaaaa' <br/>
'trtata' <br/>
echo 'tratata'hmmmm'traatata';
'hello' tratata <br/>
How do I change all the quotes ONLY in the echo?
I need
tratata 'hey' tratata <br/>
okay 'aaaaa' <br/>
'trtata' <br/>
echo 'tratata\'hmmmm\'traatata';
'hello' tratata <br/>
Thank you
| stackexchange/codereview |
I'm trying to write Firefox add-on that will follow users activity for chosen web links at some webpage. Because I'm not so familiar with web development, I would appreciate your suggestions and directions how to finish this task.
I already made one simple Firefox add-on, but yet don't have idea how to mark wanted lin... | stackexchange/codereview |
Is it possible to generate n-sized permutations of a list using only the basic scheme constructs?
| stackexchange/codereview |
Foxit Reader had a bug with the Firefox plugin that led to Firefox crashing when PDFs were opened. The Windows Action Centre was able to suggest a fix for the bug and link to a relevant thread in a forum. How can I similarly integrate my application with the Windows Action Centre?
| stackexchange/codereview |
I have implemented an InApp Purchase Store in my app. I have English and German as languages. But I always get the German titles and descriptions from the SKProducts. I am calling the right localizedDescription localizedTitle methods, so this should be not the problem, according to the documentation.
Can anybody help m... | stackexchange/codereview |
I've been looking at DLLs in windows, and I saw many DLLs that have the 4 COM exported functions:
DllCanUnloadNow
DllGetClassObject
DllRegisterServer
DllUnregisterServer
just for an example:
c:\windows\system32\actxprxy.dll // <-- WINDOWS 7 !!! (I guess Vista as well)
B - U - T when I am looking for COM objects (using ... | stackexchange/codereview |
I want to override method Print of a ClassA in a custom dll.
public ClassA
{
public void Print( string arg1, string arg2, string arg3, string arg4 )
{
}
}
Is this possible in C# ?
| stackexchange/codereview |
Can records which are deleted from list can be restored other than administrator account? If possible how? In my current project, i have to give permissions for a group who are having "Approve" permission to restore the records which are deleted from the lists. Any suggestions?
| stackexchange/codereview |
I am new at JQuery and I have a specific question about the IF-THEN-ELSE fork.
The big problem for me is the syntax of this (I suck at Javascript). It would help me if anyone can "translate" the pseudo code into a JQuery (or Javascript) valide code.
The pseudo code:
IF "#Contentshowroom" css "left" is NOT > 1960px
THEN... | stackexchange/codereview |
When you apply the style "title 1" to some words, there is always a point appear.
How to remove it?
| stackexchange/codereview |
I was wondering if there are any videos (eg. Google Tech Talks) presenting the MVC pattern.
If so, I would highly appreciate any sources you can provide.
Alternatively, what reading material (preferably online) would you recommend to fully understand the pattern?
Thanks in advance.
| stackexchange/codereview |
When I create a new test like the following:
It should_get_something = () => foo();
When I hit the semi-colon resharper sticks private on the front of the delegate:
Private It should_get_something = () => foo();
I then have to remove it.
Can I tell resharper not to do this? I tried adding a rule to the naming style di... | stackexchange/codereview |
I am relatively new to server programming and have this basic question.
When a server is established and number of clients are connecting , how do we handle multiple clients ...?
Do we create threads at the server and assign each client one of them ??
Some sample code and links that help me read about this are very he... | stackexchange/codereview |
I have been programming for Android with decent success, but one thing I have noticed is that when I get NullPointerExceptions the stack trace is worthless. They are always of this format:
Thread [<1> main] (Suspended (exception NullPointerException))
ViewRoot.draw(boolean) line: 1431
ViewRoot.performTrav... | stackexchange/codereview |
I'm trying to get the dimensions of a video of which I'm overlaying onto a page with JavaScript, however it is returning the dimensions of the poster image instead of the actual video as it seems it's being calculated before the video is loaded.
| stackexchange/codereview |
Such as Twitter's drop down notifications whenever something happens.
Whenever a user finishes registration, the notification will drop down and say, "Thank you"
| stackexchange/codereview |
I have an ASP.Net page, where a user can enter some text in a TEXTAREA and submit it to the server. This text will be stored in a database and will be presented in a winform application.
How can I make sure that the winform application presents the exact characters that the user entered in the TEXTAREA.
That is, do I ... | stackexchange/codereview |
This is the most useless error message I have ever seen.
I think it translates to .. "error".
The full error message from the *Messages* buffer is:
File mode specification error: (wrong-type-argument characterp "string value here")
I think the latter part of that message means that emacs was expecting a character a... | stackexchange/codereview |
I'm writing an application that loads in records from an XML file and uses them to populate forms. It's for a card game, so I want the forms to display different fields and have different looks depending on the particular record (specifically depending on the 'CardType' field in the record).
In vanilla C#, I would cre... | stackexchange/codereview |
I have web.xml as follows
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
<display-name>HibDemo</display-name>
<description>HibDemo Application</description>
<!-- Http Flex Session attribute ... | stackexchange/codereview |
Let say I have a basic 2D vector class something like
class vector2
{
int x, y;
}
these two values could be used to represent a position as well as a width and height. does C++ provide a away for me to impliment a function such as vector2::getXpos() and then also define vector2::getWidth() and have it use the same i... | stackexchange/codereview |
How do I convert a string value into double format in C++?
| stackexchange/codereview |
I would like to be able to clean up a log file using sed and regex
a) any line which matches /\d{13,13},\d*,[\w\s]+,.+\n/ I would like to delete
b) remove any empty lines that are remaining.
How can I do this ?
| stackexchange/codereview |
Now, thanks to community, one problem was fixed ( Delete all elements of a certain type from an XML doc using PHP ). Now I luckily hit other :)
So, I have XML file:
<piletilve_info>
<shows>
<show>
<description>
<lat>
<![CDATA[
LA CENERENTOLA <BR><BR>
("Cinderella")<BR><BR>
Opera b... | stackexchange/codereview |
In a MVVM app I dynamically want to show buttons for functions which can be changed during runtime. Technically this ain't so difficult, in my ViewModel I've got an observablecollection of RelayCommands:
public ObservableCollection<RelayCommand> CustomCommands {get;set;}
Now in Xaml I can bind a ListBox to this Collec... | stackexchange/codereview |
A few questions regarding ListBox here (3 actually)
1. ListBoxItem/Rectangle Margins
From the image, I think the margins are uneven, the left seems like it have more margin. And this is when my margins is already set to
<ListBox.ItemTemplate>
<DataTemplate>
<Rectangle Width="20" Height="20" Margin="1,2,2,... | stackexchange/codereview |
I'm trying to calculate the width of an element so that when I use JavaScript to wrap a parent element around it, I can set the width of the parent to match the width of the child. The obvious $('#element').css('width'); isn't quite what I want because it only seems to return the calculated value in pixels. Is there ... | stackexchange/codereview |
I would like to create a class that describes a file resource and then pickle it. This part is straightforward. To be concrete, let's say that I have a class "A" that has methods to operate on a file. I can pickle this object if it does not contain a file handle. I want to be able to create a file handle in order t... | stackexchange/codereview |
class Test
{
public:
operator Test * () { return NULL; };
};
int main()
{
Test test;
if (test == NULL)
printf("Wtf happened here?\n");
return 0;
}
How is it that this code compiles? How did Test get a comparison operator? Is there some implicit casting going around? What does that overloaded ... | stackexchange/codereview |
I'm a web developer. I used to work in an environment where I could build entire production web sites and run them in local IIS for debugging purposes.
I recently switched jobs and now that's not allowed anymore. Security policy (please don't ask about it) does not allow for me to run IIS on my development workstatio... | stackexchange/codereview |
Related but dormant: Javascript to open URL within a new Tab and a number of others...
I have a client who insists that a particular link needs to open in a new tab, rather than a window. It's being generated by the "onclick" event of a form submission button, called by a jquery function in the php document that looks ... | stackexchange/codereview |
Can I compile an IronPython code to EXE or DLL in a .NET runtime?
| stackexchange/codereview |
I have a WCF service that is called from various places
I have a method to get the ip and hostname of the caller.
But I was hoping to be able to get the full url of the caller if it's another service, aspx page, etc that is making the call.
Is that possible?
Currently what I have is essentially this:
public static st... | stackexchange/codereview |
Have a legacy application and from there, my MVC application is called.
I planned to use custom httpmodule [AuthenticationModule class inherites IHttpModule]. In Init, I hooked up BeginRequest and do my FormAuthenication stuff...
private void Application_BeginRequest(Object source, EventArgs e) {
// Do ... | stackexchange/codereview |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.