instruction_seed stringlengths 1 35.8k | _source stringclasses 1
value |
|---|---|
I am writing an app for android that requires tabs and I have the content from my list rolling over my tabs. I know it must be something simple, but I cannot find it.
Here is my main.xml
<?xml version="1.0" encoding="utf-8"?>
<TabHost android:layout_width="fill_parent"
android:layout_height="fill_parent" android... | stackexchange/codereview |
I'm trying to build a custom dropdownlist which show/hide a second set of dropdowns based on it's selection.
I was wondering if anyone here might be able to help with a solution to this.
var i = 0;
$(document).ready(function() {
var bindClickToToggle = function(element) {
element.click(function() {
$(this... | stackexchange/codereview |
I have a xml web service like:
[WebService(Description = "The Calculator Web Service",
Name = "CalculatorWebService")]
[WebServiceBinding(ConformsTo = WsiProfiles.None, EmitConformanceClaims = false)]
public class Service : System.Web.Services.WebService
{
[WebMethod(Description = ... | stackexchange/codereview |
I have been using Mercurial for a while in my Java project. I work in a two man team. When I do merges, I find that file renaming has not caused many problems, but package renaming has caused major issues. Is this a known problem? Is there anything I can do?
| stackexchange/codereview |
See this general question. I am interested in the same question, but specifically for mysql.
| stackexchange/codereview |
I have entity objects that are synchronized with a database. I commonly use these entities in three different comparisons:
Check if two entity objects are the same CLR object.
Check if all properties of two entity objects are equal.
Check if two entity objects refer to the same database entity, even if some properties... | stackexchange/codereview |
I've recently come to appreciate the copy-and-swap idiom, and have been using it to implement copy-assignment for any class which manages a resource. So it got me thinking about Standard Library types: does the standard guarantee exception-safe behavior?
For example, consider a class that contains one std::string data... | stackexchange/codereview |
I have an aspx page with a simple form to send emails to pre-defined lists of users. On the longer lists the page usually times out before the emails finish sending but this has never been an issue.
Today something weird happened and each user got four emails. In the log I could see three new threads crank up one at a... | stackexchange/codereview |
Right now I have an app that loads a webview and all the clicks are kept within the app. What I would like to do is when a certain link, for example, http://www.google.com is clicked within the app it opens the default browser. If anyone has some ideas please let me know!
| stackexchange/codereview |
I am trying to Merge cells in WPF toolkit datagrid .I am trying to do something as shown in the image below.We can do this in Winforms datagrid.But how to do this using WPF toolkit datagrid ?.Or is there any alternative controls..?
Can we do this using listview or listbox..?
Or is there any free controls available w... | stackexchange/codereview |
/* Program to multiply two polynomials. */
/#include <stdio.h>
#include <conio.h>
#define MAX 10
struct term
{
int coeff ;
int exp ;
} ;
struct poly
{
struct term t [10] ;
int noofterms ;
} ;
void initpoly ( struct poly *) ;
void polyappend ( struct poly *, int, int ) ;
struct poly polyadd ( struct poly, struc... | stackexchange/codereview |
I'm trying to convert a .cer cert to a .p12 one using opensll.
this is the command that I'm using
C:\OpenSSL-Win32\bin>openssl x509 -inform der -in developer_identity.cer -out de
veloper_identity.pem
I'm conitunally getting an error and I don't know what it means. How can I figure out how to fix it.
2104:error:0200100... | stackexchange/codereview |
I am programming with winapi. How do I wait for a message for a defined time?
If there is no message, I can do another task. I can not use Sleep, because the window callback procedure will be delayed.
while (true){
...//wait a message for 30 miliseconds
GetMessage(&message, hwnd, 0, 0) ) or PeekMessage(&message... | stackexchange/codereview |
I am writing my unit test cases for a Java project using Scala (JUnit 4). I am running the tests using Maven.
I have written a src/test/scala/com.xxx.BaseTest class for the tests to provide some common functionality (@BeforeClass, etc.), but no actual @Test cases.
Whenever I run the tests using mvn on the command line,... | stackexchange/codereview |
Im in the middle of a college project and Im new to iphone development by 3 weeks and I want my app to have a UIPageControl full with a deck of cards and the user selects a card and it is placed to a designated area on the screen. It would be similar to the National Lottery app the way the all the balls in the UiPageCo... | stackexchange/codereview |
I would like to use a PHP script to find the router that a user is connected to my site from. Is this possible with PHP or some other Server-Side language?
I have looked online and it looks like its not possible to get if for the user's computer, but for the router?
EDIT: I am only interested in the user's router, no... | stackexchange/codereview |
I have a scenario in which I would like to interact with Linq-to-Sql managed data (VS2008/.NET Framework 3.5/Sql Server 2005 Express) that has been updated, but not yet committed back to the database with 'SubmitChanges()'.
I have given a simple test case below in which I'm changing a color property on a simple 'Block'... | stackexchange/codereview |
Simple question.. just can't get the result set in the order I need :p
I have a table "categories"
id | name | parent
1 apple 0
2 macintosh 1
3 atari 0
4 st 3
5 lisa 1
I'm trying to select get the following result set:
1 apple 0
5 lisa 1
2 ... | stackexchange/codereview |
I'd like to implement an eclipse plugin to add an shell script as an external tool builder to a project. After the plugin menu is pressed, the eclipse configuration file .project would add as following. And another configuration file .externalToolBuilders/lstest [Builder].launch would be generated.
<buildCommand>
... | stackexchange/codereview |
Is it possible to get different result in different browsers with some math operation?
E.g. something like that
if(vote!=0)total_reiting = Math.round((full_reiting/vote)*100)/100;
var star_widht = full_reiting*17/vote;
$('#raiting_votes').width(star_widht);
$('#raiting_info b').append(total_reiting);
Mb its bettter to ... | stackexchange/codereview |
I heard that the widgets should be allocated on the heap (using new), and then there are no needs to delete them (it is done automatically).
Can someone explain why?
What happens if a widget is not allocated that way, but on a stack?
I am not sure if it matters, but all widgets I am creating have a parent.
This says ... | stackexchange/codereview |
My RTF File contains a text in the beginning like below:
{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fcharset0 Trebuchet MS;}{\f1\fswiss\fprq2\fcharset0 Verdana;}{\f2\fnil\fcharset0 Tahoma;}{\f3\fnil\fcharset0 Arial;}{\f4\froman\fprq2\fcharset0 Times New Roman;}}
How can i Read the RTF File and replace ... | stackexchange/codereview |
Can't move virtual machine to another PC, have copied turnkey-core-2009.10-2-hardy-x86.vmdk to folder .VirtualBox -> HardDisks.
Created new machine, pointed to copied file.
Started created machine and it drops this error after a while(5 mins)
http://img547.imageshack.us/img547/8650/box0.jpg
As i understand, there is so... | stackexchange/codereview |
The following C# code:
using System;
namespace TrimTest {
class Program {
static void Main(string[] args) {
Console.WriteLine(Environment.CommandLine);
Console.WriteLine(Environment.CommandLine.Trim('"'));
Console.ReadKey(false);
}
}
}
produces the following ... | stackexchange/codereview |
I'm currently in the process of developing my own little threading library, mainly for learning purposes, and am at the part of the message queue which will involve a lot of synchronisation in various places. Previously I've mainly used locks, mutexes and condition variables a bit which all are variations of the same t... | stackexchange/codereview |
I have Excel Cell Address like A1,A2. So, how to access this cell programatically using poi3.6
another way is
row=mySheet.getRow();
cell=row.getCell();
But i have the address in the format of A1 ... so, how do I access those cell programatically
| stackexchange/codereview |
I am implementing a standard that gives four colors in RGB format.
1). Foreground-color
2). Color-1
3). background-color
4). Color-2
and it standard says that I need to create one single grayscale-color with these four colors, I am not able to get what does this mean? I mean how to mix them. has anybody worked on som... | stackexchange/codereview |
You may read the complete structure of my solution here, but here's the quick reference:
I made a class Account.cs in the Entities class library.
I made a class library Core with a class AccountController.cs which gets the
accounts from the Sql Server tables.
I made a class AccountWindowController.cs in the Gui.Wpf... | stackexchange/codereview |
I'm looking for a simple script that rotate currencies with a 1 second interval on all spans with a class = value.
<script type="text/javascript">
$(document).ready(function () {
var str1 = "£";
var str2 = "€";
var str3 = "$";
$("span.value").text(str1); //how can I rotate between... | stackexchange/codereview |
When I am compiling my program
I am getting this error
undefined reference to `std::__default_alloc_template<true, 0>::deallocate(void*, unsigned int)'
It feels that it is not albe to find reference in the standard libraries or something.
Is it some kind of lib conflict.
Basically I am trying to port piece of code wh... | stackexchange/codereview |
Im trying to get the @Profiled annotation to time (and log) method calls using Perf4j in my eclipse project. This uses aspectj. Ive managed easily to get it to work in the Windows command line with javac using the Perf4j Developers Guide. However the log files aren't created when I run the same code in an eclipse pr... | stackexchange/codereview |
I am using the pjproject1.6 and I could send the sip packets through the sip packets to the proxy server and the rtp packets or not pass through the server. Hence the voice could not be heard on both sides.
I have checked in proxy server, rtp proxy is running and when proxy server sends 200 Ok, the SDP packets from PJS... | stackexchange/codereview |
When I compile an Android project within Eclipse, it doesn't generate any Ant scripts or anything, so I assume it's using the Eclipse compiler to generate the .class files, and using dx to translate those into .dex. So that's fine, and I'm aware that the Eclipse compiler is different from javac and can't be changed.
B... | stackexchange/codereview |
Now I am totally confused by this error message: Android library projects cannot be launched.
I carefully checked the build path and library, everything seems "OK", and there is no error on Problems view, however, when I tried to run my application as an Android project, it failed and showed that message.
Any explanat... | stackexchange/codereview |
I'm using this code to delete a row in a table, but it's not working.
Do I make a mistake or miss out something?
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using Npgsql;
namespace WindowsFormsAppli... | stackexchange/codereview |
I want to connect a help file(.chm) to my windows application.
How do I can do this?
Thanks.
| stackexchange/codereview |
I have a strange problem by initiating a class object.
The problem is as strange as well not easily reproducible. However I will try to give an indicating example.
I have inheritance classes.
class BarClass {
public:
BarClass() {
...
}
BarClass(int i, int j) {
...
}
void doSomething() { ... }... | stackexchange/codereview |
Wikipedia says that PowerShell 2.0 was distributed with Windows 7; so as I use Windows 7, I'm obviously using that version.
But that raises two questions:
Why is PowerShell's folder C:\Windows\System32\WindowsPowerShell\v1.0 with that trailing v1.0 when it actually should be v2.0?
Why is the PowerShell script extensio... | stackexchange/codereview |
I'm attempting to create a gallery in Ruby on Rails using paperclip to upload the images. I have the models set up, where Gallery can have many images and each image can belong to only one gallery.
How do I go about making the appropriate forms? Are the images a nested fields_for, and if so, is it possible to add mult... | stackexchange/codereview |
I have to generate the following layout for a web site with all elements sized by their content. I can not set the width of any element - maybe of the outermost container (0) if there is no other way.
The outermost container (0) is sized by other parts of the page layout. It contains several items (1) with equal struct... | stackexchange/codereview |
As the complexity of the web projects that I am working on increases, the need to include a MVC structure is becoming more urgent. My model classes are well defined, but view and controller code tends to get munged together. I've been using pretty heavy AJAX on the site also (RichFaces jsFunctions mostly) which makes... | stackexchange/codereview |
I have just moved my host to another machine but now a problem has occured. I get different mysql results from php. To be more spefecific, php returns the last result when i got back-up. I am checking database via mysql console but there are new entries. But php continues to return the old results. What do i need to do... | stackexchange/codereview |
assume following data:
Data:
id | date | name | grade
--------+---------------+-----------+---------------
1 | 2010/12/03 | Mike | 12
2 | 2010/12/04 | Jenny | 12
3 | 2010/12/04 | Ronald | 15
4 | 2010/12/03 | Yeni | 11
i want to know who ... | stackexchange/codereview |
Some of the functions I am planning for a new site of mine are already available as free Perl modules. Hence I am looking at the possibility of using them, rather than coding them again in PHP. I was planning to use exec or system function to call the perl script, which will be slow. But I came across a pecl extension ... | stackexchange/codereview |
Given a list of N coins, their values (V1, V2, ... , VN), and the total sum S. Find the minimum number of coins the sum of which is S (we can use as many coins of one type as we want), or report that it's not possible to select coins in such a way that they sum up to S.
I try to understand dynamic programming, haven't... | stackexchange/codereview |
header: "Root",
sortable: true,
renderer: cat_id1,
dataIndex: 'parent_id',
width: 90,
editor: new Ext.form.ComboBox({
typeAhead: true,
triggerAction: 'all',
transform:'cat_id1',
lazyRender:true,
listClass: 'x-combo-list-small'
})
can I make the value of "renderer:" and "trans... | stackexchange/codereview |
I have a text box in html form like this
'< input id="yourinput" type="text" >'
Once user enters text in it and moves out i want to make the border to 1 px (so that it does not look like a normal text field). I achieve this by
$("#searchforstatus").css("border", "1px");
Now, when the user comes back to the text... | stackexchange/codereview |
I'm trying to compile samtools on a Solaris server where I do not have root. Samtools depends on zlib. The system zlib on this machine is not compiled with large file support, so compiling samtools against this version has the expected effect: samtools only handle small files. I need it to be able to handle large files... | stackexchange/codereview |
I'm writing a PHP script and I'm at this point where I need to know if a string consists of one character that's just repeated. The character is even a specific one: it's z.
For example, I want to match "z", "zzz" or "zzzzzzzzz" but not "zaz" or "aaa".
This is probably a simple regex question, but I have no idea how to... | stackexchange/codereview |
Creating a datagrid and dataprovider, if the dataprovider contains 2 of the same value ({"A","A","B"}), when you hover over any of the rows containing "A" all rows containing "A" will also get highlighted.
Anyone else notice this issue?
| stackexchange/codereview |
I currently have it setup like below. I had tried checking 'Perform Runtime Contract Checking' and then selecting 'None' but that seems unnecessary. If I have my project setup like below are code contracts completely disabled?
| stackexchange/codereview |
I am trying to implement a menu item in my application.The code is here for BaseScreen Class
package com.kcrw.ui;
import net.rim.device.api.ui.Field;
import net.rim.device.api.ui.Graphics;
import net.rim.device.api.ui.Keypad;
import net.rim.device.api.ui.Manager;
import net.rim.device.api.ui.MenuItem;
import net.rim.... | stackexchange/codereview |
Here's a quick one.
I'm starting out with using hooks in in Windows, and I notice that there's a hook type called a "CBT" hook. Though I know how it's used from the documentation, what does CBT stand for, exactly? I'm having a bit of trouble finding that in the docs...
| stackexchange/codereview |
I was wondering what people are using for generating breadcrumbs in drupal. I've seen various modules and was wondering which ones people have had success with.
Thanks for any thoughts.
| stackexchange/codereview |
I'm looking for RTF libraries capable of editing and formatting text programatically. DOM styled document parsers and editors really will make things easy. Found two generally discussed parsers, but they don't fit my requirements:
http://www.sgoliver.net/blog/?page_id=57 - the DOM is not implemented fully to abstract v... | stackexchange/codereview |
When I run my page on IE8 I got the following error. While it is running fine on Firefox and Chrome.
I used the following line to include js.
<SCRIPT type="text/javascript" LANGUAGE="javascript" src="http://localhost/audit.js"></script>
Could you tell me where I'm making a mistake? So that that error is coming on IE8 ... | stackexchange/codereview |
I was following this thread in order to learn gtk but I cant seem to get it to compile.
I've downloaded the GTK all in one bundle and extracted it to c:\gtk (have also set bin as a path variable), but when I try gcc foo.c %VAR% it says gcc: %VAR%: No such file or directory, what am I missig here?.
this is my VAR.bat fi... | stackexchange/codereview |
I have three tables/models. User, Alliance and Alliance_Membership. The latter is a join table describing the :Alliance has_many :Users through :Alliance_Membership relationship. (:user has one :alliance)
Everything works ok, but Alliance_Membership now has an extra field called 'rank'. I was thinking of the best way t... | stackexchange/codereview |
I work for a college and I'm trying to make an app that will show information to alumni about other Facebook users who have also graduated from this school. It's intended as a tool to help alumni connect with each other.
The problem is, as far as I am aware, none of this information is public. So, unless you're already... | stackexchange/codereview |
I need to display a list of categories from a ListActivity. My data source is a ArrayList of type Category which is implementing the android Parcelable interface. stucture is given at the bottom. it has an id and a title
I need title to be displayed as list text and on clicking the list item, i need to get the id for ... | stackexchange/codereview |
I'm currently writing a batch script to read from and modify some configuration files in Windows. Thankfully, I have access to said, and as such I can use that for most of what I have to do, albeit with some quirks due to the environment.
The statement I'd like to execute is:
sed '/\[$/{:loop N /^^]/!b loop} s/\n//g'
... | stackexchange/codereview |
Razor inserts extra space between text blocks. I want to render a list this way: "1, 2, 3" but get "1 , 2 , 3".
@for (int i = 1; i < 3; i++)
{
<text>@i</text>
if (i != 2)
{
<text>, </text>
}
}
Are there any ways to remove this extra space?
| stackexchange/codereview |
The following code is in the tableView didSelectRowAtIndexPath if the release is uncommented i get the error:
ComicDetailsViewController * comicDetailsViewController = [[ComicDetailsViewController alloc] initWithNibName:@"ComicDetailsViewController" bundle:nil];
comicDetailsViewController.comic = (Comic *)[array... | stackexchange/codereview |
I have an application which is a launcher for another application (my main one). The launcher goes to an FTP server, downloads updates and installs them. However, the update executable needs to copy some DLLs and EXEs to the installation directory of the main application, which is in Program Files. Because of that, I c... | stackexchange/codereview |
In my mind, the following script should work:
$stmt = $db->prepare("UPDATE table SET status = ?, date_modified = ?");
$stmt->execute(array(1, 'NOW()'));
but when passing NOW() into the prepared statement, nothing happens. Replacing NOW() with an actual date (i.e. 2010-11-23) works just fine.
I am unable to find explan... | stackexchange/codereview |
Having read in [1]:
"The persistent database connection requirement limits SNAPSHOT isolation scalability so it shouldn’t be used as a general means of implementing optimistic concurrency"
I'd like to understand:
What is persistent connection in ADO.NET?
I simply do not remember that, while programming .NET apps,... | stackexchange/codereview |
What happens to android application and activities and services that belongs to application when the phone/AP goes to sleep mode?Will the framework destroy Activities and Services and OS kills the process?
| stackexchange/codereview |
I am creating a SOAP request to MMSC for posting DRM content (.dm file which is a 3gp video).
I am using Saaj API for the same.
The MMSC to which I sending the request to says that they need the SOAP request in the following format as its a 3gpp standards for submitting the SOAP request for a VASP.
POST / HTTP/1.1
Co... | stackexchange/codereview |
I have just started with android ...
I have to develop an android application which should sync with data on webserver..
User adds some data using website, then data should be pulled and synced with data on android device...
I am not sure how to implement this...
Also I have to show map path only between two points (sr... | stackexchange/codereview |
We are using ASP.NET 1.1 for a website development, using DataGrid control for showing data.
Can some body suggest how can i insert rows in between two rows in datagrid control.
Thanks,
-Narendra
| stackexchange/codereview |
I just installed the RGtk2 package on a new machine and gladexmlnew seems to be missing (i.e. I get a could not find function gladexmlnew error after loading the RGtk2 package).
I have libglade, libglade2 and corresponding -devel packages installed.
What am I missing? The help file doesn't seem to help.
SOLUTION: I se... | stackexchange/codereview |
I want specific messages generated from within the same class to be logged separately. So, how can I create 2 different types of loggers within the same class. Currently, the Properties file looks like
log4j.rootCategory=DEBUG, O
# Stdout
log4j.appender.O=org.apache.log4j.ConsoleAppender
log4j.appender.O.layout=org.ap... | stackexchange/codereview |
I've been looking into MVVM lately, and after I discovered Caliburn.Micro things have been pretty swell; I'm still in the early learning stages, but I belive I have an OK feel for the MVVM basics.
I'm bumping into issues with WPF DataGrid, though - and it's pretty much the same issues that I had with WinForms DataGridV... | stackexchange/codereview |
I get the below log message from sql loader. Is this message "Rows not loaded because all WHEN clauses were failed." a really error?
At the end i have a log message saying total records read as 74256. In the ctl control file i see the 38-39 character for record type in each line
and based on it i will insert into dif... | stackexchange/codereview |
I have an exception class as follows:
#include <exception>
struct InvalidPathException : public std::exception
{
explicit InvalidPathException() {}
const char* what() const;
};
const char*
InvalidPathException::what() const {
return "Path is not valid";
}
When compiling under GCC 4.4 with -Wall -std=c++0x
... | stackexchange/codereview |
I'm building an asp.net MVC 2 application that has a ping page to let another system know if the application is up and running. I believe this is also used to keep the load balancer aware of active nodes. Here's what I have in my controller's action.
public ActionResult PingApp()
{
// If w... | stackexchange/codereview |
I have these radio buttons and they need android:width="X" and android:height"X" however, I do not know how to set these properties so that they adapt to a different screen size.
Here is the code I'm using for my buttons:
<RadioGroup android:layout_width="fill_parent"
android:layout_height="50px" android:or... | stackexchange/codereview |
Is there any official standard for HTTP Streaming?
IIS Smooth Streaming refers to a technical overview document here:
http://learn.iis.net/page.aspx/626/smooth-streaming-technical-overview/
Apples has a proposal for HTTP Live Streaming here:
https://datatracker.ietf.org/doc/html/draft-pantos-http-live-streaming-01
but ... | stackexchange/codereview |
I want to identify the URLs/https in my textview and display it in some other color. Also when Click on that it should open in Safari. How can I do that ? Any Sample Application Code available ? I do not want to include Three20.
| stackexchange/codereview |
I installer ruby-debugger but even after that , when I try to start the rails server with "--debugger" option I get a console error saying that ruby-debugger is not installed see the logs below :-
:~/work_space/rails_apps/Bidding_sys_remaining$ sudo gem install ruby-debug <<<<<<<
Building native extensions. This... | stackexchange/codereview |
While running a PHP script that imports large data into mysql, I encountered the following error:
memory exhausted near ''$GPGGA','130735.000','60.15751','N','24.74303','E','1','05','1.6','8.7','M','35' at line 1
I have before now, assigned a memory limit of 256M in my PHP INI file. This memory has so far been suffi... | stackexchange/codereview |
I can't seem to get a :remote form with multiple submit controls to work under Rails 3. The following code:
<%= form_tag({:action => 'debug'}, {:remote => true}) do %>
<%= submit_tag "Foo" %>
<%= submit_tag "Bar" %>
<% end %>
Produces a form with two buttons, but the resulting AJAX POST doesn't contain a commit pa... | stackexchange/codereview |
Is there any way to use assembly language inside Qt projects?
| stackexchange/codereview |
Based on my previous post, I came up with the following code. I'm sure there is a better way of doing it. I'm wondering, what would that be?
It does split the string if greater than max chars OR if @ is found. Any ideas would be appreciated!
#define _GNU_SOURCE
#include <stdio.h>
#include <stdlib.h>
#include <string.h... | stackexchange/codereview |
i have a variable on my "SharedPreferences", that is accesed by two different threads, one in a service, and one in a activity.
There is a easy way to protect this variable to be accesed by two threads at once?
i need to protect this code:
configEditor.putString("mylatitude", ""+currentLocation.getLatitude(... | stackexchange/codereview |
In my C/C++ program I need to check if the file from what I read have been overwrote (its inode was changed or some new lines were added). If I'm now wrong fstat and fstat64 can be usefull only when I use Linux but not for windows. Is there any universal (to work for complex OSes) way to do this? And also can you tell ... | stackexchange/codereview |
I am using c#.
I am trying to select the listbox values from the data coming in querystring. Below is code.
if (!string.IsNullOrEmpty(Security.GetString(Page.Request.Params["VT"])))
{
string[] strCntVisit = Security.GetString(Page.Request.Params["VT"]).Split(',');
foreach (s... | stackexchange/codereview |
I'm not a fulltime nor professional developer. So i make app for my own or for my friends. I dont want to register my app.
Recently twitter has stopped basic auth and now twitter requires us to do Oauth :(
What about with facebook? Is it possible to do basic auth? what about friendster too?
| stackexchange/codereview |
I try to convert SVG to PNG. Result picture has a white background I need transparent.
Sample of code:
wand = NewMagickWand()
MagickReadImage(wand,tmp_file_name)
transparentColor = NewPixelWand()
PixelSetMagickColor(transparentColor, 'none')
MagickSetBackgroundColor(wand, transparentColor)
MagickWriteImage(wand,new_fil... | stackexchange/codereview |
At the start of the development I faced with problem called "an impedance mismatch between domain model and the view". To solve this problem I decide to use ViewModel pattern - for every view (that is strongly typed) we create viewmodel class. But where is the validation logic is locate - in viewmodel classes or in our... | stackexchange/codereview |
Each of my posts has a meta_key which is an array with user IDs. Is there a way of displaying only posts whose array meta_key contains a specific user ID?
I haven't find any way of applying such a filter in the query, and if I skip posts inside the loop, the function doesn't show enough posts.
| stackexchange/codereview |
I'm writing a Batch script to compile a list of files as a string ("file1.txt file2.txt filr3.txt..."). I'm doing this since I want to run an application that requires to pass in a list of files to process.
All the files are in the same folder.
When I run the following code:
FOR /f "tokens=*" %%M IN ('dir * /b') DO (
... | stackexchange/codereview |
How to create tab menu in wxpython??
| stackexchange/codereview |
This is what I'm doing:
$ wget wget --no-check-certificate --quiet \
https://repository.jboss.org/nexus/content/groups/public/com/sun/jersey/jersey-server/1.4/jersey-server-1.4.jar
$ tar tf jersey-server-1.4.jar
META-INF/MANIFEST.MF
META-INF/
tar: Bad ZIP file: Unexpected end-of-entry record
tar: Error exit delayed fro... | stackexchange/codereview |
I'm learning C and doing the exercise of the function chapter. So i have written a small programm with 3 files and two small functions. Sincerly it does not work. I have no errors, the functions are simply not executed and i don't know why.
First of all this is my headerfile which only declares my functions.
//employ... | stackexchange/codereview |
My server is in Los Angeles but I want my CURRENT_TIMESTAMP to be GMT. Can I set this automatically or should I send the GMT value to the insert or update statement?
| stackexchange/codereview |
I have created a ListView made up from 2 columns: "File Name" and "Size (MB)". This ListView is contained in a Grid. Since file names are likely to be longer than file sizes, I want to allot as much width as possible for the 'file name' column without damaging the 'size' column.
In other words, I want the 'size' column... | stackexchange/codereview |
We are in the process of refactoring an ASP.NET WebForms application to ASP.NET MVC (3). We defined our mappings in the usual ClassName.hbm.xml format. But now we find that this seems a little redundant with the attributes you can specify on the class properties with MVC.
Is there a nice and clean way of telling NHiber... | stackexchange/codereview |
I have a little problem:
why does this code
somefile = open('foo.txt', 'w')
somefile.write('0B0B0B'.decode('hex'))
somefile.close()
write 0B0B0B in file, and this code
somefile = open('foo.txt', 'w')
somefile.write('0A0A0A'.decode('hex'))
somefile.close()
write 0D0A0D0A0D0A in file? Where does that '0D' come from?
| stackexchange/codereview |
Observe that the jQuery UI CSS does not pass validation.
I try to adhere to standards wherever I can find them. I'm looking at jQuery UI and wondering why a group of developers that makes a solid product doesn't seem to even acknowledge the W3C-imposed standards.
Is the W3C CSS Validator just too picky? Or should I pa... | stackexchange/codereview |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.