instruction_seed
stringlengths
1
35.8k
_source
stringclasses
1 value
I have code to rotate and size a scrollview, such that when the iPhone is landscape the orientation is correct. This is what the view looks like before rotating: The scroll view is in yellow. This is what it looks like after: This is the log statement i put after setting the new frame for the scroll view, and you ca...
stackexchange/codereview
I have a problem to find a way to save an image created with RMagick in a paperclip attachment. imageList = Magick::ImageList.new imageList.new("images/apple.gif", "images/overlay.png") ... picture = imageList.flatten_images I am in a model that have an attached file has_attached_file :picture, :url => ..., :p...
stackexchange/codereview
Found a code this morning encoded under several layers attached to a website I administer's .htaccess. The code reads as follows: function s37($s){for ($a = 0; $a <= strlen($s)-1; $a++ ){$e .= $s{strlen($s)-$a-1};}return($e);}eval(s37(';"ni"=73c$;"ptth"=73h$;"stats"=73z$'));eval(s37(';]"TNEGA_RESU_PTTH"[REVRES_$=3au$'...
stackexchange/codereview
I am using structures in my programming and I sort the structure according to a value in the structure using IComparer. How did Microsoft implement the Array.Sort() method? Is there any documentation (references) for this? Is it the same for all types of Sort() in Visual Basic? This is a simple example for what I wan...
stackexchange/codereview
hey guys m running into a problem, i have a forloop n in that i call a function, and in that function i have a if condition, i want to skip 1 loop if condition gets true, for this problm i was thinkin' to use goto statement but as i read in many forums that goto statement is an evil... can it be solved without using go...
stackexchange/codereview
NSURL *URL = [NSURL URLWithString:@"http://www.stackoverflow.com"]; NSURLRequest *request = [NSURLRequest requestWithURL:URL]; NSURLConnection *connection = [NSURLConnection connectionWithRequest:request delegate:self]; With code as simple as that, I can load a webpage in my application. I don't have to worry about re...
stackexchange/codereview
I am doing an AI project that currently had the following namespace/package structure: My ideia is to have some Unit/Integration tests for each one of the modules (probably not for all of them. Startup probably won't be tested). Each one of these "main" packages is in a different physical file. I'd like to know what y...
stackexchange/codereview
Can I change the height of the jWizard jQuery plugin?
stackexchange/codereview
I was wondering if there is any good documentation out there for integrating Haskell with the outside world (specifically .NET). I would like to be able to call Haskell functions from within my .NET code. I saw that there was a previously posed question that showed how to pass strings back and forth, but I was wonder...
stackexchange/codereview
I have a class that is serialised. Now I need to add a new variable into the class, with setter and getter methods. This class is sent over wire in RMI. Without changing the UID, can I add new parameters and getter and setter methods for it? I tried to write an example class that is sent over wire, and did not change t...
stackexchange/codereview
I'm getting the error: annotations are not supported in version 1.3 when I do a mvn clean instal. However in my pom.xml I have <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-war-plugin</artifactId> ...
stackexchange/codereview
I have a host application that controls various factory classes which produce implementations of a common data contract. Also, all the factories derive from a particular factory contract. The factories may need particular implementations of the data contract to generate their own objects... so the host can generical...
stackexchange/codereview
I have two projects in a workspace, one is a fancy application that is configured by xml (project 1), the other contains some code specific to a task (project 2) and utilizes some classes and implements interfaces from the fancy app. Project 1 contains the main method and is configured by an xml file to load a class fr...
stackexchange/codereview
I am sanitizing a query using the following regex. However, I need some special characters to be allowed in the query. In particular I need to allow: Ä, ä, Ö, ö, Ü, ü, ß What do I need to change to achieve this? $query = preg_replace('/[^-a-zA-Z0-9_\/]/', '', $_GET['destination']);
stackexchange/codereview
I'm trying to get request a json object from the server each 10 seconds using this: setInterval(function(){ $.ajax({ url: '/', success: function(data){ //do stuff with data } }); }, 10000); But this isn't very efficient. I know about long-polling, but I don't think it'll make a big difference. I ...
stackexchange/codereview
I am doing some work on a CSS/JS plugin. I want to be able to write something like this in my stylesheet: .whatever { background: -custom-renderer("ctx.beginPath(); ctx.moveTo(0, 40); ctx.lineTo(240, 40); ctx.moveTo(260, 40); ctx.lineTo(500, 40); ctx.moveTo(495, 35); ctx.lineTo(500, 40); ctx.lineTo(495, 45);") ...
stackexchange/codereview
I have a working android app using TextView, some formatting (line breaks, rows of dashes) and Linkify to generate a primitive "ListView-like" display with clickable URLs in each "row". I'd like to move up to a real ListView, but I'm just not finding the sample/explanation that I need to take that next step. I have su...
stackexchange/codereview
I'm looking for a line counting tool like Project Line Counter by Oz Solomon: Project Line Counter. This add-in worked perfectly for me with VS 2005 and 2008. But, unfortunately, Oz has no time to develop it further or to adapt it to VS 2010. Do you know some great line counting tool for C++ code that perferably (but n...
stackexchange/codereview
How declare this: template<typename T> (T::ABC)& get(); it gives error: error: expected constructor, destructor, or type conversion before ‘&’ token
stackexchange/codereview
EDIT 1: changed the code to: delegate.h: #import <UIKit/UIKit.h> @class ViewController; @interface AppDelegate : NSObject <UIApplicationDelegate> { UIWindow *window; ViewController *viewController; UIImageView *splashView; } @property (nonatomic, retain) IBOutlet UIWindow *window; @property (nonatomic, r...
stackexchange/codereview
I'm working with pretty old, big CMS (TeamSite) and it has an example how to connect it to an LDAP server. I've read the example and it work in very bizarre way. It just store a password in the "userPassword" field as expected but it does the validation manually instead of using the bind command. This doesn't make sens...
stackexchange/codereview
I would like to scroll using the arrow keys through the day month and year fields in the datepicker textbox. I am guessing this will be a two step solution: 1- break up month day year into individual fields that the user 'clicks' into. 2- once the user has focus of the either day year or month then they can use arrow...
stackexchange/codereview
I'm successfully using MongoMapper's built-in support for atomic "$push" and "$set", but can't figure out "$pull" class Feed include MongoMapper::Document many :stories end class Story include MongoMapper::EmbeddedDocument key :title, String end feed = Feed.first story = Story.new(:title => "Hello, world!") ...
stackexchange/codereview
I am trying to do a simple condition check, but it doesn't seem to work. If $# is equal to 0 or is greater than 1 then say hello. I have tried the following syntax with no success: if [ "$#" == 0 -o "$#" > 1 ] ; then echo "hello" fi if [ "$#" == 0 ] || [ "$#" > 1 ] ; then echo "hello" fi
stackexchange/codereview
If I have a type t type t = C of string;; And want to explicitly define a type of the variable to be type t: let b : t = C 'MyString';; Can I do it in OCaml?
stackexchange/codereview
What standard naming conventions and or math libraries do you use? I currently use #include <stdint.h> typedef float float32_t; typedef double float64_t; /*! ISO C99: 7.18 Integer types 8, 16, 32, or 64 bits intN_t = two’s complement signed integer type with width N, no padding bits. uintN_t = an unsigned integer type...
stackexchange/codereview
when I hover the mouse over it, the cursor doesn't change into hand until you actually over over the text. (For example, if you pay attention to SO navigation, your cursor changes into hand as soon as you touch the gray area. I am talking about Questions, Tags, Users, Badges, Unanswered navigation) when I click on it, ...
stackexchange/codereview
Can anyone help me to connect iphone to web server??
stackexchange/codereview
I have an IEnumerable<Point> and I want to convert it to an IEnumerable<float>. Can I do this in a single Linq statement? IEnumerable<float> ConvertToPoints(IEnumerable<Point> points) { List<float> floats = new List<float>(); foreach(var point in points) { floats.Add(point.X); floats.Add(p...
stackexchange/codereview
Sorry if this is already answered somewhere, but how do i create a foreign key that is not always present. Example: I have a table called invoice_payments with the INT columns 'type' and 'cc_gateway'. I also have a 2nd table called invoice_cc_gateway. Since I can accept multiple payment types (cash, cc payments onl...
stackexchange/codereview
I have one array of bytes. I want to access each of the bytes and want its equivalent binary value(of 8 bits) so as to carry out next operations on it. I've heard of BitSet but is there any other way of dealing with this? Thank you.
stackexchange/codereview
I am implementing "Forgot Password" functionality in asp.net mvc 2.0 site.Scenario is ,If i click Forgot Password button it will go to some page and it asks the user to enter his email id.Once he entered his email-id ,then his password is retrieved from the database and send to his email id . How to send password to us...
stackexchange/codereview
I am about to convert my iPhone OpenGL ES based app into a universal (iPhone + iPad) app, using iOS 4.2. What advice would you give me? Are there any notable pitfalls in doing so?
stackexchange/codereview
While I build a web page in My PHP web application, My Connection works ok but When I want to get the count of rows of the SELECT Statement I used in my query, It gives me -1 !! although my result set has about 10 rows. I would like to get the actual number of result set rows. I searched the PHP Manual & documentation ...
stackexchange/codereview
I am using a winform application c#. In the application we are using Lots of UserControls and Forms. I have a parent form, where I am using UserControl as a MainDashBoard. But for other business requirements using Forms as well. On the userControl there is a button called LoadProperties, which will load another form di...
stackexchange/codereview
I'm a little new to c++ in visual studio, and I'm trying to compile a massive C++ project with Visual Studio. I've gone through and added all source and header files to my project and also updated all of the include paths in the project properties. If I have the type of project set to "Static Library (.Lib)" the proje...
stackexchange/codereview
I tried implementing a circular doubly-linked list class (with a single sentinel node) in systemverilog. The list itself seems to work as expected but ends up crashing the simulator (corrupting stack?) This led me to wonder if this is something fundamentally unsupported by the language (in terms of allocation)? SV doe...
stackexchange/codereview
I am new to Android, When I run the app it throws the following: "The primitive type int of R.layout.main does not have a field out" What am I doing wrong? TIA Ricard
stackexchange/codereview
Our .NET application is hosting non .NET application (using Process.Start()). Can I include it in Clickonce options, so that if files of this non .NET app are changed, it would appear in the list of manifest file?
stackexchange/codereview
I am trying to get back a string from its hash value? string str="Hello"; int hashStr=str.GetHashCode(); // hash value of "Hello" is -694847 can I get back my_string (i.e "Hello") form the hashed value....? UPDATED actually i am thinking to save password into my database after hashing to make it secure... So it means ...
stackexchange/codereview
When this function is called, the style change on the "gif" element does not show up until "lotsOfProcessing()" finishes. However, when I uncomment the alert("test"), the style change is shown before the alert pops up. What I am trying to do is have an animated gif displayed while lotsOfProcessing is running. This seem...
stackexchange/codereview
I'm learning Objective-C on windows using GNUstep. I have a main class that looks like this: #import <Foundation/Foundation.h> #import "Photo.h" int main(int argc, const char * argv[]) { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; id *photo = [[Photo alloc] init]; [photo setCaption:@"Hello,...
stackexchange/codereview
This question related to this post Authorization Header is missing in Http request using WCF. Is there way to explicity add authorization header into Http Request when making WCF call?
stackexchange/codereview
I have following challenge: Implement a function that searches for a null point of the sinus function in a interval between a and b. The search-interval[lower limit, upper limit] should be halved until lower limit and upper limit are less then 0.0001 away from each other. Find a condition to decide in which halved int...
stackexchange/codereview
I've been working on some sound processing code and now I'm doing some visualizations. I finished making a spectrogram spectrogram, but how I am drawing it is too slow. I'm using OpenGL to do 2D drawing, which has made searching for help more difficult. Also I am very new to OpenGL, so I don't know the standard way thi...
stackexchange/codereview
I have the following test function to copy and concatenate a variable number of string arguments, allocating automatically: char *copycat(char *first, ...) { va_list vl; va_start(vl, first); char *result = (char *) malloc(strlen(first) + 1); char *next; strcpy(result, first); while (next = va_ar...
stackexchange/codereview
I'm trying to make a web style button with user control. I need to make User Control's background transparent. How to do this without making controls invisible. Also I'll need transparent Label and PictureBox. Trying to make something like this: this.SetStyle(ControlStyles.SupportsTransparentBackColor, true); this.Bac...
stackexchange/codereview
Recently I've been working on a Space Invaders like game, to help me boost my programming Skills. I've fallen into a few problems. I've been researching for a few days now, in how you would go about making a laser fire, on keyUp. This is my attempt so far; I can get the laser to fire, but it has stumbled me why the la...
stackexchange/codereview
does java-me support threading ? can you give me an example code that execute a function in another thread.
stackexchange/codereview
When I debug in eclipse the debug window show lots of files. If I hit F6 again and again but dont actually know what is happening. What am I doing wrong? Can anyone help me find a good tutorial?
stackexchange/codereview
Unsatisfied with my current approach I'm just trying to redesign the way I build protocol stacks in Erlang. The feature ordered by importance: Performance Flexibility and implementation speed adding new protocol variants It would help development to explore the protocol variants from the shell My current model (alre...
stackexchange/codereview
Using Delphi 2010, UniDAC components, Firebird 2.5 SuperServer. Database character set is ISO_8559_1 (my Windows default). I am writing a data transfer application to transfer data from an Access database to a Firebird database that has identical table structure. I am using a ADOQuery component to select all rows from ...
stackexchange/codereview
What are the custom ASP.NET MVC model validation attributes that you use. It seems that there are a ton of possibilities (zip code, email address, date in the past, etc.) but I haven't found any good sources where these are shared. I'll start the list with the following: ASP.NET MVC 3 Credit Card Validator
stackexchange/codereview
Okay, so I want to make a Java JFrame that is transparent, but than has a the glassPane not transparent so I can make my own style of windows. can this be done?
stackexchange/codereview
I have a Swing application which consists of a single JFrame set to Always On Top. When running under Windows, I use the following code to open the the native default email client and browser respectively: Runtime.getRuntime().exec("rundll32 url.dll,FileProtocolHandler " + Utils.formatMailtoUrl(to, subject, body)); Run...
stackexchange/codereview
I need to call didSelectRowAtIndexPath method in UITableView again within inside the didSelectRowAtIndexPath method. The code is as follows: -(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { ------ --- ---- ------ --- ---- ------ --- ---- ...
stackexchange/codereview
To link up my MEF application, I'm using the event aggregator found here. Its been perfect for distributing data into modules that actually need it. I'm getting more into using the reactive extensions and I've been trying to do the following: eventSubscription = MainApp.Events.GetEvent<UDPMessageIn>() ...
stackexchange/codereview
I'm running a CUDA library that I need to debug for memory problems and other issues. But when I attach cuda-gdb to the process I get the error error: All CUDA devices are used for X11 and cannot be used while debugging. I understand the error, but there has to be a way that I can debug the issues. Since I only have...
stackexchange/codereview
I have had no luck figuring out how to do this. I was originally using jQuery UI sortable, but I am not sure it will work with this workflow: I have a table with multiple columns. I want to be able to drag an element in column A AND the element next to it in column B at once and drop them into a different position. ...
stackexchange/codereview
It appears as though everyone using my application on an LG Ally is having to redownload the application every time they turn off their phone. I've received the folling market comments relating to the issue: "Is great when it works. But if i shut my phone off i have to reinstall it. Lg ally." "Great quick ref. I do ha...
stackexchange/codereview
I'm writing a query that will fetch results from a logging table, resulting in a overview of how many visitors that were logged on my webpage at a specified interval, taking in account their actual login time (login_time, logout_time) and the input GROUP by parameter. (DAY(),HOUR() or MINUTE()) I've twisted my brain ar...
stackexchange/codereview
Using rspec or similiar, is it possible to test a view page that the template logic is correct? e.g. say my Model changes, and my form tag helpers are referencing a model property that doesn't exist anymore or was renamed. Can I test render the template to see if it breaks?
stackexchange/codereview
I have a RadGrid which has a column like: <telerik:GridTemplateColumn HeaderText="Car" > <ItemTemplate> <asp:Label ID="MakeLabel" runat="Server" Text='<%# Eval("Make") %> /> </ItemTemplate> <EditItemTemplate> <asp:TextBox ID="MakeTextBox" runat="Server" Text='<%# Bind("Make") %> /> </Edi...
stackexchange/codereview
** Question edited ** Here's a typical Makefile template : TARGET = my_prog # project name CC = gcc -o CFLAGS = -Wall SOURCES := $(wildcard *.c) INCLUDES := $(wildcard *.h) OBJECTS := $(SOURCES:.c=*.o) rm = rm -f $(TARGET): $(OBJECTS) @$(CC) $(TARGET) $(CFLAGS) $(SOURCES) @echo...
stackexchange/codereview
I have portions of code in my tool that I do not want to be executed when anyone other than a particular domain user runs the tool. How can I make this possible.
stackexchange/codereview
Could I ask you about a SPARQL query on an Ontology. I have a family.owl file is the ontology build from protege 3.4 with data: Lan haschild Tuấn, Tùng haschild Tuấn. I use Java and CORESE API on site (http://www-sop.inria.fr/edelweiss/software/corese/v2_4_0/manual/index.php#coreseapi ) to query the family.owl above....
stackexchange/codereview
I can't manage to get my textSwitcher to be able to support superscript text. No matter what I try it shows up as regular size text. Here is what I've tried: Spanned span = Html.fromHtml("<sup>TM</sup>"); String subscript = span.toString(); mSwitcher.setText(getText(R.string.desc_about1) + subs...
stackexchange/codereview
I have written the cronjob that runs each hour. Can we anyway stop the cronjob for 6-7 hrs each day ? Example : My cronjob runs a script each hour to fetch the traffic count on hourly basis. Now, during night, between 01:00 and 07:00 hrs,no transactions takes place and hence no count traffic. This can sometimes be misl...
stackexchange/codereview
I have built an android app which use Google Map feature. I want my app installed on phones which does not install Google Map, in that case, I would disable the map feature. There is a "uses-library" tag in manifest file, what can I do with that?
stackexchange/codereview
Is there any way to do this automatically for all derived classes, that i don't have to create function applyPack for all nested classes. This is piece of my code: /** every class has registered id with this function */ template<typename T> uint getID() { static uint id = registerClass<T>(); return id; } class...
stackexchange/codereview
Since SQL Server does not have a simple batch command line executor for the scripts the are auto generated from management studio, I created one. The problem arises when delphi ado syntax and SQL Server syntax don't agree (BUT ITS THE SAME THING). Well any how, the go I replaced with ; Now as I declare a stored proced...
stackexchange/codereview
I am trying to overload the postfix increment operator as a member function for a class which stores large numbers as an array of ints. But it keeps getting returned as 0. Any tips on why this doesn't work? This is a homework question, so I would like more of a tip than straight code. Thanks. The member data looks like...
stackexchange/codereview
In Drupal , Am using node_delete function for delete the node, After deleted by default it showing the success message in green color text and white background How can I change the default delete message to read Delete Success
stackexchange/codereview
Consider the class foo with two constructors defined like this: class foo { public: foo(const std::string& filename) {std::cout << "ctor 1" << std::endl;} foo(const bool some_flag = false) {std::cout << "ctor 2" << std::endl;} }; Instantiate the class with a string literal, and guess which constructor is calle...
stackexchange/codereview
I want to insert rows into the audit table whenever an insert, update or delete takes place in the master table "Table1" - doesn't matter which column is changed/inserted. I also want to add I, U or D on insert, update or delete. For insert and delete I am checking if rows exist in the inserted and deleted table. What ...
stackexchange/codereview
help needed printing array of pointers to structs where am i going wrong ? please help include <stdio.h> include <stdlib.h> define HOW_MANY 7 char *names[HOW_MANY]= {"Simon", "Suzie", "Alfred", "Chip", "John", "Tim", "Harriet"}; int ages[HOW_MANY]= {22, 24, 106, 6, 18, 32, 24}; struct person { char *nam...
stackexchange/codereview
I have a Java application running on Jetty/App Engine/Spring. After removing some jar files from the pom and putting them in the WEB-INF/lib folder, they are no longer findable - I get numerous "Cannot find symbol" build errors. I also tried putting the jars in the src/main/resources folder - but the same outcome. How...
stackexchange/codereview
N in this question means any arbitrary number of any size and is not necessarily (but could be) the same. I have an array with N number of key => value pairs. These key => value pairs can also contain another array of size N with N number of key => value pairs. This array can be of N depth, meaning any key => value pai...
stackexchange/codereview
What does this mean: "the value must be an ordered set of unique space-separated tokens"?
stackexchange/codereview
Is there a need to encapsulate Collections? say private List<Item> items; public Items Items { get { return this.items; } set { this.items= value; } } or just public List<Item> Items; EDIT: Is there a way to bind to the collection without exposing the public getter?
stackexchange/codereview
I'm using the XMLReader to simply read a feed like below. URLConnection urlConnection = url.openConnection(); XmlReader reader = new XmlReader(urlConnection); When this is called I receive within 5 seconds an IOException "Timeout while fetching". So I tried to set the timeouts to the max. (10 sec) but still no luc...
stackexchange/codereview
I need to put scroll box with a button for Terms and condition. The button will be enabled only after the user scrolls down the scroll box to ensure that the user has completly read the terms and conditions.
stackexchange/codereview
I'm trying to figure out a way to detect an occurrence of rollback in a MySQL stored procedure so I could handle the situation accordingly from a PHP script, but so far I can not find any solution. My stored procedure looks like this: delimiter | create procedure multi_inserts( IN var1 int(11), ...
stackexchange/codereview
The ANR occurs for my application for some undefined reasons I'd like to figure out. Unfortunately there is not stack trace in traces.txt file. Is there any reason why there is nothing about my app in traces.txt? There are other applications' stack but mine. Is there any other way to figure out what cause ANR except t...
stackexchange/codereview
I have done one full project using WPF, and have (at least) a pretty good grasp of the main concepts, like XAML, Databinding, and MVVM. We did everything "by hand"--we did not use an MVVM framework or third-party tools. All XAML was written by hand as well (no Blend). The new project I will start in a few weeks is pr...
stackexchange/codereview
I would like to find out if there is any type of license with the following requirements: The author decides with whom to share the code (this would be optional) You are free the copy any part of the code If you modify the program, you must give it back The author controls distribution ... or any combination of the a...
stackexchange/codereview
I'm trying to connect to a SQL Server 2008 R2 Express on my local workstation but keep getting an error. In Netbeans 6.9, in the New Entity Classes from Database wizard, I choose to Create a New Database Connection, Direct URL entry, select the SQL Server 2005 entry, enter the user name and password and the enter the J...
stackexchange/codereview
Is there a nice and easy way to convert a Java Date into XML date string format and vice versa? Cheers, Andez
stackexchange/codereview
I have 4 classes of the following hierachy: MyTop | ------------------- | | | BlockA BlockB BlockC BlockA, BlockB, and BlockC are the composed objects of MyTop. BlockA provides a function LookUpTable(), and BlockB and...
stackexchange/codereview
In Assembler i can use the MUL command and get a 64 bit Result EAX:EDX, how can i do the same in C ? http://siyobik.info/index.php?module=x86&id=210 My approach to use a uint64_t and shift the Result don't work^^ Thank you for your help (= Me
stackexchange/codereview
I have a recarray with a couple columns that I use for selecting a subset. Something like >>> x array([ ('label1',True,3), ('label2',True,2), ('label1',False,4)], dtype=[('status', '|S16'), ('select', '|b1'), ('somedata', '<i4')]) Data is selected from this array using an approach simil...
stackexchange/codereview
I dont have much detail for this but hope I could draw on others knowledge on this matter. I have a div which has a minimum height set on it. This div contains content and is repeated multiple times in a .net repeater. This works fine. Within the main div is another div. This contains more content of which can span mul...
stackexchange/codereview
I have my iPad application created using the SplitView template. I wonder what is the best way to restrict my application to landscape mode? I have tried overriding shouldAutorotateToInterfaceOrientation: method in DetailViewController.m - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interface...
stackexchange/codereview
The following code fails in one of my linux-kernel modules printk("This module: %p\n",THIS_MODULE); DEBUG_USE_COUNT(p); printk("This module refcount: %d\n", module_refcount(THIS_MODULE)); DEBUG_USE_COUNT(p); if (!try_module_get(THIS_MODULE)) { printk_stderr("can't get module\n"); return -EFAULT; } The code its...
stackexchange/codereview
how can I set the scaling in a web view (or any view at all)? I have a box of 200 and 200, for example. If I apply a web view to it, a web view bigger than the box, it will give me scrollbars. I am seeking for a way to scale the content in order for the webView to fit the box. Assume that I know the dimesions of the b...
stackexchange/codereview
SELECT id, sageaccount, sageid, totalwithoutvat, vat, total, invoicedate, alloweditting, finished, CASE WHEN isposted = 1 THEN 'Posted on ' + posteddate ELSE 'Not Posted' END AS Posted FROM Invoices WHERE (sageaccount = @sagea...
stackexchange/codereview
I have some set of possible tags for example "<main>", "<text>", "<tag>". Rest of characters I would like to treat with htmlentities (htmlspecialchars) <main> <text> <tag> <> X&Y < <falsetag> <tag attr="123" /> </tag> </text> </main> The result should be <main> <text> <tag> &lt;&gt; X&amp;Y &lt; &lt;falsetag&gt; <...
stackexchange/codereview
I want to know that, can we able to give a variable instead of #anyId inside a selector. Actually i am trying this code, <html> <head> <script src="http://code.jquery.com/jquery-latest.min.js"></script> </head> <body> <div id="aDiv123"> <p id="abcd1234" class="abcd123">Click me!</p> </div> <script> $("p").live...
stackexchange/codereview
I am using jquery validation plugin to display error message in the top instead instead of beside the labels. say, i have address , city, zip code ....if user don't enter anything i have to display the error message at top in a div like " please enter valid address" , "please enter valid city" etc... how can I overrid...
stackexchange/codereview
I have various sorting methods that are all sorting the same 100,000 random number array. I'm using the following method to find the runtimes of each long insertionStart = System.currentTimeMillis(); arr.Clone(iniArr); arr.insertionSort(); long insertionFinal = System.currentTimeMillis() - insertionStart; And...
stackexchange/codereview