Is there a cleaner way to do the following, assuming that I have a reason to keep the data sets independent?:
x = {1, 2, 3};
y = {1, 4, 9};
ListPlot[Partition[Riffle[x, y], 2]]
Thanks!
I am writing a library to interface C# with the EPL2 printer language. One feature I would like to try to implement is printing images, the specification doc says
p1 = Width of graphic Width of graphic in bytes. Eight (8) dots = one (1) byte of data.
p2 = Length of graphic Length of graphic in dots (or print lines)
Data = Raw binary…
I am trying to get into the habit of writing a unit test before the actual class. What are some pointers the stack overflow community can give me along with any useful resources.
Thank You
When I call CaptureMouse() in response to a MouseDown from the middle mouse button, it will capture and then release the mouse.
Huh?
I've tried using Preview events, setting Handled=true, doesn't make a difference. Am I not understanding mouse capture in WPF?
Here's some minimal sample code that reproduces the problem.
// TestListBox.cs
using…
I'm trying to work through a problem where I'm mapping EF Entities to POCO which serve as DTO.
I have two tables within my database, say Products and Categories. A Product belongs to one category and one category may contain many Products. My EF entities are named efProduct and efCategory. Within each entity there is the proper Navigation…
I've got about 6 subdomains that have a "contact us" link and I'm sending all these links to a single form that uses "Contact Form 7". I add ?from=site-name to each of the links so that I can set a $referredFrom variable in the contact form.
The only two things I'm missing are (1) the ability to insert this referredFrom variable into the…
The XAML code below works fine except I want the expander button to be between the listbox and the grid. If I set the ExpandDirection="Left" the button is between the listbox and the grid but the direction indicator on the button is confusing to users - it point to the right when expanded and it points to the left when it is not expanded.…
We are trying to develop a company specific tracking software but not interested in Google or Piwik. Essentially we would have a JavaScript tracking code also. The data that it would capture, would that be best suited for traditional RDMS or can we get a NO SQL solution ?
Any thoughts or ideas welcome.
I'm looking into removing php files that are no longer used on my site. I can use something like get_included_files to show the included files, but that would mean I would have to put it on every child page. If I put it on a parent page, it won't show me the child page that called it.
Has anybody else run into a similar situation? If so,…
My boss wants to have data in MySQL DBs used for our website to be "linked and synced" with a Financial Server that has its DB in SQL Server. Sooooo...even though I have no idea how to accomplish this, this just sounds like an absolute nightmare especially since the MySQL DB is most likely going to be hosted in the cloud and not on a…
I have a WPF DataTemplate with two TextBlock controls (stacked) and then some other elements underneath. Due to some complicated layout code, I need to know the height of the two TextBlock elements so that I can draw some fancy connector lines, and line up other controls, etc.
If I know the text that's going into the TextBlocks,…
Hi,
I have an SQL database table, I want to find everything in a table where the 'Room' says 'DISPOSED', Insert 'DISPOSED' into the 'Status' field and then delete the entry in 'Room'.
Basically moving the entry from one field to another (if the 'Room' field has 'DISPOSED' in it)
Hope this makes sense.
Thanks for any help.
when using a lock does the thing you are locking on have to be a object. For example is this legal
static DateTime NextCleanup = DateTime.Now;
const TimeSpan CleanupInterval = new TimeSpan(1, 0, 0);
private static void DoCleanup()
{
lock ((object)NextCleanup)
{
if (NextCleanup <…
I've written a command line tool that preprocesses a number of files then compiles them using CodeDom. The tool writes a copyright notice and some progress text to the standard output, then writes any errors from the compilation step using the following format:
foreach (var err in results.Errors) {
// err is…
I'm stuck in a rut. I hope some one can help.
Basically, I am building an AJAX mobile web app with jQuery. I am able to parse a specific XML file just fine, but I want the option to parse other XML files based on the link they were clicked on and load them on the fly into the same DIV or UL.
So:
click on…
I had a bunch of code in an activity that displays a running graph of some external data. As the activity code was getting kind of cluttered, I decided to extract this code and create a GraphView class:
public class GraphView extends LinearLayout {
public GraphView(Context context, AttributeSet attrs)…
I have a few customers of my custom wordpress theme that are reporting that their sites have went down over the past few weeks due to a 500 internal server error. In each case, it appears that the htaccess file has been to blame.
In one case, the user's hosting company found a "_pvt/service.pwd" line in…
Good Afternoon,
I have created a WiX project that installs a bunch of different EXEs and DLLs. Unfortunatly when I build the project I receive the following warning for each one of them:
ICE60: The file fileName is not a
Font, and its version is not a
companion file reference. It should
have a…
I just picked up an old project and I'm not sure what the following error could mean.
g++ -o BufferedReader.o -c -g -Wall -std=c++0x -I/usr/include/xmms2 -Ijsoncpp/include/json/ -fopenmp -I/usr/include/ImageMagick -I/usr/include/xmms2 -I/usr/include/libvisual-0.4 -D_GNU_SOURCE=1 -D_REENTRANT…
With the current issues with Network Solutions sites being hacked, I'm in need of a tool (preferably freeware) that I can install into my site and it will email me the second a file change/update occurs.
Any recommendations welcome :)
This site is on a shared server hosting package.
Are the any MSBuild properties that Visual Studio sets? I'm looking to have some conditional behavior depending on the version (if any) of visual studio.
I have a live marketplace version of my application, and now want to start developing my next version, but want to be able to have the newer dev 'upgrade' (for testing) and existing live version (for demoing) both on the same device, but I dont want to create a whole separate project to do…
I've got an app that's working pretty flawlessly in Chrome and FF, however, when I view it in IE, all is well until I click on a header element to activate it (jQuery accordion).
What happens then is that I see a brief flash where the content is there, then suddenly the entire left column…
Can I use htaccess to capture requests from a certain subdirectory and make that directory use itself as the root directory for any root relative path requests? For example if I have...
http://www.example.com/subFIXED/subANY/restofpath
...where subFIXED is always the same directory,…
I have FFmpeg installed on my linux web server. When I execute the following code, I have intermittent results.
I think I have figured out that the MP3s do not compile when they have different bitrates.
exec ('cat '. $pair['source_file'] . ' ' . $pair['translated_word_file'] .…