instruction_seed stringlengths 1 35.8k | _source stringclasses 1
value |
|---|---|
I'm using an AbsolutePanel to do some drag-and-drop kind of stuff. I add child Widgets to the AbsolutePanel, and then use absolutePanel.setWidgetPosition to set their position.
But I keep getting this error:
java.lang.IllegalStateException: com.google.gwt.user.client.ui.AbsolutePanel is missing CSS 'position:{relativ... | stackexchange/codereview |
I have a simple query that updates a variable column. This query is later string.Formatted and passed to SqlCommand (c#) (TableId is a column in SomeTable):
"UPDATE SomeTable set {0}=@Value where TableId=@TableId"
I need to convert this query to a stored procedure. Is it possible at all?
| stackexchange/codereview |
I am using javascript to run a XMLHttpRequest to a PHP script which returns data. Basically I want to be able to provide the user with a progress bar (instead of a spinning circle or something) that shows the progress of getting and receiving the data. I know if I was getting a file, I could just check the content leng... | stackexchange/codereview |
Possible Duplicate:
What's Alternative to Singleton
If I am not allowed to use the Singleton pattern because it is not good OOP, what are my options? I often have a lot of stuff that needs quick access. If I use a Singleton I am told it is not good OOP, and if I reference the stuff I get a lot of classes with to muc... | stackexchange/codereview |
I'm using Entity Framework 4.0. I want to be able to find duplicate records in an EntitySet. The records will have the same data but different primary keys. When I do a .Equals I get that the records are not equal. I know I can override .Equals but I've got over 20 related entities each with a lot of fields.
Is the... | stackexchange/codereview |
Is it faster to do a single database query that finds all the results you need for a page, then do several loops through it with if/else statements to extract what you want to show in each section, or to do several database queries selecting the exact data you require and then just loop through each one separately?
For... | stackexchange/codereview |
I would like to implement a drawing class with the help of Quartz.
I want to be able to save parts of what is drawn on separate layers. I want these layers to be retrievable, so I can delete/hide/show layers on command.
Can I save multiple CGLayerRef as a NSMutableArray property of my class and then be able to retriev... | stackexchange/codereview |
I'm looking for a collection that:
is a Deque/List - i.e. supports inserting elements at "the top" (newest items go to the top) - deque.addFirst(..) / list.add(0, ..). It could be a Queue, but the iteration order should be reverse - i.e. the most recently added items should come first.
is bounded - i.e. has a limit of... | stackexchange/codereview |
I put a browser in my jsp page, and when I select the file via the browser
and I'm doing a System.outn select the file path, I only have the name,
and I need to recover all the file path selected
<form:form onsubmit="document.getElementById('idButton').value='Traîtement en cours ...'" action="ajouter.html"
m... | stackexchange/codereview |
In my django application I have different content across the site. Now I would like to add "Share this to... (Facebook,Twitter,Buzz)" link on each page. But instead of redirecting to a social app page I would like to open popup with (if needed) logging/adding possibility. How to get started ? What steps/operations I ne... | stackexchange/codereview |
I have some external dependencies to load with my C++ program, like boost or other libraries. If those .DLL of libraries are not in $PATH, once I run my program I got a "can't load the DLL" error message. To make those .DLL can be load when running my program, I need to add those path to libraries directory. For examp... | stackexchange/codereview |
UITextView is multiline. So I can't use the DONE button to dismiss the keyboard. Now what's best practise? Add a navigation bar or toolbar on top and then put an DONE button in there?
| stackexchange/codereview |
I have been doing a lot of work on UIViewControlers and Nibs and notice there are two ways of doing it.
@class AController : UIViewController
[[AController alloc] initWithNibName:<name of nib> bundle:nil];
and the other way is that you make the File Owner the the UIViewController and link the View. All you have then ... | stackexchange/codereview |
I have very simple circular (or self-reflecting) relationship core data model in my iPhone word game.
Entity Word has one-to-many relationship to/with itself which points to related words:
I use NSPersistentDocument Core Data Mac OS X template application to import words to Core Data sqlite database.
After importing d... | stackexchange/codereview |
i found that its really pain to create setup and deployment packages for windows xp/vista/7
so my question is can i make my application portable with any third party tool such as thin app ?
my application requires dot net 3.5 framework and sql express 05 installed i want to put it on usb drive and user can execute it... | stackexchange/codereview |
I’ve been persuaded by Eric Evans’ book and am integrating DDD into my framework. All basic elements (services, repositories, bounded contexts, etc) have been implemented and now I’m looking for feedback on how to correctly integrate this.
I have some business logic which has to be performed when an entity is created o... | stackexchange/codereview |
I'm running a model in Python and I'm trying to speed up the execution time. Through profiling the code I've found that a huge amount of the total processing time is spent in the cell_in_shadow function below. I'm wondering if there is any way to speed it up?
The aim of the function is to provide a boolean response sta... | stackexchange/codereview |
I have a dictionary in Python that I would like to serialize in JSON and convert to a proper C string so that it contains a valid JSON string that corresponds to my input dictionary. I'm using the result to autogenerate a line in a C source file. Got it? Here's an example:
>>> import json
>>> mydict = {'a':1, 'b': 'a s... | stackexchange/codereview |
Could anyone explain how to turn functions into methods and the variables into parameters of an object in jQuery/Javascript?
And even more interesting Why i should do that?
| stackexchange/codereview |
If I set text to my EditText and the text is bigger, the default behaviour is that the text is scrolled to right. Can I scroll it to left?
Example with EditText 8 characters long and text "Sample text":
Normal behaviour: [ple text]
What I want: [Sample t]
| stackexchange/codereview |
In MySQL, is there a way to set the "total" fields to zero if they are NULL?
Here is what I have:
SELECT uo.order_id, uo.order_total, uo.order_status,
(SELECT SUM(uop.price * uop.qty)
FROM uc_order_products uop
WHERE uo.order_id = uop.order_id
) AS products_subtotal,
... | stackexchange/codereview |
I have an activity which handles configuration changes. But now i have to change
layout.I tried in onConfigurationChanged callback just to set again the layout and hoping will get the correct layout(land) but it's still showing
the first layout for portrait view ( there two layout(same name) are placed in res/
layou... | stackexchange/codereview |
Here is a image that shows how Good Reader does it just like in the Web View.
http://d.pr/mco6
My guess is that there is no easy approach for this except add tons of code to touchesBegan, touchesMoved and touchesEnd in the custom view and map location of the string to the offset in the view. (Plus the magnifying glass... | stackexchange/codereview |
I have installed Firefox extension by double clicking abc.xpi file. Now I want to know where those files are copied, so that I can delete them. Or any other way to uninstall an extension except by going to Addons & then uninstalling it manually. I want to uninstall it programmatically.
| stackexchange/codereview |
One of my pet hates of C-derived languages (as a mathematician) is that
(-1) % 8 // comes out as -1, and not 7
fmodf(-1,8) // fails similarly
What's the best solution?
C++ allows the possibility of templates and operator overloading, but both of these are murky waters for me. examples gratefully received.
| stackexchange/codereview |
Why are there two classes for almost the same purpose System.IO.File and System.IO.FileInfo ?
| stackexchange/codereview |
What is the best way to store nsdecimalnumbers in a database? Numeric types like float, real and double are out, because it is important to preserve the precision for currency usage.
The two alternatives I have considered are string and storing two ints, one holding the mantissa and one holding the exponent. The challe... | stackexchange/codereview |
Preface:
I know, exist several topics talking about MVVM and how it is good (or bad) but my question is a bit different: I want to know if really exist any successful project that uses partially or completely MVVM, all all as a designer viewpoint.
I am starting another project using MVC (web), I have some experience wi... | stackexchange/codereview |
I'll use this simple query as an example:
Select MyColumn From MyTable Where PrimaryKeyColumn = 10.
Let's assume the table has no clustered index and there is a primary key on PrimaryKeyColumn.
If I understand correctly, the query plan will include an index seek on the primary key and a bookmark lookup on the table, u... | stackexchange/codereview |
I've included the function that is handling all of the save functionality.
Here's my problem.
I am grabbing 5 input values and saving it as a CoreData Log Entity.
Even when the Log object fails to validate, it is still being saved when I back out of the form and look at the table view.
How can I force Core Data to o... | stackexchange/codereview |
I'm trying to create a set of instances that have different instance names using instance_variable_set to change the instance name and I can't seem to get it to
work.
for i in 0..3 do
username_str = String.new
username_str = 'user_' + i.to_s
username_new = User.new
username_new.instance_variable_set... | stackexchange/codereview |
What is the correct way to change the active Drupal theme programmatically?
| stackexchange/codereview |
I have a button is inside a another table(s) inside the update panel.
<Update panel>
<ContentTemplate>
<table>
<table>
<Button>
<table>
<table>
</ContentTemplate>
</Update panel>
I would like to add a button to Update panel's trigger.
But am getting an err says "Update panel can not find the button which trig... | stackexchange/codereview |
I know that certain changes to the DOM of a web-page (by JavaScript) will result in the rendering engine calculating a new layout for rendering (not sure if my terminology is correct).
I have a process that updates data fairly frequently with comet style long-polling requests. Some of these updates are fairly freque... | stackexchange/codereview |
I used to have this form element to validate an email and display an error message if the format was invalid:
$email_users = new Zend_Form_Element_Text('email_users');
$email_users->setLabel('Email:')
->setRequired(false)
->addFilter('StripTags')
->a... | stackexchange/codereview |
I am new to docbook, but can not find a decent way to write some pieces of html code directly in the docbook xml structure. The best I could find was dbhtml-include, but it requires a separate html file to parse.
Is it possible to write a few html lines directly ?
What I am actually trying to do is to write math with ... | stackexchange/codereview |
I have a .jsp page I'm compiling with ant and deploying to a Tomcat 7 server. A couple of times the output source document has a double-quote character added at a point where it shouldn't be added. It seems to persist through multiple compiles and deploys, but they've always gone away after a while.
Here is a section o... | stackexchange/codereview |
This is a question specifically about plugin development for the Eclipse platform:
I need to implement persistence without hardcoding the name of the datastore I am using. I want to be able to have multiple instances of eclipse with my plugin running at the same time with independent datastores.
One way of doing this ... | stackexchange/codereview |
I can't figure out why the first name is not picking up on the confirmation page?
<div class="tu">Thank you, <?php echo $_GET['sender_first_name']; ?>.</div>
<?php
$sender_first_name = $_REQUEST['sender_first_name'] ;
$sender_last_name = $_REQUEST['sender_last_name'] ;
$sender_email = $_REQUEST['sender_email'] ;
... | stackexchange/codereview |
I'm currently building an app in Android, and using Robotium to do functional tests (By the way, don't use Robotium on anything less that Android 1.6, it is way too buggy).
Some of these tests have a random tendency to fail, mainly Robotium missing a text field, or timing out, not reading text. I am trying to use the ... | stackexchange/codereview |
I want to setup different rails versions with RVM. However, working with the SQLite gives problem.
First, doing
gem list -ra sqlite
gives
*** REMOTE GEMS ***
sqlite-foreigner (0.5.0)
sqlite-ruby (2.2.3 ruby mswin32, 2.2.2 ruby mswin32, 2.2.1 ruby mswin32, 2.2.0 ruby mswin32, 2.1.0 ruby mswin32, 2.0.3)
sqlite3 (0.1... | stackexchange/codereview |
i have to create a login module (The question is not language specific) but i am not sure how will i validate the user. Where and how will i store the passwords. Will i have to encrypt and decrypt my passwords and if yes what are the best suggested way to do them. Overall i need to know what all things i need to take c... | stackexchange/codereview |
- (void)webViewDidFinishLoad:(UIWebView *)YouTubePlayer {
UIButton *b = [self findButtonInView:YouTubePlayer];
[b sendActionsForControlEvents:UIControlEventTouchUpInside];
}
- (UIButton *)findButtonInView:(UIView *)view {
UIButton *button = nil;
if ([view isMemberOfClass:[UIButton class]]) {
... | stackexchange/codereview |
I have an aspx page (page.aspx) and in the page load event I have a code to generate a .txt file. Here is the sequence of actions:
type the address in the address bar of IE browser (e.g. http://localhost/somesite/page.aspx) --> this will execute the page load event and generate the txt file.
Delete the generated file ... | stackexchange/codereview |
I'm creating an iPad app based on a UINavigationController (with the bar hidden) so I can push and pop other viewControllers for navigation around the app. However, I am now wanting to add a section in which there are two viewControllers that I want to be able to switch between, so in other words they are side-by-side,... | stackexchange/codereview |
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void txtTestPrime_Click(object sender, EventArgs e)
{
TestPrime myNumber = new TestPrime();
lblAnswer.Text =
myNumber.TestPrime(ToInt16(... | stackexchange/codereview |
I want to wrap every function call with some logging code. Something that would produce output like:
func1(param1, param2)
func2(param1)
func3()
func4(param1, param2)
Ideally, I would like an API of the form:
function globalBefore(func);
function globalAfter(func);
I've googled quite a bit for this, but it seems lik... | stackexchange/codereview |
I have a C#.NET application that needs to inform anywhere from 4000 to 40,000 connected devices to perform a task all at once (or as close to simultaneous as possible).
The application works well; however, I am not satisfied with the performance. In a perfect world, as soon as I send the command I would like to see al... | stackexchange/codereview |
I'm having a Dictionary like
Dictionary<String, List<String>> MyDict = new Dictionary<string, List<string>>
{
{"One",new List<String>{"A","B","C"}},
{"Two",new List<String>{"A","C","D"}}
};
I need to get a List<String> from this dictionary, The List should contain Distinct items from the values of the above di... | stackexchange/codereview |
I`m trying to display classes that have properties of type some custom class inside it.
Model:
public class ComplexParent
{
public SimpleChild First { get; set; }
public SimpleChild Second { get; set; }
}
public class SimpleChild
{
public int Id { get; set; }
public string ChildName { get; set; }
p... | stackexchange/codereview |
In the previous question, i made a big mess there. So i want to give it a new try.
struct emp
{
int salary;
string empid;
};
struct payroll
{
int empid;
int deductions;
};
emp a1,a2, a3;
a1.salary = 9000;
a1.empid = 1;
a2.salary = 1000;
a2.empid = 2;
a3.salary = 9000;
a... | stackexchange/codereview |
I'm working on some user related tasks for a website. For cases when the person is registering or editing a user, they fill out a form and the request is handled in a servlet. At the moment, the servlet is taking all the request parameters and building a User object from them, like this:
User toRegister = new User(requ... | stackexchange/codereview |
Does a refactoring (able do conscious language-aware rename classes/variables renaming and replace simple constructions instead of doing dumb string search-and-replace) tool exist which can be used without IDE/editor?
I am particularly interested in Scala, C# and PHP languages.
| stackexchange/codereview |
I would like to animate a widget (QPushButon) to move across my application screen. For that I create a new button and using the QPropertyAnimation class and the property "geometry" of the button, I move it from top to down. The problem is that the button comes with the close, minimize, maximize buttons, etc. I don't w... | stackexchange/codereview |
I'm trying to catch the exception thrown when I insert a already existing user with the given username into my database. As the title says then I'm using EF. The only exception that's thrown when I try to insert the user into to db is a "UpdateException" - How can I extract this exception to identify whether its a dupl... | stackexchange/codereview |
I have recently installed the most recent Android Plugin for Eclipse on the most recent Eclipse version. The problem is that the syntax proposals are now very, very slow. I have to switch them off.
To be precise. If I press "." after an Android class instance, it takes several seconds, before the proposals for the meth... | stackexchange/codereview |
Disclaimer: Cocoa newbie here.
I wrote an app with a Cocoa GUI that acts as a wrapper for a command line tool. The problem is the tool does not come standard with OS X. Thus, you have to install the command line tool first before using the Cocoa app, or else the app won't function.
Can anyone point me to some docu... | stackexchange/codereview |
I would like to see an example of rendering with nVidia Cg to an offscreen frame buffer object.
The computers I have access to have graphic cards but no monitors (or X server). So I want to render my stuff and output them as images on the disk. The graphic cards are GTX285.
| stackexchange/codereview |
I have a WPF conundrum. I want some text to look like this:
Enter this preparer's info:
[ComboBox]
Alt+E is the access key that focuses the ComboBox, and when Alt is pressed, the E in the text should be underlined.
I can get the access key to work easily:
<Label Target="{Binding ElementName=PreparerComboBox}">
... | stackexchange/codereview |
I would like to factor out some of the stuff in Crypt::SSLeay's Makefile.PL into a couple of separate classes. These classes would only be used by Makefile.PL. As such, I do want them
not to be indexed by the PAUSE indexer
not to be installed as part of the module.
Should I just put them in inc the way Module::Inst... | stackexchange/codereview |
Possible Duplicate:
A comprehensive regex for phone number validation
My scenario:
i want to expect regular expression for following number
+(91)-(44)-96217000
+(91)-44-96217000
i try this expression is not working
static bool IsPhone(string s)
{
return Regex.IsMatch(s, @"\(?\d{2}\)?[\s\-]... | stackexchange/codereview |
Simple, right? Well, this isn't working :-\
$skuList = explode('\n\r', $_POST['skuList']);
| stackexchange/codereview |
This is my requirement ( I searched a lot but I could not find a solution)
I have a merchant account in google base where I added my products.
In my site I want to list those products by querying the googlebase feeds.
And the customer should be able to get those products without any authentication.
I tried the sample c... | stackexchange/codereview |
I'm running a multi-threaded C program (process?) , making use of semaphores & pthreads. The threads keep interacting, blocking, waking & printing prompts on stdout continuously, without any human intervention. I want to be able to exit this process (gracefully after printing a message & putting down all threads, not v... | stackexchange/codereview |
I have simple application which manages football teams and matches. I am using JPA, in the form editMatch.jsp i have property team_1, team_2 (instance of class Team) for choosing the team from the list. The problem is when editing match, the team_1 and team_2 dont select in the list, and after submitting the error mes... | stackexchange/codereview |
Creating this theme, I'm pretty new to jquery and struggling as usual.
Just watched this tutorial and decided to have a shot at making my own theme settings to simplify customization.
This is what i have so far:
(function($){
$.fn.themeSettings = function(options) {
var
slide... | stackexchange/codereview |
This is probably something very simple, so forgive my blonde moment :)
I have a table 'album'
* albumId
* albumOwnerId (who created)
* albumCSD (create stamp date)
Now what I am trying to do is to select the top 10 most recently updated albums. But, I don't want 10 albums from the same person coming back - I only want... | stackexchange/codereview |
I am working on a Spring MVC application in which I have recently been convinced to revamp my database code. Before I was using very traditional JDBC code that I have been told was very "old school" because of the boilerplate code. I have been making the transition to using JdbcTemplate with Spring.
I have configured a... | stackexchange/codereview |
When we disabled the viewstate in gridview its lose value but this case not true with Textbox control why?
| stackexchange/codereview |
I am working on a project in which i want to add preloader and for that i have used the sample preloader provided in cs5 (in sample files). i have moved(from another fla) all my code to second frame and all library content to current fla's library.
Now the problem is that the size of first frame is now 182kb (the size ... | stackexchange/codereview |
I have:
img = imread('pic.jpg','jpg');
r = img(:,:,1);
g = img(:,:,2);
b = img(:,:,3);
figure, imshow(r);
figure, imshow(g);
figure, imshow(b);
How to set title over each picture?
| stackexchange/codereview |
I can tell hbase to disable and delete particular tables using:
disable 'tablename'
drop 'tablename'
But I want to delete all the tables in the database without hardcoding the names of any of the tables. Is there a way to do this? I want to do this through the command-line utility ./hbase shell, not through Java or Th... | stackexchange/codereview |
Let me specify little background.
I currently use an open source program to run my TV Tuner (DScaler). The final version for the software has some support for Direct3D output, the problem with this is that it lags. I have been going through the code and reading through DirectX documentation trying to find a place to op... | stackexchange/codereview |
#include <boost/ptr_container/ptr_vector.hpp>
#include <iostream>
using namespace std;
class Derived
{
public:
int i;
Derived() {cout<<"Constructed Derived"<<endl;}
Derived(int ii):i(ii) {cout<<"Constructed Derived"<<i<<endl;}
~Derived() {cout<<"* Destructed Derived"<<i<<endl;}
};
int ... | stackexchange/codereview |
This is a basic looping question but with a twist, so it's likely that i'm missing something easy - apologies in advance...
I'm trying to pull the results from an array $testoutput - which is filled with 3 arrays:
Running the following code:
foreach ($testoutput as $ID => $Array) {
echo $Array . "<BR>";
}
Returns:
... | stackexchange/codereview |
I'm having some difficulty trapping an exception during my testing. I actually disconnect the service so that the endpoint is not available, and I am attempting to modify my application to handle that possibility.
The problem is that no matter where I put try/catch blocks, I can't seem to catch this thing before it get... | stackexchange/codereview |
I'm using ShellAndWait from here http://www.cpearson.com/excel/ShellAndWait.aspx and I keep getting 1 returned (which means the command didn't work in Windows). But when i paste my cmdLine into Start, Run box it runs fine. Any ideas? I'm using Excel VBA for this and here's my code that I'm calling ShellAndWait with
Wha... | stackexchange/codereview |
1) I realize namespaces are a means of differentiating between different schemas/vocabularies specified using XML Schema, but I don’t understand why it’s a good idea that a namespace ( for which the schema is developing a vocabulary ) is specified within the schema itself ( via targetNamespace attribute ).
a) Wouldn’t... | stackexchange/codereview |
In SharePoint 2010, we have the List View Threshold, which defaults to 5,000, and:
Specifies the maximum number of list or library items that a database operation, such as a query, can process at the same time outside the daily time window set by the administrator during which queries are unrestricted.
So, I'm looki... | stackexchange/codereview |
For example I have a file whose content is:
abcdefg
then i use the following code to read 'defg'.
ByteBuffer bb = ByteBuffer.allocate(4);
int read = channel.read(bb, 3);
assert(read == 4);
Because there's adequate data in the file so can I suppose so? Can I assume that the method returns a number less than limit of t... | stackexchange/codereview |
I want to open a PDF file in a button click. I'll keep the PDF file within the solution/namespace of the project. Can anyone give me solution for this?
| stackexchange/codereview |
I want to match certain symbols only when they are not prefixed by specific characters. For instance, match "))))))))))" when it is not preceded by "x". Need some advices. My current expession is
(?<!x|X|:|=|\\1)([\|()\[\]])+
which does not work.
[EDIT] Rephrase my question
| stackexchange/codereview |
i'm very new to sencha and i need help with it.
can anyone give me few links regarding sencha tutorials and books....
on the other day i found out a site showing info and source code about sencha.
i remember it as sencha kitchen sink.....but now when i google it i couldn't find it if you know about this please help me ... | stackexchange/codereview |
I have a problem with cycle plugin multiple pager in the same page
I would like to show 24 cycle plugin in the same page. Each plugin contains some picture and information. So I would like to control each other with "pager". Everything is OK, all plugins it works simple document ready function. But I have a quite diffe... | stackexchange/codereview |
I'm trying to figure out, how to create a hardware inventory / report on Windows 7 including:
All devices in / attached to a system.
Driver / device information per device (Device Type, Manufacturer, Driver Version, Driver Date, Driver Provider, Driver Files, Hardware Ids)
If the drivers is digitally signed (WHQL) / ... | stackexchange/codereview |
I tried to perform the following query:
SELECT t1.[user1], t1.[user2],
(CAST(t1.[total_event_duration] AS DECIMAL)) / (CAST (t2.[total_events_duration] AS DECIMAL)) AS buddy_strength
FROM [CDRs].[dbo].[aggregate_monthly_events] AS t1
INNER JOIN [CDRs].[dbo].[user_monthly_stats] AS t2
ON t1.[user1] = t2.[user... | stackexchange/codereview |
Just a simple problem without any idea of how to do it. Does anyone know how/if this can be done?
Reason: I just want one solid dialog box with no partitions as it looks a little better in my application.
EDIT
public void showCustomDialog() {
Dialog dialog = new Dialog(this);
dialog.setContentView(R.layout.cus... | stackexchange/codereview |
I'm trying to update a Google Map (API V3) with markers using my friends locations stored in a database. I want to refresh the map every minute or so... kind of like google latitude which shows where yours friends are on the map.
Here is SOME of my Javascript:
Please note that all i need to do is get a list of location... | stackexchange/codereview |
Currently I am using java servlets to set up Hashmaps, lists, and range of business objects and then pass them to a jsp page via request.setAttribute("myMap", myMap);
How can I directly access this data in javascript/jquery? What is the syntax ?
At the moment I am using jstl and EL expressions to loop through data and ... | stackexchange/codereview |
I'm learning RSpec 2 with Rails 3 and while it's been going along quite nicely so far, I'm having a problem testing the helper link_to_unless_current in a view. What I've been trying to do is use a simple assert_select from a view spec to determine if a link is being generated in the following partial view (HAML):
%art... | stackexchange/codereview |
So I'm in the process of writing an ASP.NET application that requires to import users from a PHP application. The passwords were hashed using MD5 into the database, so the user table records looks more or less like this:
user Password
user1 827ccb0eea8a706c4c34a16891f84e7b
user2 e10adc3949ba59abbe56e057f20f883e
And so ... | stackexchange/codereview |
Can anyone explain how I can use
$_SERVER['REQUEST_URI']
How can I make it required like: In order to access this page, you have to come from THIS page (both are internal)?
I thought $_SERVER can do this for me, and found the example above in php.net. How can I make use from it?
Thanks
| stackexchange/codereview |
I've got a bit of a problem. I wanted to use scala.concurrent.ops.replicate to parallelize my program. But I found out, that the algorithm actually becomes much slower.
So I wrote a little test and still got the same result. So here they are.
Serial Code: Takes about 63 seconds to finish
object SerTest {
def main(arg... | stackexchange/codereview |
I have a peculiar situation. I have tables that are constantly accessed by different parts of our code and thousands of clients and so we employed the use of transactions when doing simple updates and inserts on our tables. Problem is we keep getting deadlock errors. Anyone have any idea how I can alleviate this proble... | stackexchange/codereview |
I have the following regex:
my $scores_compiled_regex = qr{^0
\s+
(\p{Alpha}+\d*)
\s+
(\d+
\s*
\p{Alpha}*)
... | stackexchange/codereview |
Is there a way to get the value of the name attribute in the form tag? I'm using PHP and don't see it in $_POST.
| stackexchange/codereview |
Why is this line not working?
<input type="checkbox" checked="no"/>
<input type="checkbox" checked="false"/>
Even though i have specified no and false in checkbox value both are checked by default.
Thanks in advance :)
| stackexchange/codereview |
How can I send a file in django to a different server without user being redirected to the server ? So all goes to rewriting this simple php function in django :
$filename = 'C:/tmp/myphoto.jpg';
$handler = 'http://www.example.com/upload.php';
$field = 'image';
$res = send_file($filename, $handler, $field);
if ($r... | stackexchange/codereview |
I am getting the following error when using the hsin function:
org.apache.lucene.queryParser.ParseException: Cannot parse '(: AND val:"recip(hsin(12.9365,77.5447,lat,long,3963.205,true), 1, 1, 0)")': Unknown function hsin in FunctionQuery('recip(hsin(12.9365,77.5447,lat,long,3963.205,true), 1, 1, 0)', pos=11)
Has anyon... | stackexchange/codereview |
I'm writing a function that removes the consecutive items with duplicate data .
e.g
For example, passing in the list
->a->b->c->c->a->b->b->b->a->null
should result in
->a->b->c->a->b->a->null
The list item definition and function declaration are given below
struct litem {
char data;
litem* next;
};
Mo co... | stackexchange/codereview |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.