instruction_seed stringlengths 1 35.8k | _source stringclasses 1
value |
|---|---|
I want to visualize a map like this: http://www.time.com/time/covers/20061030/where_we_live/.
Can I do this with opengl or processing? How?
| stackexchange/codereview |
Hi I am currently learning rails, day to day i get more attached. I would like to use Rails to build a Web app with similar functionality like http://www.scribd.com/ or docstoc . What components/gems/plugins/libraries in Rails or Ruby could be used to create a web app with similar functionallity. The web app should... | stackexchange/codereview |
I have web application workung with master page.
I want to know when the user is closing the browser' then I'll raise event to clean' session variables.
How can I detect the browser closing/
I tried the unload jscript event' but it fired when I move from page to page.
Anyone has an idea?
| stackexchange/codereview |
I need to implement some SEO-friendly sort methods for a resource in Rails 3. This is what I'm considering doing for collections:
/things # shows all things
/things/popular # shows all things ordered by popularity
/things/a-z # shows all things ordered alphabetically
And this fo... | stackexchange/codereview |
What is the easiest way to create a dictionary from an iterable and assigning it some default value? I tried:
>>> x = dict(zip(range(0, 10), range(0)))
But that doesn't work since range(0) is not an iterable as I thought it would not be (but I tried anyways!)
So how do I go about it? If I do:
>>> x = dict(zip(range(0... | stackexchange/codereview |
I currently have a little program here that will rewrite the contents of a .txt file as a string.
However I'd like to gather all the contents of the file as a single string, how can I go about this?
#include <iostream>
#include <fstream>
#include <string>
using namespace std;
int main () {
string file_name ; ... | stackexchange/codereview |
My application is programmed to be installed in SDCARD, i.e, following the information here: http://android-developers.blogspot.com/2010/07/apps-on-sd-card-details.html
I set "android:installLocation" to "preferExternal" inside the manifest tag. My build target is API 8, and my minSdkVersion=3. It works when I directly... | stackexchange/codereview |
I would like to know how to access mongodb database from a scala swing application.
I am new to scala.I have created a database named mydb in mongodb and a collection named studen(rollno,name,age,city). I simply want to perform insert, update and delete with swing on a mongodb database, but i have no idea which package... | stackexchange/codereview |
I have a listview which has 10 items , only 5 items are visible , View has to be scrolled down to see the rest. Listview by default does autoscroll when I reach the bottom of the view.
But I want to disable this auto scroll as I am having my own implementation of scroll using
listview.setSelection(position);
So the que... | stackexchange/codereview |
What is the best way to write a FreeAll function that will take a generic TList<T> and free each of the elements of the list?
It makes sense that TList<T>.FreeAll does not exist because it would not make sense if the generic type was a Record or String. Nevertheless it would be very handy if there was some way to achi... | stackexchange/codereview |
I need to track short links using google analytics. Short link page is never show up to the user, but redirect request to the binded web-site right away.
So I can add google analytics only to server side and need to pass all request data, such as IP, browser, resolution to it.
| stackexchange/codereview |
I have a small project which will use iPad as an information kiosk for visitors to browse and one of the requirements is that the iPad needs to communicate with Arduino (with ethernet shield) by sending commands (basically texts) through LAN (or internet) to a port of another display computer.
Been reading about iPad ... | stackexchange/codereview |
hey guys,
i know it's not the best way of doing this but the whole thing is just a little project which doesn't need anything more difficult.
i'm passing directory names along with my url like domain.com?p=folder/subfolder/etc
i'm looking for the best way to check if the dir exists and i want to (at least) kind of pre... | stackexchange/codereview |
I have looked at the answered topic with the answer:
List list = dt.AsEnumerable().ToList();
However, what if wanted to convert to a list of some entity type? For instance, I have an entity class Property:
public class Property
{
public int ID { get; set; }
public string Chain { get; set; }
... | stackexchange/codereview |
I have a class - PluginLoader which deals with another class Plugin to carry out its functions. Plugin class uses some functions in PluginLoader. Both these classes are abstract base classes so I can't declare Plugin as a friend of PluginLoader. And I don't want the functions Plugin uses to be available in the public i... | stackexchange/codereview |
Ive decided to convert from doing millisecond based timing to frame timing in my rhythm game. I understand I can check the current frame of the animation to get timing for a button press, but what about when the animation ends and I want a "late buffer" of about 100 milliseconds at the end? Can I rely on a timer for ... | stackexchange/codereview |
i m trying to read a text file from my app bundle the contents of file are:
1234567890
but when i display the string after reading its like this:
{\rtf1\ansi\ansicpg1252\cocoartf1038\cocoasubrtf320
{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
{\colortbl;\red255\green255\blue255;}
\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx... | stackexchange/codereview |
SO basiacally i have a query which i run and apply "while($item = oci_fetch_assoc($stid))" and i am confused how to take the rows seprately in one object and pass it to smarty template and show it in the table in smarty.
| stackexchange/codereview |
I'm building multiple web based tools for a business group. Many of these tools require a managed list of city names. Right now, each tool has its own look-up table of locations and I'd like to centralize it so one location table can be used for all tools, so a location doesn't need to be added multiple times.
I've cr... | stackexchange/codereview |
Is there an HTML code for the text checkbox ''?
EDIT: So to be clear, I need the HTML Number for the symbol , not the form element checkbox.
| stackexchange/codereview |
I've made this jQuery script quite basic really, but yet it fails to work in IE, but works in every other browser have tried it in; chrome, opera, safari and Firefox.
I've uploaded the script so you can take a look
oops wrong url
http://ddart.isgreat.org/test2/
this is the right one
the code is following
$(function () ... | stackexchange/codereview |
I am using the Maven Flexmojos plug-in to run some FlexUnit4 integration tests on the command line against a Jetty/Java/Spring Security/BlazeDS backend. These integration tests run in a stand-alone version of the flash player. One of these tests attempts a few different login scenarios as follows:
[Test(async)] ... | stackexchange/codereview |
I have application in asp.net mvc 2. one of form in create user. but this form is not accepting date format of dd/MM/yyyy and MM/dd/yyyy i want to allow MM/dd/yyyy for save in db what have to do. i am am using c# language .
| stackexchange/codereview |
My Application is running in Linux.
it would be localized.
how can I get the OS Language?
is it represented in Linux?
as a numeric values?
| stackexchange/codereview |
The whole page is a PHP include inside of a main index file. Should I be placing the javascript on the main page? or an external javascript file? Am I referencing the li wrong?
<ul>
<li class="about"><a href="index.php?about"><h1>about</h1></a></li>
<li class="team"><a href="index.php?team"><h1>team</h1></a></li>
<li... | stackexchange/codereview |
Reports are printed without margins. With the margins of the printer the text appears cut off.
The same occurs for the pdf files (without margins).
| stackexchange/codereview |
I have a table like this
DateTime start_time not null,
DateTime end_time not null,
Status_Id int not null,
Entry_Id int not null
I want to get the count of each status within a time period, where only the last started is valid for a given entry_id.
What I am using now is this (with dynamic dates):
with c (Status_Id, E... | stackexchange/codereview |
On the form, I have one select and two input fields. These elements are vertically aligned. Unfortunately, I can't get equal width of these elements.
Here's my code:
<select name="name1" style="width:198px">
<option>value1</option>
<option>value2</option>
</select><br/>
<input type="text" name="id1" style="width:1... | stackexchange/codereview |
I have a table in SQL Server that is structured like this:
id Name Parent
-- ---- ------
1 foo null
2 bar 1
3 oof null
4 rab 3
.
.
.
I need to get the data from the two associated rows as one row in a .NET DataTable . My desired DataTable would look like this:
Parent Child
------ -----
foo b... | stackexchange/codereview |
Possible Duplicates:
Good books or tutorials for beginning Direct X with c++
directx tutorials c++
what tutorials did you use to learn directx 9 or books.......
| stackexchange/codereview |
I've stored an email address in a cookie, and I'm sending it to a jsp file on google appengine to be verified. The @ is coming through as %40. I need to get it back to an @, and convert any other special chars that might have been encoded. Are there classes available through appengine that deal with this conversion?... | stackexchange/codereview |
I have set up payment processing through Authorize.net (actually through a reseller) and I am able to successfully perform Test transactions. However, when I perform real transactions, I get a Rejected transaction. When I check the transaction in the authorize.net account I see "General Error (Request rejected by FDC... | stackexchange/codereview |
I have a scrolling function over a recursive TimeOut making a very width window scroll horizontally until it reaches the right end, but I need to know in JavaScript if the scrolling has finished to change the direction and scroll back to the origin.
How can I accomplish this?
function ScrollIt(scrollPos, direction) {
... | stackexchange/codereview |
I'm working on adding an HtmlHelper for pagination, but I am unsure where the proper and/or most beneficial place to put certain parts of the pagination code from a performance and maintainability standpoint.
I am unsure if the Skip(), Take() and Count() portions of Linq to SQL data manipulation should live within the ... | stackexchange/codereview |
Like one can do with a form:
document.forms[0].reset();
But im not using a form as am using AJAX.. Will I have to cycle through all elements using JavaScript?
| stackexchange/codereview |
I have a method that updates records from the database, and I wonder if this method really runs in my BackGroundWorker thread considering the following:
public partial class Form1 : Form
{
BackgroundWorker bg = new BackgroundWorker();
public Form1()
{
InitializeComponent();
}
private void ... | stackexchange/codereview |
Are there any sources out there that show how to add an entry to the Mimetypes.rdf file that firefox uses. I want to associate a mime-type with my app that I have written in delphi and thought this would be the easiest way to do this.
Thanks,
Gail
| stackexchange/codereview |
Is there an easy way to record pageviews in Umbraco? I want to show the number of times a blog post has been viewed.
| stackexchange/codereview |
<script type="text/javascript">
var a = 0;
</script>
Now I have GWT:
public class AA implements EntryPoint {
public final int a =44;
}
How can i transfer instance field a to native global javascript variable so that it can be callable from javascript method?
| stackexchange/codereview |
I have following in my parent web applications config file
<configuration>
<configSections>
<sectionGroup name="testmodule">
<section name="testmodule" type="RewriteModule.RewriteModuleSectionHandler, RewriteModule"/>
</sectionGroup>
</configSections>
</configuration>
i want to prevent child subfolde... | stackexchange/codereview |
I'm trying to implement auto zooming using iPhone camera. This is an additional functionality for barcode scanning. Barcode scanning is already implemented, but I've no idea about how to auto zoom to the barcode location. Any help? Thanks.
| stackexchange/codereview |
Make a WinForms application in Visual Studio 2010, .NET 4.0, then make a user control (from Project/Add User Control...) with this code:
public partial class UserControl1 : UserControl
{
private string _SelectedTable;
public string SelectedTable
{
get { return _SelectedTable; }
set { _Selec... | stackexchange/codereview |
what is the difference between:
$(function() {
//.....
});
and
$(document).ready(function() {
//......
});
in jQuery coding?
| stackexchange/codereview |
Pseudo-code:
class SomeController {
def myAction() {
// controler is an property passed via ctor
controller.redirect(toWhereever)
}
}
// another variant
class AnotherController {
def myAction(controller) {
// controler is an method argument
controller.redirect(toWhereever)
}
}
Any suggestions?... | stackexchange/codereview |
For allow user only can input lower case alphabet and number, how can I setup my EditText in a xml file ?
Sorry, I did not provide clear information. I just want to filter or check user's input.
| stackexchange/codereview |
For anyone interested in learning LINQ To SQL, could you suggest:
good book titles
web articles/tutorials
videos
UPDATE: After googling i found most usefull the following
LinqPad (I already bought a licence!)
Linq in Action by Manning and
Linq videos from the VB Team
Please be my guest and complete the list!
| stackexchange/codereview |
I am using Eclipse 3.6 and Jboss 4.2. I've created Enterprise Application with two modules, EJB and WEB.
I have converted the WEB module into GWT application (and added necessary files - HTML and CSS).
The problem is, when I need to Inject either the Remote or Local interfaces in the GWTServiceImpl servlet using the @E... | stackexchange/codereview |
Many people still use IE 6 and other lower version browser. HTML5 is new, many browsers don't fully support it.
If I want to use Rails 3, do I need to do some extra work?
| stackexchange/codereview |
How do I enlarge those rectangles ?
I'm using wpf toolkit charts and I've tried to play with the control legend but it didn't helped.
| stackexchange/codereview |
(define-struct binding
(
let ; a string
num ; a number
)
)
(define Bind-A (make-binding empty 1))
(define Bind-B (make-binding "A" 2))
(define Bind-C (make-binding "F" 1))
(define Bind-D (make-binding "A" 1))
(define Bind-E (make-binding "C" 1))
(define Bind-F (make-binding "E" 3))
(define Bind-All (list ... | stackexchange/codereview |
I have a simple delete procedure which is using na cursor. I read somewhere that table vars should be preferred to cursors.
CREATE OR REPLACE PROCEDURE SMTAPP.LF_PLAN_VYMAZ (Str_oz varchar2, Num_rok number, Num_mesiac number, Str_s_trc_id varchar2) IS
var_LF_PLAN_ID Number(20);
cursor cur_plan is select id from... | stackexchange/codereview |
My code here returns a JavaScript selection object from within an iFrame (the iFrame page is within the same domain, so no xss issue).
What I need to know is the index of the selection within the raw html code (not the dom).
UPDATE:
E.g.
If you have an html doc:
<html><body>ABC</body></html>
And in the UI, the user u... | stackexchange/codereview |
I need for a server side process to be able to produce the same view of the HTML dom for a web page as a web browser (I am aware that the dom representation is browser specific, so don't mind a non cross browser solution).
I need to be able to work my way back to a user selection on a web page at a later date. Since t... | stackexchange/codereview |
Ok..... basically what I'm trying to do is setup something that will handle all incoming mail on a certain POP3 email address, pass all the relevant data to a PHP script, which will then parse the data & insert it into a MySQL database.
Now I have been looking around a bit..... checked out procmail, but that just confu... | stackexchange/codereview |
I never use regular expression before and plan to use it to solve my problem but not quite sure whether it can help me.
I have a situation where I need store a rule or formula to build string values like following examples in a database field then retrieve this rule and build the string value.
FacilityCode + Left(Mode... | stackexchange/codereview |
I wish to encode my HTML sent to the browser. In my .ASPX pages I can use the <%: %> syntax. In a HTML helper of mine I try...
public static string Image(this HtmlHelper helper, string imageName, string altText)
{
return helper.Encode(String.Format("<image src='/images/{0}' alt='{1}' />", imageName, a... | stackexchange/codereview |
I use VS 2008, Team Explorer and TFS. I'm looking to automate your builds by executing TFSBuild.exe command.
I follow those steps:
Open TeamExplorer, in VS2008, connected to TFS;
My Team Project has a Build (named MainBuild) in Builds. Then, I do Query New build option.
I fill the properties in window dialog opened:
bu... | stackexchange/codereview |
An article has been making the rounds lately discussing the use of genetic algorithms to optimize "build orders" in StarCraft II.
http://lbrandy.com/blog/2010/11/using-genetic-algorithms-to-find-starcraft-2-build-orders/
The initial state of a StarCraft match is pre-determined and constant. And like chess, decisions ma... | stackexchange/codereview |
i am getting the Parameter url must be non-null error while trying to pass the path of an XML file to an Shockwave flash object.
The javascript code is as follows
<script type="text/javascript">
var so = new SWFObject("preview.swf", "", "100%", "100%", "9", "#ffffff");
so.addParam("allowFullScreen", "true");
... | stackexchange/codereview |
I have the following setting:
I know P1, P2 and the angle alpha, now how do i calculate the coordinates of P3? (Note: P3 is on the same circle with origin P1 and radius P1P2)
The blue lines indicate the coordinate system
| stackexchange/codereview |
I have a component with several categories of games and I want to display a different banner depending on the category. I need the banner (and link) to be customizable so it's not simply a case of showing categoryX.jpg or whatever.
I saw this Joomla help page on another question, but it only seems to display a module t... | stackexchange/codereview |
I have this code:
if (document.images)
{
preload_image = new Image(25,25);
preload_image.src="http://mydomain.com/image.gif";
}
First of all, will this work in all major browsers?
Secondly, do I need to specify the width and height like in the code?
Lastly, will this preload my images and cache t... | stackexchange/codereview |
I'm creating a custom WPF control which derives from Grid.
It's a Chess board and so I want it's width to be the same as it's height.
How can I accomplish this?
Edit:
I tried the following.
private void cbcBoard_SizeChanged(object sender, SizeChangedEventArgs e)
{
if (e.NewSize.Width != e.NewSize.Height)
... | stackexchange/codereview |
IE does funny things with z-index. When dealing with rollover navigation, I always went through the thought process of "Ok. . . need to give this element position:relative, with this z-index, and the same to this one, then give this a higher z-index. . ." it always turned out to be a pain.
Then I thought, why not just... | stackexchange/codereview |
Are there any known label printers that will accept print commands from a web site or web application?
Specifically, the one-off label printers such as Dymo, Brother, Zebra, etc.
Has anyone had success in printing to these printers (without using an Internet Explorer-Only hack or ActiveX control)
I would think that, ev... | stackexchange/codereview |
I've a problem, I'm using an AdvancedDataGrid .
It loads about 3000 records with about 20 columns. I constantly get Flex execution timeout because the grid executes a lot inside LayoutManager.
How can I make it asyncronousely or faster at all?
| stackexchange/codereview |
I would like to make sure I get KiokuDB's scope concept correctly.
Suppose I would like to load an object from db1 and store it in db2. Must I have both scopes 'open' at the same time?
| stackexchange/codereview |
I am working on a program to burn a CD. Its located on a server but to my knowledge when it is ran it is pulled to that users computer, then ran.
My problem is it runs in debug and after I publish it to the server, it can no longer find my CD burner.
I can provide more information, i just don't know what to add.
| stackexchange/codereview |
I've got a delegate statement that works like so:
$("body").delegate("tr[type='option']",'mouseenter',function(){
The problem is that it's grabbing elements from tables I don't want. So I tried:
$("body").delegate("table[class='ms-MenuUI'] > tr[type='option']",'mouseenter',function(){
Which isn't working at all (tho... | stackexchange/codereview |
If I have an app that supports Game Center and I'd like to provide Achievements for completing a puzzle pack that's sold as an in-app purchase, how do I sync the iTunes account that's being charged for the in-app purchase with the Game Center user account that's doing the buying? As I understand it, they're two separa... | stackexchange/codereview |
Is it possible to get nhibernate to sort lists on a specific property/column (if no sorting have been specified)? Maybe in the mapping files or in some other way?
| stackexchange/codereview |
I'm creating a graph that does some database queries then builds the graph using GD functions then also puts the info from the database into an array that is stored in $_SESSION['my_data']. This graph is displayed on the web page using img tags.
<img src="my_graph.php?time=$time">
<?
print_r($_SESSION['my_data']);... | stackexchange/codereview |
Using Safari browser and finding one hurdle to making it my default browser - there is no default setting for clearing/deleting all the stuff you find in the menu's Reset Safari panel.
I made an Automator routine using the 'Watch Me' to do this and quit safari - it works. But, I'd really like to not have the steps disp... | stackexchange/codereview |
My app currently sends GET httpwberequests and parses the content after reading the response stream for each request and the repeats this process over and over. I need to implement a continuous http stream which uses the same GET request but the connection stays open, from what I understand. how would I change my exist... | stackexchange/codereview |
When I try to call a function using a timeout in pyGtk, I receive the error message TypeError: second argument not callable.
All I want to do is call a very simple function from within the time out. To illustrate my proble, I have simply prepared the function do_nothing to illustrate my problem.
def do_nothing(self):
... | stackexchange/codereview |
I'm writing Multimarkdown from Perl to create an HTML table.
I wonder if there's a simple way to make the table dynamic , that is, allow the viewer sort it by clicking on a column header, or even filter records by entering a simple rule.
I do not really know HTML. I'm coding in Perl and only generate HTML (actually, Mu... | stackexchange/codereview |
I write a sub in Perl to merge 2 hashes of the same structure; so that merge($a,$b)
$a = {
k1 => { sk1 => 'v1' },
k2 => { sk3 => 'v3', sk4 => 'v4' }
};
$b = {
k1 => { sk2 => 'v2'},
k3 => { sk5 => 'v5'}
};
would result in
$c = {
k1 => { sk1 => 'v1', sk2 => 'v2' },
k2 => { sk3 => 'v3', sk4 => 'v4' }
k3 => { sk5 ... | stackexchange/codereview |
I wish to fix the width (in pixels) of three columns in a table without affecting other tables by styling. I can achieve the desired effect by styling the columns see the code below. However the styling on the columns below is not linked to a specific table. I wish to use styling so that I do not need to use the <col .... | stackexchange/codereview |
I am trying do the following in a Makefile. For some reason I cannot get it to work right:
Get the first line of a file
Check if the line starts with '/'
If the line does not, prepend a path to every line in the file
Here is the code I have:
if test $${$(shell head -n 1 ./root/lib/modules/$(KERNEL_VERSION)/modules.d... | stackexchange/codereview |
Having created a functional test project using nHibernate with all the typical trimmings I've got a very good handle on how I can leverage nHibernate, well at least as much as I can so far. However, I'm wondering how other developers handle scenarios where the application needs to retreive data from the backend databa... | stackexchange/codereview |
Is there some callback I can hook into that is called when the first window of an application is made visible, whatever it is? This callback has to be registered before any message loop or anything like that is created, and I can't alter any existing calls to Application.Run or similar (I'm adding it in a postprocessin... | stackexchange/codereview |
I have a page with a Tomahawk datatable. On its "value" tag, i call a method that gets a list from some EJB and if it comes empty i have to display some message on the page. The logic works, it executes the method i created to display the message on the screen, but it won't render the message on the page. I am afraid t... | stackexchange/codereview |
If a table is defined to have a unique constraint on a column, is it also necessary to define a separate index on that column if we want it to be indexed for fast lookup?
For example, given the following table indexes:
mysql> show index from FRONTIER;
+----------+------------+-------------------------+--------------+--... | stackexchange/codereview |
I can't figure out how to change my regex below to keep the slashes. I want to make sure it only contains letters, numbers, underscores, dashes AND slashes.
($query is something like e.g. /offer/some-offer-bla-bla-bla)
$query = preg_replace('/[^-a-zA-Z0-9_]/', '', $query);
Thanks
| stackexchange/codereview |
I am unable to get this loop to function properly. Whenever ($records[$row][2] == $prevRow2) I need it to recreate the class=field and only close the div=row that's part of the group where ($records[$row][2] == $prevRow2). Please help!!
if (($handle = fopen('upload/ATLANTA.csv', "r")) !== FALSE) {
$prevRow... | stackexchange/codereview |
So I've read some stuff about multithreading and NSOperation and wondering how I can use that to improve my app. Using Instruments I have isolated a few places where my app could definitely use a speed improvement. My question is, are these kinds of things suitable for another thread using NSOperation?
Drawing a view: ... | stackexchange/codereview |
I have a form like this:
<form id='myForm'>
<input type='text' name='search' />
<input type='text' name='maxPrice' />
</form>
and table for my jqGrid:
<table id='myGrid'></table>
I need to POST (not GET) the data from myForm to my server method in order to fetch the row data and populate the grid. So far, I've not be... | stackexchange/codereview |
I am converting some jpg images to png w/ imagemagick & have the following in perl:
system("convert $jpg $png");
print "$?\n";
Is there a way to capture the actual errors from imagemagick (rather than just whether or not it executed successfully as I have in the code above)?
note: I use imagemagick solely as an exampl... | stackexchange/codereview |
P/S: I am a PHP programmer.
Given:
div{3|5|6|9}[id = abc| class=image], a[id=link|class=out]
I want to use regex to generate a result as an array, e.g:
array(
[div] => array(
"3|5|6|9",
"id = abc| class=image"
)
[a] => array(
"",
"id=... | stackexchange/codereview |
I have tried this myself for a considerable period and looked everywhere around the net - but have been unable to find ANY examples of Fuzzy Phrase searching via Lucene.NET 2.9.2. ( C# )
Is something able to advise how to do this in detail and/or provide some example code - I would seriously seriously appreciate any he... | stackexchange/codereview |
I'm putting Tweet buttons and Facebook Like buttons on my site. They work fine in most areas but I have a modal popup (a popup that stays within the content window) that's causing some strange behavior. Basically on random page loads the facebook iframe will load twitter's content and visa versa. Some times there are t... | stackexchange/codereview |
I'm using fstream to open up .txt files with C++. So far it's working great. However, I'd like my console to display an error message if the input_file can't be opened. How should I go about this?
Snippet:
cin >> in_file_name ;
ifstream in_file(in_file_name.c_str());
in_file_str.assign(istreambuf_iterator<char>(in_... | stackexchange/codereview |
Html:
<input type="text" title="Ort, gata eller kommun" value="something">
<a href="#">Teramo, Italy</a>
I want it so that when the a-tag is clicked, the input-tag value is set to "Teramo, Italy"
Any suggestions?
| stackexchange/codereview |
Quite a simple question ive got a few sortable unordered lists
with images that resized to the div by absolute and the li which class .image_block which has width/height and float at 100px so something like this
<ul>
<li class='.image_block'><img src="pic.png"</li>
<li class='.image_block'><img src="pic1.png"</li>
<... | stackexchange/codereview |
I have code that I am porting from iOS 4 to iOS 3.2 for a demo project on an iPad. I have this code:
+(int) parseInt:(NSString *)str
{
NSNumberFormatter *nf = [[NSNumberFormatter alloc] init];
[nf setAllowsFloats:NO];
[nf setMaximum:[NSNumber numberWithInt:INT_MAX]];
[nf setMinimum:[NSNumber numberWithI... | stackexchange/codereview |
Does anyone happen to know of any live WebSocket servers which are accessible over the internet and listen on the standard ports (i.e. 80, and 443). Anything will do - an echo server, for instance.
Thanks
| stackexchange/codereview |
I am trying to find all occurrences of a literal float value in Python code. Can I do that in Komodo (or in any other way)?
In other words, I want to find every line where something like 0.0 or 1.5 or 1e5 is used, assuming it is interpreted by Python as a float literal (so no comments, for example).
I'm using Komodo 6.... | stackexchange/codereview |
How can I deal with a quote in data that has to be there?
This javascript statement works fine until city name is "ST JOHN'S".
We are not able to change the change the city name in database -or- use a more reliable key.
$('#map_output').html('<p><img src="img/map/<?=$CITY_OUT?>_map.PNG" width="600"></p>')
| stackexchange/codereview |
I need to make sure a user has the correct permissions before allowing them to edit an employee's information. Specifically the user has to be an admin and the user must belong to the same company as the employee. What's the best way to do something like this?
def EmployeesController < ApplicationController
before_... | stackexchange/codereview |
can I do this without looping through the whole list?
List<string> responseLines = new List<string>();
the list is then filled with around 300 lines of text.
next I want to search the list and create a second list of all lines that either start with "abc" or contain "xyz".
I know I can do a for each but is there a bet... | stackexchange/codereview |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.