Daily Archives

Articles indexed Saturday May 29 2010

Page 1/76 | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Spreadsheet RDBMS

    - by John Nilsson
    I'm looking for a software (or set of software) that will let me combine spreadsheet and database workflows. Data entry in spreadsheet to enable simple entry from clipboard, analysis based on joins, unions and aggregates and pivot/data pilot summaries. So far I've only found either spreadsheets OR db applications but no good combination. OO base with calc for tables doesn't support aggregates f.ex. Google Spreadsheet + Visualizaion API doesn't support unions or joins, zoho db doesn't let me paste from clipboard. Any hints on software that could be used? Basically I'm trying to do some analysis of my personal bank transactions. Problem 1, ETL. The data has to be moved from my bank to a database. My current solution is to manually copy and paste the data into one spread sheet per account from my internet bank. Pains: Not very scriptable. Lots of scrolling to reach the point to paste. Have to apply sorting and formatting to the pasted data each time. Problem 2, analysis. I then want to aggregate the different accounts in one sweep to track transfers per type of transfer over all accounts. The actual aggregation is still unsolved because I can't find a UNION equivalent in the spreadsheets I've tried.

    Read the article

  • Upcoming Webcast on June 17: Gain Control Over Your Financial Close

    - by Theresa Hickman
    Accenture and Oracle EPM (Enterprise Perfromance Management) and GRC (Governance, Risk, and Compliance) will be hosting a live webcast called "Gain Control Over Your Financial Close - Confidence in the Process, Trust in the Numbers." When: Thursday, June 17, 2010 Time: 9:00am PST (Noon EST) Don't miss this chance to find out how you could optimize the financial close process and transform the speed, quality and integrity of your financial reporting. For more information and to register for this event, see this webpage.

    Read the article

  • How to write Tetris in Scala? (code review)

    - by eed3si9n
    Today's the 25th birthday of Tetris. I believe writing Tetris clone is one of the best ways to familiarize oneself to a new language or a platform. It's not completely trivial and it lends itself well to learning language specific constructs like iterators and closures. I've been hearing about Scala, and finally decided to read some docs and write a Tetris clone. So, this is my first Scala code. I did try to use functional constructs, but am sure there are lots of things I can improve to do it more Scala way. Please give me suggestions using comment. Also other submissions of Tetris clone in Scala are welcome too. I'm aware that the actual question itself is somewhat subjective, but I think this is of some value since others can use this as example (or anti-example) code. Edit: Let me rephrase the question. What can I do to make the code more Scala-ish?

    Read the article

  • Why are my functional tests failing?

    - by Mongus Pong
    I have generated some scaffolding for my rails app. I am running the generated tests and they are failing. for example test "should create area" do assert_difference('Area.count') do post :create, :area => { :name => 'area1' } end assert_redirected_to area_path(assigns(:area)) end This test is failing saying that : 1) Failure: test_should_create_area(AreasControllerTest) [/test/functional/areas_controller_test.rb:16]: "Area.count" didn't change by 1. <3 expected but was <2. There is only one field in the model : name. I am populating this so it cant be because I am failing to populate the only field. I can run the site and create an area with the name 'area1'. So reality is succeeding, but the test is failing. I cant ask why its failing, because Im sure theres not enough information here for anyone here to know why. Im just stuck at knowing what avenues to go down to work out why the test is failing. Even putting puts into the code dont print out... What steps can I take to track this down?

    Read the article

  • Logging Into a site that uses Live.com authentication

    - by Josh
    I've been trying to automate a log in to a website I frequent, www.bungie.net. The site is associated with Microsoft and Xbox Live, and as such makes uses of the Windows Live ID API when people log in to their site. I am relatively new to creating web spiders/robots, and I worry that I'm misunderstanding some of the most basic concepts. I've simulated logins to other sites such as Facebook and Gmail, but live.com has given me nothing but trouble. Anyways, I've been using Wireshark and the Firefox addon Tamper Data to try and figure out what I need to post, and what cookies I need to include with my requests. As far as I know these are the steps one must follow to log in to this site. 1. Visit https: //login.live.com/login.srf?wa=wsignin1.0&rpsnv=11&ct=1268167141&rver=5.5.4177.0&wp=LBI&wreply=http:%2F%2Fwww.bungie.net%2FDefault.aspx&id=42917 2. Recieve the cookies MSPRequ and MSPOK. 3. Post the values from the form ID "PPSX", the values from the form ID "PPFT", your username, your password all to a changing URL similar to: https: //login.live.com/ppsecure/post.srf?wa=wsignin1.0&rpsnv=11&ct= (there are a few numbers that change at the end of that URL) 4. Live.com returns the user a page with more hidden forms to post. The client then posts the values from the form "ANON", the value from the form "ANONExp" and the values from the form "t" to the URL: http ://www.bung ie.net/Default.aspx?wa=wsignin1.0 5. After posting that data, the user is returned a variety of cookies the most important of which is "BNGAuth" which is the log in cookie for the site. Where I am having trouble is on fifth step, but that doesn't neccesarily mean I've done all the other steps correctly. I post the data from "ANON", "ANONExp" and "t" but instead of being returned a BNGAuth cookie, I'm returned a cookie named "RSPMaybe" and redirected to the home page. When I review the Wireshark log, I noticed something that instantly stood out to me as different between the log when I logged in with Firefox and when my program ran. It could be nothing but I'll include the picture here for you to review. I'm being returned an HTTP packet from the site before I post the data in the fourth step. I'm not sure how this is happening, but it must be a side effect from something I'm doing wrong in the HTTPS steps. using System; using System.Collections.Generic; using System.Collections.Specialized; using System.Text; using System.Net; using System.IO; using System.IO.Compression; using System.Security.Cryptography; using System.Security.Cryptography.X509Certificates; using System.Web; namespace SpiderFromScratch { class Program { static void Main(string[] args) { CookieContainer cookies = new CookieContainer(); Uri url = new Uri("https://login.live.com/login.srf?wa=wsignin1.0&rpsnv=11&ct=1268167141&rver=5.5.4177.0&wp=LBI&wreply=http:%2F%2Fwww.bungie.net%2FDefault.aspx&id=42917"); HttpWebRequest http = (HttpWebRequest)HttpWebRequest.Create(url); http.Timeout = 30000; http.UserAgent = "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.8) Gecko/20100202 Firefox/3.5.8 (.NET CLR 3.5.30729)"; http.Accept = "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"; http.Headers.Add("Accept-Language", "en-us,en;q=0.5"); http.Headers.Add("Accept-Charset", "ISO-8859-1,utf-8;q=0.7,*;q=0.7"); http.Headers.Add("Keep-Alive", "300"); http.Referer = "http://www.bungie.net/"; http.ContentType = "application/x-www-form-urlencoded"; http.CookieContainer = new CookieContainer(); http.Method = WebRequestMethods.Http.Get; HttpWebResponse response = (HttpWebResponse)http.GetResponse(); StreamReader readStream = new StreamReader(response.GetResponseStream()); string HTML = readStream.ReadToEnd(); readStream.Close(); //gets the cookies (they are set in the eighth header) string[] strCookies = response.Headers.GetValues(8); response.Close(); string name, value; Cookie manualCookie; for (int i = 0; i < strCookies.Length; i++) { name = strCookies[i].Substring(0, strCookies[i].IndexOf("=")); value = strCookies[i].Substring(strCookies[i].IndexOf("=") + 1, strCookies[i].IndexOf(";") - strCookies[i].IndexOf("=") - 1); manualCookie = new Cookie(name, "\"" + value + "\""); Uri manualURL = new Uri("http://login.live.com"); http.CookieContainer.Add(manualURL, manualCookie); } //stores the cookies to be used later cookies = http.CookieContainer; //Get the PPSX value string PPSX = HTML.Remove(0, HTML.IndexOf("PPSX")); PPSX = PPSX.Remove(0, PPSX.IndexOf("value") + 7); PPSX = PPSX.Substring(0, PPSX.IndexOf("\"")); //Get this random PPFT value string PPFT = HTML.Remove(0, HTML.IndexOf("PPFT")); PPFT = PPFT.Remove(0, PPFT.IndexOf("value") + 7); PPFT = PPFT.Substring(0, PPFT.IndexOf("\"")); //Get the random URL you POST to string POSTURL = HTML.Remove(0, HTML.IndexOf("https://login.live.com/ppsecure/post.srf?wa=wsignin1.0&rpsnv=11&ct=")); POSTURL = POSTURL.Substring(0, POSTURL.IndexOf("\"")); //POST with cookies http = (HttpWebRequest)HttpWebRequest.Create(POSTURL); http.UserAgent = "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.8) Gecko/20100202 Firefox/3.5.8 (.NET CLR 3.5.30729)"; http.Accept = "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"; http.Headers.Add("Accept-Language", "en-us,en;q=0.5"); http.Headers.Add("Accept-Charset", "ISO-8859-1,utf-8;q=0.7,*;q=0.7"); http.Headers.Add("Keep-Alive", "300"); http.CookieContainer = cookies; http.Referer = "https://login.live.com/login.srf?wa=wsignin1.0&rpsnv=11&ct=1268158321&rver=5.5.4177.0&wp=LBI&wreply=http:%2F%2Fwww.bungie.net%2FDefault.aspx&id=42917"; http.ContentType = "application/x-www-form-urlencoded"; http.Method = WebRequestMethods.Http.Post; Stream ostream = http.GetRequestStream(); //used to convert strings into bytes System.Text.ASCIIEncoding encoding = new System.Text.ASCIIEncoding(); //Post information byte[] buffer = encoding.GetBytes("PPSX=" + PPSX +"&PwdPad=IfYouAreReadingThisYouHaveTooMuc&login=YOUREMAILGOESHERE&passwd=YOURWORDGOESHERE" + "&LoginOptions=2&PPFT=" + PPFT); ostream.Write(buffer, 0, buffer.Length); ostream.Close(); HttpWebResponse response2 = (HttpWebResponse)http.GetResponse(); readStream = new StreamReader(response2.GetResponseStream()); HTML = readStream.ReadToEnd(); response2.Close(); ostream.Dispose(); foreach (Cookie cookie in response2.Cookies) { Console.WriteLine(cookie.Name + ": "); Console.WriteLine(cookie.Value); Console.WriteLine(cookie.Expires); Console.WriteLine(); } //SET POSTURL value string POSTANON = "http://www.bungie.net/Default.aspx?wa=wsignin1.0"; //Get the ANON value string ANON = HTML.Remove(0, HTML.IndexOf("ANON")); ANON = ANON.Remove(0, ANON.IndexOf("value") + 7); ANON = ANON.Substring(0, ANON.IndexOf("\"")); ANON = HttpUtility.UrlEncode(ANON); //Get the ANONExp value string ANONExp = HTML.Remove(0, HTML.IndexOf("ANONExp")); ANONExp = ANONExp.Remove(0, ANONExp.IndexOf("value") + 7); ANONExp = ANONExp.Substring(0, ANONExp.IndexOf("\"")); ANONExp = HttpUtility.UrlEncode(ANONExp); //Get the t value string t = HTML.Remove(0, HTML.IndexOf("id=\"t\"")); t = t.Remove(0, t.IndexOf("value") + 7); t = t.Substring(0, t.IndexOf("\"")); t = HttpUtility.UrlEncode(t); //POST the Info and Accept the Bungie Cookies http = (HttpWebRequest)HttpWebRequest.Create(POSTANON); http.UserAgent = "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.8) Gecko/20100202 Firefox/3.5.8 (.NET CLR 3.5.30729)"; http.Accept = "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"; http.Headers.Add("Accept-Language", "en-us,en;q=0.5"); http.Headers.Add("Accept-Encoding", "gzip,deflate"); http.Headers.Add("Accept-Charset", "ISO-8859-1,utf-8;q=0.7,*;q=0.7"); http.Headers.Add("Keep-Alive", "115"); http.CookieContainer = new CookieContainer(); http.ContentType = "application/x-www-form-urlencoded"; http.Method = WebRequestMethods.Http.Post; http.Expect = null; ostream = http.GetRequestStream(); int test = ANON.Length; int test1 = ANONExp.Length; int test2 = t.Length; buffer = encoding.GetBytes("ANON=" + ANON +"&ANONExp=" + ANONExp + "&t=" + t); ostream.Write(buffer, 0, buffer.Length); ostream.Close(); //Here lies the problem, I am not returned the correct cookies. HttpWebResponse response3 = (HttpWebResponse)http.GetResponse(); GZipStream gzip = new GZipStream(response3.GetResponseStream(), CompressionMode.Decompress); readStream = new StreamReader(gzip); HTML = readStream.ReadToEnd(); //gets both cookies string[] strCookies2 = response3.Headers.GetValues(11); response3.Close(); } } } This has given me problems and I've put many hours into learning about HTTP protocols so any help would be appreciated. If there is an article detailing a similar log in to live.com feel free to point the way. I've been looking far and wide for any articles with working solutions. If I could be clearer, feel free to ask as this is my first time using Stack Overflow.

    Read the article

  • How do you model roles / relationships with Domain Driven Design in mind?

    - by kitsune
    If I have three entities, Project, ProjectRole and Person, where a Person can be a member of different Projects and be in different Project Roles (such as "Project Lead", or "Project Member") - how would you model such a relationship? In the database, I currently have the following tablers: Project, Person, ProjectRole Project_Person with PersonId & ProjectId as PK and a ProjectRoleId as a FK Relationship. I'm really at a loss here since all domain models I come up with seem to break some "DDD" rule. Are there any 'standards' for this problem? I had a look at a Streamlined Object Modeling and there is an example what a Project and ProjectMember would look like, but AddProjectMember() in Project would call ProjectMember.AddProject(). So Project has a List of ProjectMembers, and each ProjectMember in return has a reference to the Project. Looks a bit convoluted to me. update After reading more about this subject, I will try the following: There are distinct roles, or better, model relationships, that are of a certain role type within my domain. For instance, ProjectMember is a distinct role that tells us something about the relationship a Person plays within a Project. It contains a ProjectMembershipType that tells us more about the Role it will play. I do know for certain that persons will have to play roles inside a project, so I will model that relationship. ProjectMembershipTypes can be created and modified. These can be "Project Leader", "Developer", "External Adviser", or something different. A person can have many roles inside a project, and these roles can start and end at a certain date. Such relationships are modeled by the class ProjectMember. public class ProjectMember : IRole { public virtual int ProjectMemberId { get; set; } public virtual ProjectMembershipType ProjectMembershipType { get; set; } public virtual Person Person { get; set; } public virtual Project Project { get; set; } public virtual DateTime From { get; set; } public virtual DateTime Thru { get; set; } // etc... } ProjectMembershipType: ie. "Project Manager", "Developer", "Adviser" public class ProjectMembershipType : IRoleType { public virtual int ProjectMembershipTypeId { get; set; } public virtual string Name { get; set; } public virtual string Description { get; set; } // etc... }

    Read the article

  • Cairo "Could not find libpng in the pkg-config search path"

    - by Alon
    I'm trying to install GTK-DFB and cairo is a requirement. When I try to build it from source, it throws: checking for cairo's PNG functions feature... configure: WARNING: Could not find libpng in the pkg-config search path checking whether cairo's PNG functions feature could be enabled... no configure: error: recommended PNG functions feature could not be enabled Ideas? Thanks

    Read the article

  • Can I query DOM Document with xpath expression from multiple threads safely?

    - by Dan
    I plan to use dom4j DOM Document as a static cache in an application where multiples threads can query the document. Taking into the account that the document itself will never change, is it safe to query it from multiple threads? I wrote the following code to test it, but I am not sure that it actually does prove that operation is safe? package test.concurrent_dom; import org.dom4j.Document; import org.dom4j.DocumentException; import org.dom4j.DocumentHelper; import org.dom4j.Element; import org.dom4j.Node; /** * Hello world! * */ public class App extends Thread { private static final String xml = "<Session>" + "<child1 attribute1=\"attribute1value\" attribute2=\"attribute2value\">" + "ChildText1</child1>" + "<child2 attribute1=\"attribute1value\" attribute2=\"attribute2value\">" + "ChildText2</child2>" + "<child3 attribute1=\"attribute1value\" attribute2=\"attribute2value\">" + "ChildText3</child3>" + "</Session>"; private static Document document; private static Element root; public static void main( String[] args ) throws DocumentException { document = DocumentHelper.parseText(xml); root = document.getRootElement(); Thread t1 = new Thread(){ public void run(){ while(true){ try { sleep(3); } catch (InterruptedException e) { e.printStackTrace(); } Node n1 = root.selectSingleNode("/Session/child1"); if(!n1.getText().equals("ChildText1")){ System.out.println("WRONG!"); } } } }; Thread t2 = new Thread(){ public void run(){ while(true){ try { sleep(3); } catch (InterruptedException e) { e.printStackTrace(); } Node n1 = root.selectSingleNode("/Session/child2"); if(!n1.getText().equals("ChildText2")){ System.out.println("WRONG!"); } } } }; Thread t3 = new Thread(){ public void run(){ while(true){ try { sleep(3); } catch (InterruptedException e) { e.printStackTrace(); } Node n1 = root.selectSingleNode("/Session/child3"); if(!n1.getText().equals("ChildText3")){ System.out.println("WRONG!"); } } } }; t1.start(); t2.start(); t3.start(); System.out.println( "Hello World!" ); } }

    Read the article

  • wamp appache - polling server continuously

    - by stone
    I've heard polling the server is not the best of ideas. Let's say I make a client-server application. A simple game for example. Where each client polls the server every half a minute. How many clients is it possible to have before it overlaods a wamp server? Basically how robust is Apache for this kind of stuff? Getting a request, aggregating data from mysql server, and then returning the data in an xml format.

    Read the article

  • Installing Fabric On Windows (Error No Module Called Readline)

    - by Jon
    I'm trying to use the Fabric 0.1.1 deploy tool (http://docs.fabfile.org/) on Windows and we're running into an issue with the readline module. I've been through various threads but can't seem to solve the issue. It's important because we can't deploy applications from Windows based machines. C:\Documents and Settings\dev\Desktop\deploy>fab Traceback (most recent call last): File "C:\python\Scripts\fab-script.py", line 8, in <module> load_entry_point('fabric==0.1.1', 'console_scripts', 'fab')() File "c:\python\lib\site-packages\setuptools-0.6c9-py2.6.egg\pkg_resources.py" , line 277, in load_entry_point File "c:\python\lib\site-packages\setuptools-0.6c9-py2.6.egg\pkg_resources.py" , line 2180, in load_entry_point File "c:\python\lib\site-packages\setuptools-0.6c9-py2.6.egg\pkg_resources.py" , line 1913, in load File "build\bdist.win32\egg\fabric.py", line 25, in <module> **ImportError: No module named readline** Installing the module results in: **easy_install readline** Searching for readline Reading http://pypi.python.org/simple/readline/ Reading http://www.python.org/ Best match: readline 2.6.4 Downloading http://pypi.python.org/packages/source/r/readline/readline-2.6.4.tar .gz#md5=7568e8b78f383443ba57c9afec6f4285 Processing readline-2.6.4.tar.gz Running readline-2.6.4\setup.py -q bdist_egg --dist-dir c:\docume~1\ji81b9~1.che \locals~1\temp\easy_install-pzkz1a\readline-2.6.4\egg-dist-tmp-szs2ps Traceback (most recent call last): File "C:\python\Scripts\easy_install-script.py", line 8, in <module> load_entry_point('setuptools==0.6c9', 'console_scripts', 'easy_install')() File "c:\python\lib\site-packages\setuptools-0.6c9-py2.6.egg\setuptools\comman d\easy_install.py", line 1671, in main File "c:\python\lib\site-packages\setuptools-0.6c9-py2.6.egg\setuptools\comman d\easy_install.py", line 1659, in with_ei_usage File "c:\python\lib\site-packages\setuptools-0.6c9-py2.6.egg\setuptools\comman d\easy_install.py", line 1675, in <lambda> File "c:\python\lib\distutils\core.py", line 152, in setup dist.run_commands() File "c:\python\lib\distutils\dist.py", line 975, in run_commands self.run_command(cmd) File "c:\python\lib\distutils\dist.py", line 995, in run_command cmd_obj.run() File "c:\python\lib\site-packages\setuptools-0.6c9-py2.6.egg\setuptools\comman d\easy_install.py", line 211, in run File "c:\python\lib\site-packages\setuptools-0.6c9-py2.6.egg\setuptools\comman d\easy_install.py", line 446, in easy_install File "c:\python\lib\site-packages\setuptools-0.6c9-py2.6.egg\setuptools\comman d\easy_install.py", line 476, in install_item File "c:\python\lib\site-packages\setuptools-0.6c9-py2.6.egg\setuptools\comman d\easy_install.py", line 655, in install_eggs File "c:\python\lib\site-packages\setuptools-0.6c9-py2.6.egg\setuptools\comman d\easy_install.py", line 930, in build_and_install File "c:\python\lib\site-packages\setuptools-0.6c9-py2.6.egg\setuptools\comman d\easy_install.py", line 919, in run_setup File "c:\python\lib\site-packages\setuptools-0.6c9-py2.6.egg\setuptools\sandbo x.py", line 27, in run_setup File "c:\python\lib\site-packages\setuptools-0.6c9-py2.6.egg\setuptools\sandbo x.py", line 63, in run File "c:\python\lib\site-packages\setuptools-0.6c9-py2.6.egg\setuptools\sandbo x.py", line 29, in <lambda> File "setup.py", line 93, in <module> AttributeError: 'module' object has no attribute 'symlink' Has anybody solved this issue or can anybody suggest a workaround?

    Read the article

  • Windows 7 Login User Doesn't Exist [closed]

    - by dcolumbus
    I have another interesting issue... because of some issue with a lost password, I had to manually change the password to one of the accounts via and DOS hack. However, somehow in the process I now have a phantom username that I am asked to logon to when Windows first starts... This username doesn't exit. In order to login, I have to "change user" and manually type in the correct username. Is there a way that I can edit which username it prompts me for? I'd like to repair this without having to reinstall just yet.

    Read the article

  • Windows 7 Login User Doesn't Exist

    - by dcolumbus
    I have another interesting issue... because of some issue with a lost password, I had to manually change the password to one of the accounts via and DOS hack. However, somehow in the process I now have a phantom username that I am asked to logon to when Windows first starts... This username doesn't exit. In order to login, I have to "change user" and manually type in the correct username. Is there a way that I can edit which username it prompts me for? I'd like to repair this without having to reinstall just yet.

    Read the article

  • MVC2 Inline XHTML Validator?

    - by GedByrne
    I am attempting to setup http://www.thejoyofcode.com/Validator_Module.aspx on a local MVC2 project. I have followed all of the steps listed in the setup guide but I cannot get the validator to kick in. If I create a bog standard .htm file or a webform with .aspx extension, I can get it to work. Anyone had any joy with this?

    Read the article

  • JavaScript tree / treegrid libraries

    - by desau
    I'm looking for a good JavaScript tree / treegrid package. Now -- before you answer: It needs to be able to perform well with lots of nodes. Perhaps 1,000 sibling nodes. It needs to be able to draw to a usable state within 2 or 3 seconds with 1,000 nodes. It doesn't necessarily need to draw all 1,000 nodes at once -- if it supports some sort of "smart rendering" or fake scrolling. Beyond that, column resizing, drag and drop, inline editing would all be nice, although I could probably add that functionality myself. I've already tried dojo's tree and yahoo's YUI treeview. Both are too slow.

    Read the article

  • How to write an XML file without header in Python?

    - by Nico
    Hi, when using Python's stock XML tools such as xml.dom.minidom for XML writing, a file would always start off like <?xml version="1.0"?> [...] While this is perfectly legal XML code, and it's even recommended to use the header, I'd like to get rid of it as one of the programs I'm working with has problems here. I can't seem to find the appropriate option in xml.dom.minidom, so I wondered if there are other packages which do allow to neglect the header. Cheers, Nico

    Read the article

  • Code Golf: 1x1 black pixel

    - by Joey Adams
    Recently, I used my favorite image editor to make a 1x1 black pixel (which can come in handy when you want to draw solid boxes in HTML cheaply). Even though I made it a monochrome PNG, it came out to be 120 bytes! I mean, that's kind of steep. 120 bytes. For one pixel. I then converted it to a GIF, which dropped the size down to 43 bytes. Much better, but still... Challenge The shortest image file or program that is or generates a 1x1 black pixel. A submission may be: An image file that represents a 1x1 black pixel. The format chosen must be able to represent larger images than 1x1, and cannot be ad-hoc (that is, it can't be an image format you just made up for code golf). Image files will be ranked by byte count. A program that generates such an image file. Programs will be ranked by character count, as usual in code golf. As long as an answer falls into one of these two categories, anything is fair game.

    Read the article

  • Homoscedascity test for Two-Way ANOVA

    - by aL3xa
    I've been using var.test and bartlett.test to check basic ANOVA assumptions, among others, homoscedascity (homogeniety, equality of variances). Procedure is quite simple for One-Way ANOVA: bartlett.test(x ~ g) # where x is numeric, and g is a factor var.test(x ~ g) But, for 2x2 tables, i.e. Two-Way ANOVA's, I want to do something like this: bartlett.test(x ~ c(g1, g2)) # or with list; see latter: var.test(x ~ list(g1, g2)) Of course, ANOVA assumptions can be checked with graphical procedures, but what about "an arithmetic option"? Is that manageable? How do you test homoscedascity in Two-Way ANOVA?

    Read the article

  • How to right-justify icon in a JLabel?

    - by geoffreyzheng
    For a JLabel with icon, if you setHorizontalTextPosition(SwingConstants.LEADING), the icon is painted right after text, no matter how wide the label is. This is particularly bad for a list, as the icons would be all over the place depending on how long the text is for each item. I traced the code and it seems to be that in SwingUtilities#layoutCompoundLabelImpl, text width is simply set to SwingUtilities2.stringWidth(c, fm, text), and icon x is set to follow text without considering label width. Here is the simplest case: import java.awt.*; import javax.swing.*; public class TestJLabelIcon { public static void main(String args[]) { EventQueue.invokeLater(new Runnable() { public void run() { JLabel c = new JLabel("abc"); c.setHorizontalTextPosition(SwingConstants.LEADING); c.setHorizontalAlignment(SwingConstants.LEADING); c.setIcon(UIManager.getIcon("FileChooser.detailsViewIcon")); c.setBorder(BorderFactory.createLineBorder(Color.RED)); JFrame frame = new JFrame(); frame.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE ); frame.getContentPane().add(c); frame.pack(); frame.setLocationRelativeTo(null); frame.setVisible(true); } }); } } You can see that label always fills the frame but icon stays put. You'll get the mirror problem if you set both arguments to TRAILING. I know I can override the UI, or use a JPanel, etc. I just wonder if I'm missing something simple in JLabel. If not, it seems like a Java bug. FYI this is jdk1.6.0_06 on Windows XP.

    Read the article

  • Saving files in cocoa

    - by happyCoding25
    Hello, Im sure this is a really easy to answer question but I'm still new to cocoa. I need to save my applications data. The app has 4 text fields and each field needs to be saved into one file. Then when you open the file it needs to know what goes in what field. Im really stuck with this. Also, I do know how to use the save panel. Thanks in advance.

    Read the article

  • Changing email of a contact in address book

    - by David
    Hey guys, I want to change the email of a contact in address book. my code is as follow. but somehow it doesnt work. do you know why? - (BOOL)peoplePickerNavigationController:(ABPeoplePickerNavigationController *)peoplePicker shouldContinueAfterSelectingPerson:(ABRecordRef)person { CFErrorRef anError = NULL; ABMultiValueRef email = ABMultiValueCreateMutable(kABMultiStringPropertyType); NSString *personEmail = [conversationHistory getReceiver]; ABRecordSetValue(person, kABPersonEmailProperty, email, &anError); CFRelease(email); [self dismissModalViewControllerAnimated:YES]; return NO; }

    Read the article

  • Homoscedascity test for Two-Way ANOVA

    - by aL3xa
    I've been using var.test and bartlett.test to check basic ANOVA assumptions, among others, homoscedascity (homogeniety, equality of variances). Procedure is quite simple for One-Way ANOVA: bartlett.test(x ~ g) # where x is numeric, and g is a factor var.test(x ~ g) But, for 2x2 tables, i.e. Two-Way ANOVA's, I want to do something like this: bartlett.test(x ~ c(g1, g2)) # or with list; see latter: var.test(x ~ list(g1, g2)) Of course, ANOVA assumptions can be checked with graphical procedures, but what about "an arithmetic option"? Is that, at all, manageable? How do you test homoscedascity in Two-Way ANOVA?

    Read the article

  • iPhone SDK linking errors with static library

    - by Nico
    Hello all! I've built my own static library with components to be reused in my project, and recently had the need to update a bunch of classes. Specifically, some methods' signatures were changed due to the fact that some classes changed names. What happens now is that the library compiles fine on its own, but, when added to an app project, the project fails to link: Ld build/Sucursales.build/Debug-iphoneos/Sucursales.build/Objects-normal/armv6/Sucursales normal armv6 cd /Users/nameghino/src/Sucursales setenv IPHONEOS_DEPLOYMENT_TARGET 3.1 setenv PATH "/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin" /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc-4.2 -arch armv6 -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.2.sdk -L/Users/nameghino/src/Sucursales/build/Debug-iphoneos -L/Users/nameghino/src/Sucursales/../../Library/MyLibraries/MSSharedLibrary-1.0.0 -F/Users/nameghino/src/Sucursales/build/Debug-iphoneos -filelist /Users/nameghino/src/Sucursales/build/Sucursales.build/Debug-iphoneos/Sucursales.build/Objects-normal/armv6/Sucursales.LinkFileList -dead_strip -lxml2 -ObjC -all_load -miphoneos-version-min=3.1 -framework Foundation -framework UIKit -framework CoreGraphics -lsqlite3.0 -framework CoreLocation -framework MapKit -lxml2 /Users/nameghino/src/MSSharedComponents/Frameworks/MSSharedLibrary/build/Debug-iphoneos/libMSSharedLibrary.a -o /Users/nameghino/src/Sucursales/build/Sucursales.build/Debug-iphoneos/Sucursales.build/Objects-normal/armv6/Sucursales Undefined symbols: "_OBJC_CLASS_$_DataCatalogService_GetSingleRow", referenced from: objc-class-ref-to-DataCatalogService_GetSingleRow in libMSSharedLibrary.a(MSDataCatalogSpecification.o) **"_OBJC_CLASS_$_DataCatalogService_ArrayOfString", referenced from: objc-class-ref-to-DataCatalogService_ArrayOfString in libMSSharedLibrary.a(MSDataCatalogSpecification.o) "_OBJC_CLASS_$_DataCatalogService_GetSingleRowResponse", referenced from: objc-class-ref-to-DataCatalogService_GetSingleRowResponse in libMSSharedLibrary.a(MSSingleRowResultsParser.o) "_OBJC_CLASS_$_DataCatalogService_GetMultiRowResponse", referenced from: objc-class-ref-to-DataCatalogService_GetMultiRowResponse in libMSSharedLibrary.a(MSMultiRowResultsParser.o) "_OBJC_CLASS_$_DataCatalogService_GetMultiRow", referenced from: objc-class-ref-to-DataCatalogService_GetMultiRow in libMSSharedLibrary.a(MSDataCatalogSpecification.o) "_OBJC_CLASS_$_DataCatalogService_HelloWorldResponse", referenced from: objc-class-ref-to-DataCatalogService_HelloWorldResponse in libMSSharedLibrary.a(DataCatalogService.o) ld: symbol(s) not found collect2: ld returned 1 exit status** The curious thing is that after a lot of project cleanups (both in the app and the lib projects), I still get the same issue. Even after starting a new project, the problem is still there. I've also taken care to restart Xcode between a clean and a build a couple of times, but no good. Any ideas on where to look? Thanks in advance Nico

    Read the article

1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >