instruction_seed
stringlengths
1
35.8k
_source
stringclasses
1 value
If I do the following in MATLAB: ppval(mkpp(1:2, [1 0 0 0]),1.5) ans = 0.12500 This should construct a polynomial f(x) = x^3 and evaluate it at x = 1.5. So why does it give me the result 1.5^3 = .125? Now, if I change the domain defined in the first argument to mkpp, I get this: > ppval(mkpp([1 1.5 2], [[1 0 0 0]; [1...
stackexchange/codereview
Why use binary semaphores when the same functionality can be achieved with a simple variable ?
stackexchange/codereview
I have a method which caches images from a remote URL and returns the cached image. If the image is already cached, it is simply returned - otherwise it goes to the remote URL and compresses the bitmap to the cache. My problem is that some photos(fetched from Flickr's web services), never successfully compress, and n...
stackexchange/codereview
I am hoping someone can help me come up with a pattern to get the time value from the following line of text: frame= 73 fps= 41 q=0.0 size= 136kB time=1.67 bitrate= 668.9kbits/s Ideally I'd like to be able to go preg_match($pattern, $line, $matches); $time = $matches[0]; I have been working on it for ages and c...
stackexchange/codereview
Direct Question: I've got a simple loop with, what can be, a computationally intensive function. Let's assume that each iteration takes the same amount of time (so load balancing should be easy). #pragma omp parallel { #pragma omp for schedule(dynamic) for ( int i=0; i < 30; i++ ) { MyExpensiveFunction(); } } ...
stackexchange/codereview
I have a System.Windows.Forms.WebBrowser control on my form, how can i load just pdf files into it? Can i determine it before loading it to the browser control?
stackexchange/codereview
just a quick question, i know this is usually done on a website but is it okay to add icon credits in the "about" screen of a mobile Application espercially for paid Apps like in Iphone or android. Has anybody seen this being done?. just wondering if it sounds professional. Thank you.
stackexchange/codereview
I'm used to this: class Db { _Commit(char *file, int line) { Log("Commit called from %s:%d", file, line); } }; #define Commit() _Commit(__FILE__, __LINE__) but the big problem is that I redefine the word Commit globally, and in a 400k lines application framework it's a problem. And I don't want to use a speci...
stackexchange/codereview
Ive got a asp.net mvc site that works with ASP.net Authentication. I have a UserInformation table which stores extra information on each user aswell. On pretty much every page i am calling to the database to pull the UserInformation record for the current user at least once. Im thinking all these repeated data calls fo...
stackexchange/codereview
on @:TEXT:*hello*:#:{ msg $chan test } If I have this right, this automatically will send the word 'test' when any channel admin says any sentence containing the word hello. Is this right? If not, how does this script need to be changed to do this? Has to respond only to a channel admin.
stackexchange/codereview
Let's say a person is working in a small team SCRUM environment. Several teams are working on different branches of the same code base. In our team we usually split up into pairs to work on code. Occasionally people need to take time off etc. and it would be advantageous to be able to merge person A's code into person ...
stackexchange/codereview
I'm trying to add elements to a Powershell variable with Add-Member. I have no problem adding static properties with NoteProperty, and methods with ScriptMethod, like that : $variable = New-Object PSObject $variable | Add-Member NoteProperty Key "Value" $variable | Add-Member ScriptMethod DoSomething { // code } Now I...
stackexchange/codereview
We have found a problem with our deployment to a production server that runs Sharepoint 2010 Publishing Site Collection. We are deploying WSP packaged from Visual Studio to Sharepoint Management Shell (Uninstall, reinstall solution). It has worked like a charm in the past. We added a custom masterpage, css files, image...
stackexchange/codereview
Here, I'll just post my code: int len = InternalList.size(); ListIterator<E> forward = InternalList.listIterator( 0 ); ListIterator<E> backward = InternalList.listIterator( len ); while( forward.hasNext() && backward.hasPrevious() ) { E next = forward.next(); E prev = backward.previ...
stackexchange/codereview
A year or so ago I decided to stop using the mailto tag because many times it is annoying to the user. It will bring up an email program that the user may not be using at the time, which may also take time to load and may not be what the user wanted to do when he/she clicked on what looked like a link. Instead I decide...
stackexchange/codereview
I have a factory class which i feel needs to be re factored, take the following example: public class FileFactory { public static FileType Create(string fileName) { if(IsImageFile(fileName)) { return new ImageFileType(); } else if(IsDocumentFile(fileName)) ...
stackexchange/codereview
What happens if i.e, in the IDT entry 0, I set the P (Present) bit to zero? That translate to not handling a possible zero division. Suppose the CPU does a zero division... what happens in this case?
stackexchange/codereview
I am trying to load xml file using XStream api with clojure. This process don't works and i don't know what's happening. I have a type defined in the namespace: (ns myapp.domain.foo) (defrecord Foo [value price]) And i have a function that import data from xml file using XStream. (ns myapp.xml.xml-reader (:import my...
stackexchange/codereview
As in how does weakhashmap understand that a reference to one of its key is obsolete now especially if the key is a String which is pooled?
stackexchange/codereview
I have a best practice question. I'm building a Windows forms application in C#/.NET 4.0 where "scans" will take place behind the scenes every X seconds and update a database. I'd like to a DataGridView refresh on a specified interval to reflect the data that is now represented in the database. I plan on doing this by ...
stackexchange/codereview
Let's say that certain actions need to retutn just xml or json and they shouldn't send the cookie stuff that's intended for browsers. AFAIK it's a use case for metal in Rails 3 but is it possible with 2.3? Except at the Rack level...
stackexchange/codereview
I don't want to use MBProgressHUD because of the overhead for threads and managing background asks. I don't need a background task handler. Just a simple, thread safe library that deals with views/windows should do the job. Also without creating an instance from different view controllers and adding/removing it, I thin...
stackexchange/codereview
class Food_Tag(models.Model): name = models.CharField(max_length=200) related_tags = models.ManyToManyField('self', blank=True, symmetrical=False, through='Tag_Relation') def __unicode__(self): return self.name class Tag_Relation(models.Model): source = models.ForeignKey(Food_Tag, related_name='s...
stackexchange/codereview
Is there a way to run some code on new objects? Something like this: $('.some_class').live('create', function() { $(this).append('something'); } So something will be appended to all elements with class some_class (existing and future ones).
stackexchange/codereview
I need a simple and fast way to compare two images for similarity. I.e. I want to get a high value if they contain exactly the same thing but may have some slightly different background and may be moved / resized by a few pixel. (More concrete, if that matters: The one picture is an icon and the other picture is a suba...
stackexchange/codereview
This code gives me warnings: $ cat test.c #include<stdio.h> #include<time.h> int main() { time_t t; scanf("%lld", &t); printf("%lld\n", t); return 0; } $ gcc test.c -o test test.c: In function ‘main’: test.c:7: warning: format ‘%lld’ expects type ‘long long int *’, but argument 2 has type ‘time_t *’ t...
stackexchange/codereview
Is there a way I can access the system preference for vibration settings? I have an alarm-like app which I want to inherit the vibration setting from the phone's ring/sound settings. However, I do not know how to programmatically access these settings.
stackexchange/codereview
I heard that any software be published to Apple store should have a apple developer license for $99/year, is this true?
stackexchange/codereview
I'm making a website that appeals to students at my school. I want to only allow access if the user is on the campus wifi or hardwire. Using PHP, how can I restrict access to people I am sure are on the campus internet?
stackexchange/codereview
I must be missing something pretty basic. I'm working on a legacy project, and I'm trying to bring FluentMigrator into the mix cause I've got some interesting database changes and data migrations coming up that I think will be made much easier by using this tool. For the initial migration, I just want to bring the data...
stackexchange/codereview
I'm parsing an existing HTML table on a webpage into an array of numbers to later pass to a plot object. I'm learning JavaScript and it is not clear how I am supposed to iterate over the data values in HTML tags. This is what I've come up with: for (i = 0; i < table.rows.length; i += 1) { row = table.rows[i]; f...
stackexchange/codereview
Using Navigator object you are able to get visitors browser info and history. Also using 'google.ClientLocation' you can get the location info. My question is what more data you can retrieve from visitor using javascript/jquery? Does google have any object similar to ClientLocation for ClientInfo for instance? Note: ...
stackexchange/codereview
jquery call $("form[name='searchbox-purchase'] select[name='city']").change(function(){ }); i have 4 forms with following names searchbox-purchase searchbox-rental searchbox-agents searchbox-developments each form has a dropdown with name 'city'. i want if i change dropdown of searchbox-purchase form, only dropdown ...
stackexchange/codereview
I'm trying to create a downloader/update tool for my C application. My updater PDL: Download update.xml from webserver Check update version by using fscanf and storing floating point to a variable Check variable with an if statement if the version is greater than release version defined in application Download update ...
stackexchange/codereview
Is there an event that fires after leaving a cell in a grid controls row filter? The first row of my grid is a filter row, when I type something in the cell of and column in the filter row then select a row I want an event to fire. What is happening is I have a lot of code in the gridView1s FocusedRow changed event, bu...
stackexchange/codereview
I am unable to compile my app in Monotouch when I select the full enterprise distribution profile I have setup. All the other profiles work ok. To be specific: when I hit the build button I get Detecting signing identity... 0 errors 0 warnings, just Build failed. Array index out of range I am guessing this is a provisi...
stackexchange/codereview
Are there any XUL alternatives that enable me to write cross platform Javascript Applications ?
stackexchange/codereview
What i would like to do is when a user clicks an image of a horse that a checkbox is then set to true or false. I have an array of horses and each horse has a checkbox. The biggest problem I have is setting the ID of my checkbox element. I tried sth like. Use custom id for check_box_tag in Rails <% @horses.each do |s|...
stackexchange/codereview
Let's take some pseudo-Mootools code: for loop (i) from 0 to 5 { create.element { id: 'element_'+i } $('element_'+i).addevent.click { alert(i); } } The events get added to the elements properly. However, when clicked, they'll all alert the latest iterator... which would be 5. Is there a...
stackexchange/codereview
Most people recommend scripts tags be placed at the bottom of the page for performance reasons - jQuery: Move JavaScript to the bottom of the page? How does this practice apply to jQuery Mobile web pages? Examples I have seen place jQuery and jQuery Mobile scripts in the head tag. Should other scripts be placed in the ...
stackexchange/codereview
I am using one controller board with Linux running on it. I want to interface my device to the Host computer (Windows OS) through USB. I have decided to use RNDIS class for communication between host and device. I have driver ready at device side (linux). When i connect my device to the Windows host it detects the hard...
stackexchange/codereview
I have a function that deletes a textfield (called termsField) and uses JQuery to empty the text from a div (called definitionContainer), and I activate the function when the user clicks on a button. function clearText(target){ var definitionDiv = document.getElementById("definitionContainer"); $('#definitionCo...
stackexchange/codereview
Consider this example <select> <option value="http://www.test1.com"> 1 </option> <option value="http://www.test2.com"> 2 </option> <option value="http://www.test3.com"> 3 </option> </select> How to I get in xpath the value of the option and not the display? Meaning, I want to get the value of the option element - http...
stackexchange/codereview
I'm tearing my hair out here trying to get a jquery validation to play nicely with my form. The validation does not appear to be working. The form just submits itself to the page. I can briefly see the validation error messages appearing before the page submits... My code: //HTML form <form id="form_scheduleEvent" nam...
stackexchange/codereview
Document editors are nice but they have their limitations. What is a good alternative to them? I already know HTML and CSS and while they can do the job, they are ill-suited for printed documents. I was thinking in learning LaTeX, because many scholars use it. But I wonder if someone would recommend another language su...
stackexchange/codereview
Been trying to solve this without progress for a couple days, my question: Given an entity in a hierarchy, return a list of the immediate-ascendants (or parents) of the entity. When I want to know the hierarchy of "Entity 1.2.2.2" it would return a list containing only the bold items: Entity 1 - Entity 1.1 - Ent...
stackexchange/codereview
Hello all I am using Tab Panel (With single tab). In this Tab Panel I am adding another Tab Panel (With single tab). In the above Tab Panel I am adding another Tab Panel. (With 15 tab). And for third & inner most Tab Panel I used auto horizontal tab scroll true. Like this : taskTabPanel.setEnableTabScroll(true); Ther...
stackexchange/codereview
I am learning how to work with webservices using Dojo. The following JSON is returned from a webservice. I would like to handle it via an ItemFileReadStore, but from what I have tried so far the ItemFileReadStore only works if the keywordstat term is changed to items. Is there a way to tell ItemFileReadStore to work wi...
stackexchange/codereview
I can create a WebMatrix 3 site and access the Admin Console via http://localhost:[PORT]/_Admin. [ISSUE] I can't seem to be able to access _Admin page via a newly created asp.net mvc site, that is hosted in WebMatrix. I wanted to get access to the Web Helpers. Any suggestions? Thank you, Pav
stackexchange/codereview
A custom workflow has been developed that copies pages from a top-level site to sub-sites. The pages are copied into a specific folder within the Pages Library of the sub-sites. This workflow has been installed in 3 site collections and it works without any problems in 2 of these. In the third site collection, we achi...
stackexchange/codereview
I have a grouped UITable view as custom setting view. Each cell is a view with 3 UITextFields and some other UIViews. When the cell is created I call a function [cell initCell:indexPath.section withRow:indexPath.row]; And then the cell knows which configuration to display - this works fine. My problem is that when the...
stackexchange/codereview
I have a file that contains multiple lines of data, e.g: dfscmd /map "\SERVER\PATH\AREA\testuser" "\NEW_SERVER\PATH\testuser" "DFSLink Home Drive: Test, User" dfscmd /map "\SERVER\PATH\AREA\testuser1" "\NEW_SERVER\PATH\testuser1" "" I am using FINDSTR to find the username (e.g testuser) and the entire line of the query...
stackexchange/codereview
I'm trying to do a simple select statement on a mysql database. In MsSql it works fine, but I can't get it to work in MySql. What I want to do is the following: Lets say I have a table (named TestTable) like this: ID | DOMAIN | NrOfVisitors -------------------------------------------- 1 | somethi...
stackexchange/codereview
(function() { var myFunc = { init : function() { alert("I need"); document.getElementById("myDiv").innerHTML = "help"; } }; window.myFunc = myFunc; })(); myFunc.init(); The alert() message works but the Uncaught TypeError is thrown when it reache...
stackexchange/codereview
I am trying to execute a piece of javascript in my silverlight application. Pretty simple example that I have created... Just a single button that tries to execute this line of code... private void Button_Click(object sender, RoutedEventArgs e) { HtmlPage.Window.Eval("alert('hi');"); } The alert window does come u...
stackexchange/codereview
I've got an Attribute Trait that I want to set on the basis of other class attributes. I realy want a default on an Attribute Trait that gets a copy of the class $self and not the meta for the attribute. I want to do something like this in my class: after 'BUILD' => sub { ...
stackexchange/codereview
I'm writing a WSH script in VB to read a massive directory listing generated with a redirected directory listing via .Run method. The directory listing is about 8400 lines, but every time I run the script, the following loop Do Until DirList.AtEndOfStream Redim Preserve arrData(i) arrData(i) = DirList.ReadLine ...
stackexchange/codereview
I know there is a way to call fancybox manually with a string of html like so: $.fancybox("<div>foo</div>") However, i want to instead pass a jQuery object to the fancybox so i can retain things like .data() and click() events i have already added: var $fooObj = $("div.foo").data("foo","bar"); $.fancybox($fooObj); Is...
stackexchange/codereview
Created a class Word. The purpose of this class is to take in words from players using a linked list. The Player class uses the word to get a score value for each character. I'm confused how to get each character using the object Word using a method getScore in the class Player. public class Word{ private String gue...
stackexchange/codereview
Below is the code of my Web Content Form. The DIV inside ASP tag shows green underline and also the text that is written in DIV tag is not visible on the Content Page. <%@ Page Title="" Language="C#" MasterPageFile="~/Presentation_Layer/Pages/home.Master" AutoEventWireup="true" CodeBehind="default.aspx.cs" Inherits="li...
stackexchange/codereview
I have installed PHPUnit and checked my PEAR settings and everything went fine. I'm using Yii as my framework and I am on a linux shared server. When I run a test (any test) I get the errors below. From what I can tell I think I need to add the following to my path settings: /home/myname/php/ since that is where...
stackexchange/codereview
i am using hibernate as ORM tool, and while loading the data from table i am getting following error. org.hibernate.HibernateException: CGLIB Enhancement failed: com.hotel.entity.HotelUser at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.getProxy(CGLIBLazyInitializer.java:96) at org.hibernate.proxy.pojo.c...
stackexchange/codereview
I am trying to understand the inheritance mappings in EF4. My database has two tables with the following structure: PersonCategory Table: CategoryID (int) (identity) (PK) CategoryType (nvarchar(50)) Person Table PersonID (int) (identity) (PK) CategoryID (FK from PersonCategory table) Name (nvarchar(50)) Description...
stackexchange/codereview
Well i happened to run through some code snippets and couldnt understand the need for xsl when the same thing can be done using css. For example <?xml-stylesheet type = "text/css" href = "6a.css" ?> <ENG-COLLEGE> <XYZ> <USN>145456</USN> <NAME>ABC</NAME> <COLLEGE>TYUIT</COLLEGE> <BRANCH>ISE</BRAN...
stackexchange/codereview
I have trouble with export my very simple project in eclipse SDK: eclipse does't compiling *.jar file for my "core" class. Struct of my simple project: │ .classpath │ .project │ ├───.settings │ .jsdtscope │ org.eclipse.jdt.core.prefs │ org.eclipse.jst.jsp.core.prefs │ org.eclipse.wst.common....
stackexchange/codereview
We have a requirements to create a Website (ASP.NET v4.0) which displays a Graph. It should be able to do: Display nodes (with names and colours) Display links between the nodes, with text on the link (e.g. '85%') Interact with nodes/links to drag/move/select Layouts out the nodes in a clear manner automatically Can a...
stackexchange/codereview
I'm building QT embedded 4.7 for the OMAP3 platform. at the link stage, it fails because clock_gettime has no symbol. In my own applications in the past, i've solved this by linking in librt. Have i configured QT embedded wrong? how do i get librt to compile in without modifying the make scripts? Thanks a lot
stackexchange/codereview
Hi I need to call a shell script from a server side java script and in shell script i need to connect to DB2 database and delete some data in few tables. Can any one help me because I am new to server side script and also shell script
stackexchange/codereview
For the creation of a dashboard I need to find out the way to get the count of the items in a field of a list. How to get the same in real time? Let’s say I have a list with the following fields; Quarter >>>> Batch# >>>>>> In field/Packed/Shipped For eg, if the entries for the first list is as given below; Quarter ...
stackexchange/codereview
I have this question on OData based services. As a consumer of OData Service, can I assume that any OData compliant data service would expose its data in ATOM and JSON format. Is it possible that there is a OData service that expose its feeds in ATOM but not in JSON format? In my application as a consumer of OData (ODa...
stackexchange/codereview
If there are 9 balls among which if 1 ball is of different weight, it requires minimum of 2 weighs to find the odd ball. If there are 27 balls, it requires 3 chances. 9 -> 3 pow 2 -> 2 chances. 27 -> 3 pow 3 -> 3 chances. Question: Whats the minimum number of weighs required for finding the odd ball if given 3 pow...
stackexchange/codereview
I read the manual of batch file command and it says by using <& operator to redirect input and duplicate and using the >& operator to redirect output and duplicate. I'm really confused, I can not understand what does this mean. Can anyone give me some real life scenario? The example put on the website is really hard to...
stackexchange/codereview
I use WebBrowser: IHTMLDocument2 doc = (IHTMLDocument2)webBrowser.Document; IHTMLTxtRange range = (IHTMLTxtRange)doc.selection.createRange(); ... if(range.execCommand("StrikeThrough", false, null)) { //Is range strikethroughed or not? } How can i detect is selection strike-through or not (in code)?
stackexchange/codereview
Ive the foll code snippet class A{ private int num; public ArrayList<Integer> totRecords ; public final int getNum(){ return num; } public final void setNum(int val){ num = val; } // inside main { A a = new A(); a.setNum(1); a.totRecords.add(0); // i use javabeans serialisation....
stackexchange/codereview
I've been toying with this for days with no luck. Essentially I'm trying to build a simple library to render SSRS reports using Powershell. I'm using Powershell in an attempt to ease development later on (Instead of coding a C# app for each project). Mostly this will be used to schedule various things with reports. ...
stackexchange/codereview
I am looking for Java libraries that can be used to create feature vectors for a given image or audio file. For example, if the input was 322.bmp the output would be something like 322.bmp 93.444 22.998 2.000 3.125 etc. where each one of those numbers corresponds to an image feature such as coarseness, contrast, direc...
stackexchange/codereview
I noticed there are apps like Google Translate where, when I do "Add to Home Screen" and then open it, it runs on it's own instead of in a the mobile safari browser. How do I make an app like that?
stackexchange/codereview
I have a user control with this OutputCache: <%@ OutputCache Duration="86400" VaryByControl="LnkBtnTopVanzari" %> Where VaryByControl is the id of a link button i use to switch the active view of a multiView contained in an updatePanel. The problem is that when i press that link button, the page does a full post back ...
stackexchange/codereview
I've created a web application with a mapping component. I want to use another geocoding service other than google, but all the ones I've found use SOAP to communicate with the website. I've never used soap before. Does anyone know of any good resources to help me figure this out? I"m using PHP to integrate to build th...
stackexchange/codereview
i need a regular expression that would replace arithmetic operators in a given string. I need to be able to replace the operators with "|". for instance, String input = "5.0+9.0-(-2.0)"; String replace = input.replaceAll("[+-//*&&[^.]&&[^(-]]", "|"); in this instance i intend only to replace the operators outside the...
stackexchange/codereview
and first of all sorry for my english. I do a code that load content into a div, without refreshing the web, every link sends vars trought ajax and returns some html code into a . Because of this, every code that i load with ajax, returns again my script. So, I do a jquery script with $.ajax method like this: $.ajax({...
stackexchange/codereview
I want to create new work document from sketch with Python on Linux platform, but do not know how to do that. I do not willing to use RTF or use pythondocx to create docx document. Is there any other way to do so? Remember, I need the document keeps the formatting. Thanks everyone's help!
stackexchange/codereview
I have a table with a column called Type, which can have three values (name1, name2, name3). Can I write a query which first returns the records with Type = name1 and then the rows with values name2 and name3 with a WHERE clause, so I can filter them by CreationDate for instance? That means, return for day 01/01/2000: ...
stackexchange/codereview
Is there an Android UI Library that has components like Action Bars and Dashboards? A lot of new applications seem to have these components, so I was hoping there was a solution available (either free or paid).
stackexchange/codereview
there is a way to hide/encrypt password in xml spring config file? I read that is possible with a "custom" subclass of DataSource, but the solutions keep key in same config file as plain text...so is a bit useless. There is a way to use KeyStore for this? For example read the value from a keystore. Thanks all.
stackexchange/codereview
I'm developing a PHP-MySQL app that enables registered users to enter text comments. Problem is: User sign-in into the web site - OKAY User presented with a form to submit text comment - OKAY User enters text comment and submits - OKAY I have a routine that sanitize the comment & save it into MySQL (with userid, text...
stackexchange/codereview
I want to add a button just next to the home button in Internet Explorer 9. When anyone clicks that button he should be able to see a menu that has different icons for different functionality. How can I do it for Internet Explorer 9? I want to use C# for this. Any pointers are greatly appreciated.
stackexchange/codereview
BlobCity.java: package BlobCity.xyz.com; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.util.Map; import android.app.Activity; import android.content.Intent; import android.content.pm.ActivityInfo; import android.net.Uri; import an...
stackexchange/codereview
With the SiteMapPath control (navigation breadcrumbs), is there any way to NOT show the current node you are on? I only want to show the parents. There is a property to RenderCurrentNodeAsLink, but not what I'm looking for. Thanks!
stackexchange/codereview
How can I check if a process has elevated privileges in Windows 7 (using native C++, not C#/C++.net) ? I've been looking for an answer for quite sometimes, but all I can find are the answers that use the .NET framework.
stackexchange/codereview
I got a table with 2 columns (both INT), and there are 400 000 records (a lot). The first column is random numbers ordered ASC. The second column has a rule on it (which is not important right now) In the table there are 1000 records, that are exceptions. So, instead of the "rule", there is only "-1" - valued cells. H...
stackexchange/codereview
I want to get 4 unique random floating point numbers in the range <0;9>. How could I do that. Is it possible to do this with a single function so I don't need to generate random numbers in a loop?
stackexchange/codereview
How can I format & group dates in the category axes? I try to do it with this code: With ChartSpace.Charts(0).Axes(chAxisPositionCategory) .NumberFormat = "mmm yyyy" .GroupingType = chAxisGroupingManual End With but all that I get is "invalid parameter". If I write this: debug.print ChartSpace.Charts(0).Axes(c...
stackexchange/codereview
I created some javascript code that generates midi files based on a passed note and octave. For the most part it works rather well. The problem is that the C note (note=0) plays much shorter than any other note (1 (C#) through 11 (B)). Here is my code: function play(note, octave, program){ var note = (octave*12 + n...
stackexchange/codereview
I have in a web application's pom file, a build profile, which does some necessary things (in my code) for qa testing. I have this code on svn and this code is compiled in Hudson, which deploys artifacts in nexus.. Hudson has two jobs, one for qa profile (-P qa) and one for customers. What i need is that i change in my...
stackexchange/codereview
Wehn I test the following PDO code, I could view the connections to MySQL in MySQL with show processlist, but how could I cut off one connection? Is there any other power tool for managing MySQL connection/etc other than command line? <?php $dbh = new PDO('mysql:host=localhost;dbname=test', $user, $pass, array(PDO::ATT...
stackexchange/codereview
I'm using pymongo: http://api.mongodb.org/python/1.9%2B/index.html for post in db.datasets.find({"set":"flickr"}).sort("num_favs","-1"): ... How come I can't sort this? I'd like it sorted descending.
stackexchange/codereview
Heres an example of a SO link. I was wondering, if the user has updated the subject of the link should i do a redirect or a plain 200? A redirect will allow the user to have the most current title in their address bar (where i usually copy/paste from) but then again the title part doesnt really matter. If i do somethin...
stackexchange/codereview
I have doubts ... I am not able to save my information checkbox in the database, and so little rescue in a search screen, if that is done manually in the database ... $ TRAMENTO1 = (@$ _POST ["TRAMENTO1 "]=='true') ? $ _POST ["TRAMENTO1"]: 'false'; <Input name="TRAMENTO1" type="checkbox" id="TRAMENTO1" ...
stackexchange/codereview
When creating a stored procedure, does the BEGIN/END block serve and purpose? eg, CREATE PROCEDURE SPNAME AS SELECT * FROM TABLE vs. CREATE PROCEDURE SPNAME AS BEGIN SELECT * FROM TABLE END
stackexchange/codereview