Daily Archives

Articles indexed Sunday June 6 2010

Page 17/76 | < Previous Page | 13 14 15 16 17 18 19 20 21 22 23 24  | Next Page >

  • Moving a UIIMageView outside of a UIScrollView

    - by user359570
    Hello, At the bottom part of my main UIView, I've an UIScrollView with an UIImageView inside. I'd like to move the UIIMageView from the UIScrollView to the top part of my UIView. I'm able to move my UIImageView inside the UIScrollView, but outside, I can't. The UIImageView remains in the UIScrollView, it's parent. Any idea? Thanks in advance for any help. Best regards, Alx

    Read the article

  • .net design pattern question

    - by user359562
    Hi. I am trying to understand design pattern problems. I am trying to modify the code like this in winforms and trying to see if any design pattern suits my requirement. Please suggest which is the best design pattern in this scenario. This is very basic code containing 2 tab pages which might have different controls can be added dynamically and read out different files on click of particular tab. To elaborate more... I have written this code to learn and understand design pattern. This is just a scenario where user click on a particular tab which will show dynamic controls generated. public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void tabControl1_SelectedIndexChanged(object sender, EventArgs e) { if (tabControl1.SelectedTab.Name.Equals("tabPage1")) { GeneratedynamicControlsForTab1(); } else if (tabControl1.SelectedTab.Name.Equals("tabPage2")) { GeneratedynamicControlsForTab2(); } } private void GeneratedynamicControlsForTab1() { Label label1 = new Label(); label1.Text = "Label1"; tabPage1.Controls.Add(label1); ReadCSVFile(); } private void GeneratedynamicControlsForTab2() { tabPage1.Controls.Clear(); Label label2 = new Label(); label2.Text = "Label2"; tabPage2.Controls.Add(label2); ReadTextFile(); } private void ReadCSVFile() { } private void ReadTextFile() { } }

    Read the article

  • fresh installation of PGF/TikZ crashes, why?

    - by Vincenzo
    I have a clean CentOS 5.5 machine with tetex installed. Next, I installed PGF/TikZ: wget http://media.texample.net/pgf/builds/pgfCVS2010-06-02_TDS.zip unzip pgfCVS2010-06-02_TDS.zip \cp -r tex /usr/share/texmf texhash I'm trying to compile a simple document and this is what I'm getting: $ latex test.tex This is pdfeTeX, Version 3.141592-1.21a-2.2 (Web2C 7.5.4) entering extended mode (./test.tex LaTeX2e <2003/12/01> .. skipped .. (/usr/share/texmf/tex/latex/pgf/frontendlayer/tikz.sty (/usr/share/texmf/tex/latex/pgf/pgf.sty (/usr/share/texmf/tex/latex/graphics/graphicx.sty (/usr/share/texmf/tex/latex/graphics/graphics.sty (/usr/share/texmf/tex/latex/graphics/trig.sty) (/usr/share/texmf/tex/latex/graphics/graphics.cfg)))) (/usr/share/texmf/tex/latex/pgf/utilities/pgffor.sty (/usr/share/texmf/tex/latex/pgf/utilities/pgfrcs.sty (/usr/share/texmf/tex/generic/pgf/utilities/pgfutil-common.tex) (/usr/share/texmf/tex/generic/pgf/utilities/pgfutil-latex.def) (/usr/share/texmf/tex/generic/pgf/utilities/pgfrcs.code.tex)) (/usr/share/texmf/tex/latex/pgf/utilities/pgfkeys.sty (/usr/share/texmf/tex/generic/pgf/utilities/pgfkeys.code.tex (/usr/share/texmf/tex/generic/pgf/utilities/pgfkeysfiltered.code.tex))) (/usr/share/texmf/tex/generic/pgf/utilities/pgffor.code.tex)) (/usr/share/texmf/tex/generic/pgf/frontendlayer/tikz/tikz.code.tex (/usr/share/texmf/tex/generic/pgf/libraries/pgflibraryplothandlers.code.tex ! Undefined control sequence. \pgfsetplottension ...ttension {\pgf@sys@tonumber \pgf@x } l.104 \pgfsetplottension{0.5} ? I failed to find any clues in the net about this problem. On other servers I don't such a problem. Could anyone help please? Thanks! ps. Btw, I tried another build of PGF/TikZ, the older one, no luck :(

    Read the article

  • Only allow ssh connections to a specific domain

    - by Jared
    Hi, I have a server setup with several domains and subdomains. I'd like to limit ssh and sftp access so a user can only connect to xxx.domain1.com but I'm not sure where this is configured. Connecting via ay other domain/subdomain on the server should be refused. Thanks, J

    Read the article

  • ClickOnce Deplyment of an Application with more then one executable file

    - by Ahron Levi
    Hi I am trying to deploy an application with two executable files one of which is the application it self. I used the publish tub on the VS 2008 and tried to publish manually using the MageUI.exe. in both cases I get the "Reference in the manifest does not match the identity of the downloaded assembly" error in regards to the second executable file. Dose Any one know how to publish an application with two executable files? Thanks, Ahron

    Read the article

  • Outlook custom field

    - by Saurabh01
    I have added a custom filed and column in folder view. Now I want my column to be second just after the “from“column. How can I do it. My new column is text base and text content is “Yes” or “No”. If is No then I like the text color as Red. Is it possible to do that? Thanks in advance.

    Read the article

  • Can a binary tree or tree be always represented in a Database table as 1 table and self-referencing?

    - by Jian Lin
    I didn't feel this rule before, but it seems that a binary tree or any tree (each node can have many children but children cannot point back to any parent), then this data structure can be represented as 1 table in a database, with each row having an ID for itself and a parentID that points back to the parent node. That is in fact the classical Employee - Manager diagram: one boss can have many people under him... and each person under him can have n people under him, etc. This is a tree structure and is represented in database books as a common example as a single table Employee.

    Read the article

  • joomla component error

    - by ankur
    I have installed a joomla component and its working quite good but i am facing the problem that whenever i am trying to send mail by using the component iam always getting the message "Could not instantiate mail function." Please help me in getting the solution to the problem

    Read the article

  • What is the cheapest non-colocation way to serve about 10 static files at a rate of 100 megabits per

    - by Mark Maunder
    I've looked at Amazon S3 and it costs roughly $4746 per month for 100 megabits/s (which translates into 31,640 Gigabytes of data transferred. That's at a rate of $0.15 per gig.) I haven't found a cheaper "cloud" option. I'm curious if there's any other cloud hosting option out there cheaper than S3. Uptime is not an issue because I can build failover for most things into the browser. e.g. I can use javascript to say "if the image didn't load then go to this other URL instead." FYI I'm currently using a colocation facility which is about 30% cheaper than S3 and I'm familiar with colo prices - so this question is really about "cloud" services and by that I mean services where I don't have to worry about the infrastructure.

    Read the article

  • foldmethod=indent gets confused

    - by intuited
    Normally a great boon to humanity, on occasion vim's indent-based folding will get confused and need a reset via :set foldmethod=indent. Symptoms include the appearance of consecutive folded lines in the window. Is there a way to avoid having this happen? Is it just me?

    Read the article

  • Null Reference Exception In LINQ DataContext

    - by Frank
    I have a Null Reference Exception Caused by this code: var recentOrderers = (from p in db.CMS where p.ODR_DATE > DateTime.Today - new TimeSpan(60, 0, 0, 0) select p.SOLDNUM).Distinct(); result = (from p in db.CMS where p.ORDER_ST2 == "SH" && p.ODR_DATE > DateTime.Today - new TimeSpan(365, 0, 0, 0) && p.ODR_DATE < DateTime.Today - new TimeSpan(60, 0, 0, 0) && !(recentOrderers.Contains(p.SOLDNUM))/**/ select p.SOLDNUM).Distinct().Count(); result is of double type. When I comment out: !(recentOrderers.Contains(p.SOLDNUM)) The code runs fine. I have verified that recentOrderers is not null, and when I run: if(recentOrderes.Contains(0)) return; Execution follows this path and returns. Not sure what is going on, since I use similar code above it: var m = (from p in db.CMS where p.ORDER_ST2 == "SH" select p.SOLDNUM).Distinct(); double result = (from p in db.CUST join r in db.DEMGRAPH on p.CUSTNUM equals r.CUSTNUM where p.CTYPE3 == "cmh" && !(m.Contains(p.CUSTNUM)) && r.ColNEWMEMBERDAT.Value.Year > 1900 select p.CUSTNUM).Distinct().Count(); which also runs flawlessly. After noting the similarity, can anyone help? Thanks in advance. -Frank GTP, Inc.

    Read the article

  • inserting a form to session raises picklingerror - django

    - by shanyu
    I receive an exception when I add a form to the session: PicklingError: Can't pickle <class 'django.utils.functional.__proxy__'>: attribute lookup django.utils.functional.__proxy__ failed The form includes a few simple fields and has some javascript attached to a widget. It might be that Django forms cannot be pickled at all, but the exception seems to point to unicode lazy translation. To test further, I have also tried to insert only the form errors (an errordict) to the session and received the same error. I appreciate some help here, thanks in advance. EDIT: Here's why I insert a form into the session: I have an app that has a form. This form is rendered by a template tag in another app. When posted, if the form is valid, no problem, I do stuff and redirect to "next". However if it is not valid, I want to go back to the posting page to show errors. Recall that the comments app in this case redirects to an intermediate "hey, please fix the errors" page. I am trying to avoid this, and hence redirect back to the posting page with the form and its errors in the session that the template tag will render.

    Read the article

  • Convert a Relative URL to an Absolute URL in Actionscript / Flex

    - by Bear
    I am working with Flex, and I need to take a relative URL source property and convert it to an absolute URL before loading it. The specific case I am working with involves tweaking SoundEffect's load method. I need to determine if a file will be loaded from the local file system or over the network from looking at the source property, and the easiest way I've found to do this is to generate the absolute URL. I'm having trouble generating the absolute URL for sound effect in particular. Here were my initial thoughts, which haven't worked. Look for the DisplayObject that the Sound Effect targets, and use its loaderInfo property. The target is null when the SoundEffect loads, so this doesn't work. Look at FlexGlobals.topLevelApplication, at the url or loaderInfo properties. Neither of these are set, however. Look at the FlexGlobals.topLevelApplication.systemManager.loaderInfo. This was also not set. The SoundEffect.as code basically boils down to var url:String = "mySound.mp3"; /*>> I'd like to convert the URL to absolute form here and tweak it as necessary <<*/ var req:URLRequest = new URLRequest(url); var loader:Loader = new Loader(); loader.load(req); Does anyone know how to do this? Any help clarifying the rules of how relative urls are resolved for URLRequests in ActionScript would also be much appreciated. edit I would also be perfectly satisfied with some way to tell whether the url will be loaded from the local file system or over the network. Looking at an absolute URL it would just be easy to look at the prefix, like file:// or http://.

    Read the article

  • Why in Ruby, a || 1 will throw an error when `a` is undefined, but a = a || 1 will not?

    - by Jian Lin
    When a is undefined, then a || 1 will throw an error, but a = a || 1 will not. Isn't that a little bit inconsistent? irb(main):001:0> a NameError: undefined local variable or method `a' for main:Object from (irb):1 from c:/ruby/bin/irb:12:in `<main>' irb(main):002:0> a || 1 NameError: undefined local variable or method `a' for main:Object from (irb):2 from c:/ruby/bin/irb:12:in `<main>' irb(main):003:0> a = a || 1 => 1

    Read the article

  • Lucene search taking TOOO long.

    - by Josh Handel
    I;m using Lucene.net (2.9.2.2) on a (currently) 70Gig index.. I can do a fairly complicated search and get all the document IDs back in 1 ~ 2 seconds.. But to actually load up all the hits (about 700 thousand in my test queries) takes 5+ minutes. We aren't using lucene for UI, this is a datastore between processes where we have hundreds of millions of pre-cached data elements, and the part I am working on exports a few specific fields from each found document. (ergo, pagination doesn't make since as this is an export between processes). My question is what is the best way to get all of the documents in a search result? currently I am using a custom collector that does a get on the document (with a MapFieldSelector) as its collecting.. I've also tried iterating through the list after the collector has finished.. but that was even worse. I'm open to ideas :-). Thanks in advance.

    Read the article

  • ClickOnce Deployment of an Application with more then one executable file

    - by Ahron Levi
    Hi I am trying to deploy an application with two executable files one of which is the application it self. I used the publish tub on the VS 2008 and tried to publish manually using the MageUI.exe. in both cases I get the "Reference in the manifest does not match the identity of the downloaded assembly" error in regards to the second executable file. Dose Any one know how to publish an application with two executable files? Thanks, Ahron

    Read the article

  • Can I read Captcha data from JavaScript in a secure way ?

    - by Space Cracker
    We use Captcha control in a registration form that we make full client validation for all fields in JavaScript ( JQuery ) beside server validation .. I tried a lot of ways but all will write the Captcha value in JavaScript that can be accessed by anyone :( I search if is there any way that allow me validate Captcha value in client side using JQuery in secure way or it can't be done ?

    Read the article

  • destructor and copy-constructor calling..(why does it get called at these times)

    - by sil3nt
    Hello there, I have the following code #include <iostream> using namespace std; class Object { public: Object(int id){ cout << "Construct(" << id << ")" << endl; m_id = id; } Object(const Object& obj){ cout << "Copy-construct(" << obj.m_id << ")" << endl; m_id = obj.m_id; } Object& operator=(const Object& obj){ cout << m_id << " = " << obj.m_id << endl; m_id = obj.m_id; return *this; } ~Object(){ cout << "Destruct(" << m_id << ")" << endl; } private: int m_id; }; Object func(Object var) { return var; } int main(){ Object v1(1); cout << "( a )" << endl; Object v2(2); v2 = v1; cout << "( b )" << endl; Object v4 = v1; Object *pv5; pv5 = &v1; pv5 = new Object(5); cout << "( c )" << endl; func(v1); cout << "( d )" << endl; delete pv5; } which outputs Construct(1) ( a ) Construct(2) 2 = 1 ( b ) Copy-construct(1) Construct(5) ( c ) Copy-construct(1) Copy-construct(1) Destruct(1) Destruct(1) ( d ) Destruct(5) Destruct(1) Destruct(1) Destruct(1) I have some issues with this, firstly why does Object v4 = v1; call the copy constructor and produce Copy-construct(1) after the printing of ( b ). Also after the printing of ( c ) the copy-constructor is again called twice?, Im not certain of how this function works to produce that Object func(Object var) { return var; } and just after that Destruct(1) gets called twice before ( d ) is printed. sorry for the long question, I'm confused with the above.

    Read the article

  • link clickable and wordwrap

    - by newinjs
    hi, i'm using php wordwrap for my comment box. This is my clickable function, function clickable_link($text) { $ret = ' ' . $text; $ret = preg_replace("#(^|[\n ])([\w]+?://[\w\#$%&~/.\-;:=,?@\[\]+]*)#is", "\\1<a class=\"hrefLink\" href=\"\\2\" target=\"_blank\">\\2</a>", $ret); $ret = preg_replace("#(^|[\n ])((www|ftp)\.[\w\#$%&~/.\-;:=,?@\[\]+]*)#is", "\\1<a class=\"hrefLink\" href=\"http://\\2\" target=\"_blank\">\\2</a>", $ret); $ret = preg_replace("#(^|[\n ])([a-z0-9&\-_.]+?)@([\w\-]+\.([\w\-\.]+\.)*[\w]+)#i", "\\1<a href=\"mailto:\\2@\\3\">\\2@\\3</a>", $ret); $ret = substr($ret, 1); return $ret; } and this is my wordwrap for comment $comment = clickable_link($comment); $comment = wordwrap($comment, 25, "\n", false); so, once the word limit for 25 is reached, my comment box break my link http://www.websitetitle.com/showthread.php?t=2000 link become like this http://www.websitetitle.com/showthread.php? <br> t=2000 The link is broken. so is it possible to fix the link or any other workaround? Thank you

    Read the article

  • how do I use tar -C on Snow Leopard when creating an archive ?

    - by ssc
    The man page states -C directory In c and r mode, this changes the directory before adding the following files. However, tar does not change to the directory I specify, but instead reports tar: <folder name>: Cannot stat: No such file or directory for every folder in the directory I run the tar command in. Do I really have to do something like cd <folder> && tar ... && cd - or is there a way to get this work ?

    Read the article

< Previous Page | 13 14 15 16 17 18 19 20 21 22 23 24  | Next Page >