instruction_seed stringlengths 1 35.8k | _source stringclasses 1
value |
|---|---|
How can a check which is the actual view i can see on my iphone?
thank you!
| stackexchange/codereview |
I've written a little internal webapp that I use to import invoices from our jobcard database into MYOB. I've written it using Clojure and Compojure, and it actually works pretty well, and it was also a good learning exercise for me.
However, I've got a problem, it seems that after a successful invoice import the jett... | stackexchange/codereview |
i have 5 elements in my array
& in my html there are six div's
when the loop goes for sixth element and the corresponding element is not present in the array, then the div should be hidden otherwise it should be visible
The problem i am facing with my current code is that even sixth element is not there, it is showing ... | stackexchange/codereview |
I am trying to use the jQuery Countown plugin to let my users now how much time they have left for a certain task.
So I use the following code to start the countdown with 30 minutes.
<script type="text/javascript">
$(function () {
$('#defaultCountdown').countdown({until: '+30m'});
});
</script>
The problem is that th... | stackexchange/codereview |
How I can determinate width of some asp.net control, that was created dynamicly?
For example I have such code:
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
<encosia:HighslideManager ID="HighslideManager1" runat="server" FadeInOut="true"
OutlineType="RoundedWhite" ControlBar=... | stackexchange/codereview |
Is there a process manager or task viewer for android that shows how much CPU percentage each process or even each thread in a process takes up?
Thanks!
| stackexchange/codereview |
Every time I run this command rails server:
warning: Insecure world writable dir /usr/local/bin in PATH, mode 040777
I searched for a solution here and they said to type: chmod go-w /usr/local/bin
But I get this error:
chmod: Unable to change file mode on /usr/local/bin: Operation not permitted
I am using OS X b... | stackexchange/codereview |
Suppose I have an Comment model that belongs_to a Post model.
I want to make it so that creation of a new Comment instance (whether by new, create, find_or_create_by_x, etc.) will fail (preferably raise an exception) unless the Post is set immediately (either by passing it in as a parameter or by always referencing the... | stackexchange/codereview |
I want to test the compliance of Linux Ethernet and I2C drivers. Is there any open source tool or framework to test these drivers?
| stackexchange/codereview |
Is there a method in jQuery to select an element located at a particular position?
For example, can I select the element that is located at left:100 and top:300 in absolute position?
It would be nice if I could select an element located in a range of positions, for example, select the element that is located left: 100 ... | stackexchange/codereview |
Just a fictional code, but why this won't work? (as the date variable is nullable)
DateTime? date = textBoxDate.Text != "" ? textBoxDate.Text : null;
The error is "There is no explicit conversion between System.DateTime and <null>
| stackexchange/codereview |
Under Win32, it is a common technique to generate a monochrome bitmask from a bitmap for transparency use by doing the following:
SetBkColor(hdcSource, clrTransparency);
VERIFY(BitBlt(hdcMask, 0, 0, bm.bmWidth, bm.bmHeight, hdcSource, 0, 0, SRCCOPY));
This assumes that hdcSource is a memory DC holding the source image... | stackexchange/codereview |
I'm currently in a class on systems software development. We are writing the two-pass assembler for the assembly language of a fictional machine. We've implemented the tokenizer, and all of the classes that we need to abstractedly represent this program - all that is left (besides implementing the code generator in a l... | stackexchange/codereview |
Hey, Is it correct to initialize an NSData with a zip file? I want to convert a zip file into NSData and construct another file with the data (in simple language 'copy it'). I have the code as:
NSURL *theFileUrl = [NSURL URLWithString: @"file://localhost/Users/xxx/Desktop/testZippedFile.zip"];
NSData *data = [NSData d... | stackexchange/codereview |
I simply want a button with no background or anything other than plain text. I have done the following and the button does not show up at all:
<UserControl.Resources>
<ControlTemplate x:Key="linkButtons" TargetType="Button">
<TextBlock Foreground="White" FontSize="28" FontFamily="Verdana" Padding="10"></Tex... | stackexchange/codereview |
I am trying to load an XML file from res/raw folder in my Android project when the app first runs. I do this with this line:
InputStream xmlStream = getResources().openRawResource(R.raw.xmlfile);
I then want to use a SAX Parser to get data from the XML file. When doing this LogCat shows the following error:
Data excee... | stackexchange/codereview |
javascript: var d = document,
w = window,
e = w.getSelection,
k = d.getSelection,
x = d.selection,
s = (e ? e() : (k) ? k() : (x ? x.createRange().text : 0)),
f = 'http://www.tumblr.com/share',
l = d.location,
e = encodeURIComponent,
p = '?v=3&u=' + e(l.href) + '&t=' + e(d.title) + '... | stackexchange/codereview |
i have an array like this
[Cuisine] => Array
(
[0] => Array
(
[id] => 3
[name] => Arabian
[slug] =>
[CuisinesRestaurant] => Array
(
[id] => 194
... | stackexchange/codereview |
Anyone looked into this recently?
12 months ago i was using Uploadify
6 months ago i switched to Plupload which was the best i could find,
what are people's thoughts, is Plupload still the best uploader for multibrowser async image uploads?
I'm about to start a new site...
| stackexchange/codereview |
I need an advice w.r.t. one of the design approach we are considering.
We are implementing a Java web service provider which acts on data in relational database. Our propose classes are:
IDAO - interface with execute() method
GetCustomerDAO and UpdateCustomerDAO implements IDAO
DAOFactory - List of DAO to be reads... | stackexchange/codereview |
I have this code that changes the text of an NSTextField
[TextField setStringValue: [PrinterCard print]];
(PrinterCard print returns an NSString) What I want to do now is I want to append the PrinterCard print string to the text of TextField. I also want to do this on the next line, so I want basically to append this:... | stackexchange/codereview |
I read a few posts about best practices for strings and character encoding in C++, but I am struggling a bit with finding a general purpose approach that seems to me reasonably simple and correct. Could I ask for comments on the following? I'm inclined to use UTF-8 and UTF-32, and to define something like:
typedef st... | stackexchange/codereview |
I'm trying to use this python script to upload a file to the w3c validator.
~/Desktop/urllib2_file$ python test-upload.py -u http://validator.w3.org/ -f ../index.php -n uploaded_file -p Content-Type=text/html > ../results.html && firefox ../results.html
Any help will be greatly appreciated!
EDIT:
cyraxjoe pointed out ... | stackexchange/codereview |
I'm using the Graph API to implement a solution for me and, by this time, I'm able to post to my feed, like the posts, comment them, but I'm not able to like comments (none of them), I get the message: Uncaught OAuthException: (#100) the parameter url is required.
Can anyone help??
| stackexchange/codereview |
I have a config file like this.
[rects]
rect1=(2,2,10,10)
rect2=(12,8,2,10)
I need to loop through the values and convert them to tuples.
I then need to make a tuple of the tuples like
((2,2,10,10), (12,8,2,10))
| stackexchange/codereview |
I once saw that was possible to do something like adding a key in the web.config file to redirect to a default error page everytime a unhandled exception is found.
Is it possible? how?
| stackexchange/codereview |
Can anyone give me a sample xml of ARB Request Update?
I need to update the amount and the subscription name. Thanks.. :)
I already read the ARB XML guide but I am having problem with the syntax when updating an ARB.
| stackexchange/codereview |
If I'm not mistaken, I once stumbled across a product or something that let you make tutorials for your website using Javascript. Like, you could show the user directly how to do certain things with a virtual cursor, in-browser. Am I making this up, or is this a real thing?
Sorry if this question doesn't belong here (S... | stackexchange/codereview |
I have subclassed UIView so I can draw some lines in it. In this UIView are a whole bunch of buttons which I decided to create as a method that drawRect calls after the lines are drawn. It works but sometimes only part of the button renders. If i remove the button creation and instead add the UIButton in the subclassed... | stackexchange/codereview |
I have a model that represents an assembly that is made up of components, components may (in their own right) also be assemblies. It looks a little like this:
class Component < ActiveRecord::Base
belongs_to :assembly, :class_name => "Component", :foreign_key => :assembly_id
has_many :pieces, :class_name => "Compon... | stackexchange/codereview |
I have a doubt that came up to me just today. I've read Sass website and tried a bit of things and I think it's great. Very flexible and powerful. However it was kind of a hassle when using it in Windows because I had to install Ruby, run the sass watch command everytime so it added more steps to my development environ... | stackexchange/codereview |
I'm getting an error in compilation:
'incompatible types - found unit but expected unit'
Why is this?
This is when returning from a method, I can even parse the returning data into 'unit' and it works fine, why is this error occurring?
Does the fact that I am using an iterator within a collection I have made have any... | stackexchange/codereview |
How do i add an entry in a listbox in a window that is in another thread.
My Problem is, that i have to threads.
One working thread, that does all the actual work and one thread for a window where i want to display status information.
I tried to pass the form window as paramater in the constructor, but when i call it i... | stackexchange/codereview |
I have django and django's admin setup on my production box. This means that all file uploads are stored on the production box, all the media is stored there.
I have a separate server for files now ( different box, ip ). I want to upload my files there. What are the advantages and disadvantages of these methods I've th... | stackexchange/codereview |
Supposing I have two classes, Customer and Order, where one Customer can have one-or-many Orders associated to it.
class Customer
{
Order[] Orders;
}
class Order
{
int OrderId;
}
If for any given Customer, I want to find all the associated OrderId's, is there an easy way to do that using linq ? Something that giv... | stackexchange/codereview |
I am using the following script (that requires the cookies plugin for jquery) to allow javascript enabled users to change the font size on a medical charity website:
var sitefunctions = {
textresize: function () {
var $cookie_name = "TextSize";
var originalFontSize = $("html").css("font-size... | stackexchange/codereview |
the application is very large so giving a brief back ground and the problem
when the user logs in, a button is displayed having the text of the function he is allowed to call.
the function he is allowed is mapped in the database table
its made sure that the name of the actual function is same to the ones used in the db... | stackexchange/codereview |
Is there any plugin/gem or an easy way for accomplish a pagination functionality like Twitter?
This means, showing a "More" button that shows more posts (for example) below once it's clicked, using Ajax.
If there's any easy way for modifying something from will_paginate plugin, that would be useful too.
| stackexchange/codereview |
I'm writing a function and I want it to touch a file so that I can write to that file. If the file doesn't exist, I will get an error. How can I say that?
| stackexchange/codereview |
I got a generic repository - should the repository be able to throw exceptions or should I keep it dumb? If I chose to throw exceptions from it, should the service layer then catch it and throw an exception with a more friendly message before it goes to the Controller?
Pos1: Repository (Throw) => Service(Catch, Throw ... | stackexchange/codereview |
I have booted my system from a live Ubuntu CD, and I need to fix some package problems. I have mounted my hard drive, and now I want to run apt-get as if I booted normally. ie change the working directory for apt-get so it will work on my hard drive. I have done this before, but I can't remember the syntax. I think it ... | stackexchange/codereview |
This seems very verbose, particularly with long function names, is there a better way to do this in Python?
if someRandomFunction():
variable = someRandomFunction()
Edit: For more context variable is not already defined, and it will be a new node on a tree. I only want to create this node if someRandomFunction() r... | stackexchange/codereview |
Assume the following table:
ID | Item1 | Item2 | Item3 | Item4 | Item5
------------------------------------------
A | NULL | NULL | YES | YES | NULL
B | NULL | NULL | NULL | YES | NULL
C | NULL | NULL | NULL | NULL | NULL
I want to return the following data set:
ID | Count
------------
A | 2
B |... | stackexchange/codereview |
When the user navigates to a different view and returns back to the original view I would like everything to be reset as though they were coming to the view for the first time.
I was able to stop the audio from playing when they leave, but not an animation method.
how would I be able to do this?
-(void)viewWillDisappea... | stackexchange/codereview |
I don't know if I am using dependency properties right, but it seems my View never updates. I have a style trigger to change the styles of my elements. It seems the code runs, but the view is not updated. This is my 1st time using a Dependency Property & I maybe using it wrong
C#
public bool CanSave
{
get { return... | stackexchange/codereview |
I am looking to create a SOAP API using C# which I can then call using JavaScript. I use C# regularly but do not have any experience with creating API's. I would like to call the API using JavaScript as this will be used to submit form data from multiple websites not maintained by us.
If there is a better solution th... | stackexchange/codereview |
I an earlier thread I got some help to track down a deprecated .Net assembly reference and I was successfully able to port my project to build within Visual Studio 2010.
Is there any option to get this ReportViewer to work within Mono? Building the project with MonoDevelp 2.2.2 currently gives me similar errors:
Assemb... | stackexchange/codereview |
I'm playing around with a simple port of the Protovis API to Python.
Consider the simple bar chart example, in Javascript:
var vis = new pv.Panel()
.width(150)
.height(150);
vis.add(pv.Bar)
.data([1, 1.2, 1.7, 1.5, .7, .3])
.width(20)
.height(function(d) d * 80)
.bottom(0)
.left(function(... | stackexchange/codereview |
I am trying to use the SO API (eg: http://api.stackoverflow.com/1.0/users/3) to get some data:
<?php
$data = file_get_contents('http://api.stackoverflow.com/1.0/users/3');
echo $data;
?>
But the returned contents are garbled. I tested it on a couple different servers, including http://codepad.viper-7.com/9GFvsM. Is ... | stackexchange/codereview |
This is my coding can any one help:
<?php
class clsWSSEAuth {
private $Username;
private $Password;
private $Meruser;
private $Merpass;
function __construct($username, $password) {
$this->Username=$username;
$this->Password=$password;
... | stackexchange/codereview |
I develop app and I need to store and read ( read every 60 seconds, store rare ) data. What is the most easy way to achieve this? Does anybody have code sample to help me
?
| stackexchange/codereview |
I'm using EclipseLink in my J2SE project. I'm using mysql and JPA. I have a simple entity with primary key and String field. I can read from database using EntityManager#createQuery but when I try to persist or merge entity nothing is put in database and no exception are thrown. I can insert data manually without probl... | stackexchange/codereview |
I just realized that I don't have a answer to this question, when I'm talking some friends we can't find the best simple solution to do this.
Can I send a dynamically body, from a form with a prefixed subject? My question is about the most simple solution.
[]'s
| stackexchange/codereview |
I have a 3rd party function with signature:
int secretfoo(int numargs, ...);
I can call it directly, but what I really want is wrap it with my function that adds some extra arguments to it.
Assume simple case of integers: I want calls secretfoo(2, 10, 20) to be translated as this: when I see argument 10 to duplicate i... | stackexchange/codereview |
How can I kill or rollback, uncommitted transaction?
I am listing my active transactions with the following sql:
SELECT * FROM sys.dm_tran_session_transactions
My result is:
session_id transaction_id transaction_descriptor enlist_count is_user_transaction is_local is_enlisted is_bound
-------------------------... | stackexchange/codereview |
I have implemented LIKE button on my test page, I used all the og tags to say what it is all about
and the result on my profile page looks like :
Moshe likes title title on website
I don't want the "on website" part because it links back to the root of the server which is not related to me or my content.
I found no way... | stackexchange/codereview |
I just got my self a new laptop, it runs on windows 7 and i am in deliberation what dev environment to set up.
I have most of my life used wamp set up, on windows machines for local dev environments. Here i recently installed IIS and it looks very convenient to set up sites and so on and so forth.
So I am thinking of i... | stackexchange/codereview |
My Fitnesse test does some underlying stuff and populates a Map with the results. The map keys can vary dramatically depending on the test, so I'd like to something like the following:
|parseFile |getValue("RecordID")|getValue("StatusCode")| ...etc... |
|foo.txt | MyId | 93 | ... | stackexchange/codereview |
I am currently working on Spring MVC web app and trying to hook up validation using the @Valid annotation. When I fire up the application I'm getting the following exception:
javax.validation.ValidationException: Unable to find a default provider
I have Hibernate Validator 3.1.0.GA on the classpath as well as javax va... | stackexchange/codereview |
I know that the version string generated by Visual Studio is based on the date/time of when the build was run. Given the partial version string "3856.24352" generated by Visual Studio, how can I translate that to the calendar day on which that build took place?
| stackexchange/codereview |
after multiple days of banging my head against the wall and having sleepless nights I'm hoping to find some help here. I've gone through various posts here, but none of the answers seem to provide a resolution for me.
In short, my problem is that my App crashes after heavy usage (>10min) of the UIWebView (e.g. opening ... | stackexchange/codereview |
My UITableView, actually all my subview, when i rotate the UINavigationController that is their parent.
Any Ideas?
| stackexchange/codereview |
i really need a basic hibernate implementation calls oracle plsql function.
it must include configurations, dao and test class.
is there any example for that?
| stackexchange/codereview |
I have customized a canvas to support the zooming. I am doing this by scale transformation.
I have scroll viewer wrapped around canvas but scroll bars are not visible when canvas is zoomed.
I came to know that scale transformation does not changes the actual size of the UIElement that is why scroll bars are not visible... | stackexchange/codereview |
Is anyone know how to adding fixed gridlines chart in flex, for example: I have a vertical axis which has a minimum value 0 and the maximum value 100 but I only want to display gridlines on values 30 and 70.
So please me....
thx
| stackexchange/codereview |
I have used $_SERVER['HTTP_REFERER'] variable in my application (used PHP).
On Firefox above variables is wokring. But i observed that $_SERVER['HTTP_REFERER'] is not working on Microsoft Internet Explorer 8.
I also got to know that HTTP_REFERER variable doesnt work on MSIE8 and MSIE7.
Please give me your suggestions, ... | stackexchange/codereview |
I have a c# application and I want to fire off a webservice but I dont care about the response and I also dont care if it fails. At the moment i fire of the service async but i am getting an error when the call fails.
Is there anyway I can configure the app/webservice to stop it failing without rapping try catches arou... | stackexchange/codereview |
Given a number, this program computes the factorial, but it no long works with number bigger than 9
.section .data
.section .text
.globl _start
_start:
pushl $10
movl %eax, %ebx
call func
addl $4, %esp
movl %eax, %ebx
movl $1, %eax
int $0x80
.type func,@function
func:
pushl %ebp
movl %esp, %ebp
movl ... | stackexchange/codereview |
Are all PEP 8 rules still valid?
Are there any which are obsolete?
Isn't there a more explanatory cheat sheet that this one.
| stackexchange/codereview |
Can anyone help me understand why the following code does not display any content in the second alert? Browsing to the same url that I pass to getJSON() produces output in my browser window.
<!DOCTYPE html>
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.min.js"></script>
</head>
<body>
<script... | stackexchange/codereview |
How do I get my original query string appended to the end of the pager output? All I am getting now is this:
http://localhost:4988/Assets/Browse/1?page=2&Visible=false
I need all the various name/value pairs from my query string appended onto the next/previous links.
Also, what is “visible” used for in the above link?... | stackexchange/codereview |
Hey I'm trying to build a rails 3 app with Mongoid (for MongoDB).
What I'm now trying to do:
Languages:
id (automatically created, right?)
name (e.g. English)
code (e.g. en_US)
Languages_Texts:
id (see above...)
name (e.g. hello_world)
Translations:
id (see above...)
translation (e.g. Hello, world!)
I hope this datab... | stackexchange/codereview |
I am creating a website for classified using Wordpress. I was looking at hosting possibilities. I am a little worried about my choice, as with any classified website the big issue is with Storage of images and videos. Mainly, all sites are offering capped storage around 50Gb-100Gb. How do you usually go about this kind... | stackexchange/codereview |
Is there a Common Lisp function that will swap two elements in a list given their indices and return the modified list?
| stackexchange/codereview |
I have some code that binds an enumeration to a dropdown list, however, I'd like build the dropdown to take the integer value from the enum for the value and the description attribute for the text.
I tried defining the kvPairList as a int/string and casting enumValue and an (int)
I also tried converting.toInt32
Idea... | stackexchange/codereview |
I want to distribute executables along with my source. My source is all hosted tidily on GitHub. Is it possible to add executables and installers to my GitHub project page without adding them to my git repository?
Note, for some reason GitHub discontinued this feature. See Answer by Justin Dearing below.
| stackexchange/codereview |
i have a tweet table that stores tweets and its replies like this
tweet(id, parent_id, tweet_message, time)
where parent_id is a self id if its a tweet and is of parent id if its a reply. how to do a find to pull out tweets where id = parent_id
example:
tweet(1, 1, 'My name is Harsha', 'time') parent_id = id since ... | stackexchange/codereview |
I try to programmatically create a node of custom contenttype "location" in Drupal 6, with the node containing a location field (http://drupal.org/project/location) called "location" (yes I know, the nomenclature could be better, but I am just experimenting on this at the moment).
Creating the node works just fine, but... | stackexchange/codereview |
I have got a list of elements that im trying to delete using the .remove() from jQuery.It does delete the elements while viewing the page on the browser but I was wondering if its possible to delete the elements in its entirety from the page? So when i open the file in an editor later on, those elements shouldn't appea... | stackexchange/codereview |
How do "modern" cron daemons internally schedule their jobs? Some cronds used to schedule a run every so often via at. So after a crontab is written out, does crond:
Parse the crontab for all future events and the sleep for the intervals?
Poll an aggregated crontab database every minute to determine if the current t... | stackexchange/codereview |
I was wondering if when using the database library in Codeigniter there was a way to automatically escape all the inputs to prevent injection. I know I can use mysql_real_escape_string() to do it, but I wondered it this was already setup to do this automatically, if not are there any frameworks that have this included?... | stackexchange/codereview |
The questions says it all really.
I have a table and I want to insert a row if it doesn't already exist.
or should I just do an insert and if the key constraint is violated then ignore it?
| stackexchange/codereview |
I had only just noticed my programs using the string class were compiling without including the <string> header. It turns out that <iostream> includes <ios_base> which in turn includes <string>.
Is this bad practice and should I explicitly include <string>? Even if it's just a case of clarity?
Is it safe to assume this... | stackexchange/codereview |
I am using the jQuery Dialog in ASP.NET. I have it working fine with the exception of when I click the OK button in the dialog and if an error occurred I want to show the error in the label. By the time the dialog closing event is fired it is too late. How do I still show the dialog if an error has occurred. I don't wa... | stackexchange/codereview |
I need to generate a string using PHP, it need to be unique and need to be from 4 to 8 characters (the value of a variable).
I thought I can use crc32 hash but I can't decide how many characters, but sure it will be unique. In the other hand only create a "password generator" will generate duplicated string and checkin... | stackexchange/codereview |
I have a Python application that, to be brief, receives data from a remote server, processes it, responds to the server, and occasionally saves the processed data to disk. The problem I've encountered is that there is a lot of data to write, and the save process can take upwards of half a minute. This is apparently a b... | stackexchange/codereview |
I'm diving into Ruby on Rails and I'm trying to get a grasp on the available docs for the API. I'm trying to find out what the list of "options" are for the redirect_to method in the ActionView API. In the RoR API docs, it says...
redirect_to(options = {}, response_status = {})
but it doesn't list what the available... | stackexchange/codereview |
So here's what I'm doing -- I have a ruby script that prints out information every minute. I've also set up a proc for a trap so that when the user hits ctrl-c, the process aborts. The code looks something like this:
switch = true
Signal.trap("SIGINT") do
switch = false
end
lastTime = Time.now
while switch do
... | stackexchange/codereview |
Ok guys I'm little stacked here. According to official documentation Google says that "Once you've defined your Drawable in XML, save the file in the res/drawable/ directory of your project." is the way to add a XML drawable to the project.
But when I created the project ADT created 3 different drawable folders for mdp... | stackexchange/codereview |
There are plenty of tutorials and step by step guides out there on the internet, but they give mostly examples which you can run in the computer.
Is there a good separate set of problems that beginners can try to solve themselves. If existing solutions are available, even better.
Update
To put it more clearly, is there... | stackexchange/codereview |
I have a Win32 Edit window (i.e. CreateWindow with classname "EDIT").
Every time I add a line to the control I append '\r\n' (i.e new line).
However, when I call WM_GETTEXT to get the text of the EDIT window, it is always missing the last '\n'.
If I add 1 to the result of WM_GETTEXTLENGTH, it returns the correct charac... | stackexchange/codereview |
I am currently trying to implement some custom security in an ASP.NET MVC2 web application.
I am trying to do something really simple as my code below shows but for some reason if I use the [Authorize(Roles="Admins")] attribute on one of my controller actions, check the Context.User.IsInRole("Admins") or Page.User.IsIn... | stackexchange/codereview |
I was doing a comparison on speed for GIT and Mercurial.
I choose a big project of 9072 files (mainly php files and several images) with a size of 95.1 MB.
This is a fake project, and maybe give someone the idea on how to explaing the results I got - it is a wordpress download, unchanged, and copied 12 times inside two... | stackexchange/codereview |
I just read the Microsoft Surface Tutorial. There is the following C# sample:
private void OnCenterItems(object sender, RoutedEventArgs e)
{
var x = this.Photos.ActualWidth / 2;
var y = this.Photos.ActualHeight / 2;
FindChildren(this.Photos, d => d.GetType() == typeof(ScatterViewItem),
... | stackexchange/codereview |
I have a search tree that's defined as:
data (Ord a) => Stree a = Null | Fork (Stree a) a (Stree a) deriving Show
and I have to define two functions, mapStree:
mapStree :: (Ord b, Ord a) => (a -> b) -> Stree a -> Stree b
and foldStree:
foldStree :: (Ord a) => (b -> a -> b -> b) -> b -> Stree a -> b
I don't fully un... | stackexchange/codereview |
I'm using System.Xml to read a xml file in C#.
First I open the file (locally)... and use foreach to get the values, like this:
XmlNodeList titles = xmlDoc.GetElementsByTagName("title");
foreach (XmlNode title in titles)
{
rowNews = new ListViewItem();
rowNews.Text = (title.ChildNodes[0].Value);
listView1.Items.Add(row... | stackexchange/codereview |
Im doing an app which uses sqlite db file in assets folder, There is a screen in my app having a button 'check for update'.
Client has given me an URL link to update db file(which gives a sqlite file).
When user clicks on the button i need to upgrade the old db file with new db file from URL.
Please suggest me how i c... | stackexchange/codereview |
I have not been able to figure this out for the life of me. I wanted to show the order review step(final step before processing the order) right away on the one page checkout in Magento. Any suggestions? Thanks all.
| stackexchange/codereview |
Im using an Indexed View which is an entity without any relations (relations to my table entities would be preferable but this seemed to be nearly impossible to achieve). This view consists of 4 FK's which together form the PK:
PortalID
CategoryID
BranchID
CompanyID
Now im joining this view to select a set of companie... | stackexchange/codereview |
Here's what I want to do. It seems simple, but I can't get it to work. JSP1 - user fills out form, submits to JSP2. JSP2 populates the form values in a Bean and displays data, and offers user option to return and modify (history.back()), or submit to Servlet. I've come up with three different options, and each has prob... | stackexchange/codereview |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.