Daily Archives

Articles indexed Sunday March 13 2011

Page 4/10 | < Previous Page | 1 2 3 4 5 6 7 8 9 10  | Next Page >

  • can anyone explain the why the the 1st example gets different results than the following 2

    - by klumsy
    $b = (2,3) $myarray1 = @(,$b,$b) $myarray1[0].length #this will be 1 $myarray1[1].length $myarray2 = @( ,$b ,$b ) $myarray2[0].length #this will be 2 $myarray[1].length $myarray3 = @(,$b ,$b ) $myarray3[0].length #this will be 2 $myarray3[1].length UPDATE I think on #powershell IRC we have worked it out, Here is another example that demonstrates the danger of breaking with the comma on the following line rather than the top line when listing multiple items in an array over multiple lines. $b = (1..20) $a = @( $b, $b ,$b, $b, $b ,$b) for($i=0;$i -lt $a.length;$i++) { $a[$i].length } "--------" $a = @( $b, $b ,$b ,$b, $b ,$b) for($i=0;$i -lt $a.length;$i++) { $a[$i].length } produces 20 20 20 20 20 20 -------- 20 20 20 1 20 20 I'm curious how people will explain this. I think i understand it now, but would have trouble explaining it in a concise understandable fashion, though the above example goes somewhat towards that goal.

    Read the article

  • Determining if object is visible and clickable

    - by Alan Mendelevich
    I'm looking for ways to effectively determine if a control is actually visible and clickable. I mean beyond checking Visibility property of the object. I can check RenderSize and that would be [0,0] if any of the parent elements is collapsed. So this is simple too. I can also traverse up the visual tree and see if Opacity of all elements is set to 1. What I don't know how to check nicely are these scenarios: The object is obstructed by some other object. Obviously it's possible to use FindElementsInHostCoordinates() and do computations to find out how much these objects obstruct but this could be an overkill. I can also make a "screenshot" of the object in question and "screenshot" of the whole page and check if pixels where my object should be match the actual object pixels. That sounds like an overkill too. The object is obstructed by a transparent object that still "swallows" clicks (taps). The workarounds for the first problem could still fail in this scenario. Any better ideas? Do I miss something? Thanks!

    Read the article

  • UITabBarController not showing all view controllers

    - by rounak
    My UITabBarcontroller has two view controllers -Favorites -Keypad I add these two controllers in an array in the order Favorites,Keypad,nil. When the app is launched only the Favorites tab appears in the tabbar, I have to click the second tab for the "Keypad" (Title of the viewController) text to appear on the tabbar. How do I make the tabbar have the title of both the view controllers at startup itself?

    Read the article

  • Hierarchy inheritance

    - by reito
    I had faced the problem. In my C++ hierarchy tree I have two branches for entities of difference nature, but same behavior - same interface. I created such hierarchy trees (first in image below). And now I want to work with Item or Base classes independetly of their nature (first or second). Then I create one abstract branch for this use. My mind build (second in image below). But it not working. Working scheme seems (third in image below). It's bad logic, I think... Do anybody have some ideas about such hierarchy inheritance? How make it more logical? More simple for understanding? Image Sorry for my english - russian internet didn't help:) Update: You ask me to be more explicit, and I will be. In my project (plugins for Adobe Framemaker) I need to work with dialogs and GUI controls. In some places I working with WinAPI controls, and some other places with FDK (internal Framemaker) controls, but I want to work throw same interface. I can't use one base class and inherite others from it, because all needed controls - is a hierarchy tree (not one class). So I have one hierarchy tree for WinAPI controls, one for FDK and one abstract tree to use anyone control. For example, there is an Edit control (WinEdit and FdkEdit realization), a Button control (WinButton and FdkButton realization) and base entity - Control (WinControl and FdkControl realization). For now I can link my classes in realization trees (Win and Fdk) with inheritence between each of them (WinControl is base class for WinButton and WinEdit; FdkControl is base class for FdkButton and FdkEdit). And I can link to abstract classes (Control is base class for WinControl and FdkControl; Edit is base class for WinEdit and FdkEdit; Button is base class for WinButton and FdkButton). But I can't link my abstract tree - compiler swears. In fact I have two hierarchy trees, that I want to inherite from another one. Update: I have done this quest! :) I used the virtual inheritence and get such scheme (http://img12.imageshack.us/img12/7782/99614779.png). Abstract tree has only absolute abstract methods. All inheritence in abstract tree are virtual. Link from realization tree to abstract are virtual. On image shown only one realization tree for simplicity. Thanks for help!

    Read the article

  • Locating the UIView that UITableView scrolls over

    - by Coocoo4Cocoa
    Hi all, I'm working on trying to obtain the UIView that UITableView scrolls over, if scrolling is enabled. Typically, the background is white, and if you push the UITableView out of its bounds, you'll see a background. I'm trying to set this background to a UIColor of blackColor. I can't seem to find the appropriate one to tag. I've tried the following code in my UIViewController: - (void)loadView { [super loadView]; UITableView *aTableView = [[[UITableView alloc] initWithFrame:self.view.bounds style:UITableViewStylePlain] autorelease]; [aTableView setScrollEnabled:YES]; [self.view setBackgroundColor:[UIColor blackColor]]; [self.view addSubview:aTableView]; self.tableView = aTableView; } The color still stays white. Seems I'm hitting the wrong UIView. Any idea? Thanks.

    Read the article

  • Can anyone share a code snippet to Update Google Documents

    - by Sana
    Hi, I am relentlessly trying to update an existing google doc with the Google Protocol Data API, but the contents do not get updated, even though the PUT runs perfectly fine with a return response code of 200. Here is the code that I am using try { HttpRequest requestPost = transport.buildPutRequest(); requestPost.url = DocsUrl.forUploadingFile(editLink); ((GoogleHeaders) requestPost.headers).setSlugFromFileName("books1.xml"); InputStreamContent content = new InputStreamContent(); File file = new File("//sdcard/books.xml"); content.setFileInput(file); content.type = "text/plain"; content.length = file.length(); System.out.println("Length of the file = "+content.length); requestPost.content = content; HttpResponse responseUpload = requestPost.execute(); System.out.println("Uploading code = "+responseUpload.statusCode); } catch (FileNotFoundException e) { e.printStackTrace(); } catch (ClientProtocolException e) { System.out.println("Client Protocol Exception"); } catch (IOException e) { handleException(e); } where editLink is the editLink edit-media link returned from google doc feeds.

    Read the article

  • Why is order important in moving from tab to tab programmatically (and new in 1.8.10

    - by Bruce
    Hi folks, Up until I updated to jquery-ui-1.8.10 (already using jQuery 1.5), the following code has worked as expected: case 'baseeditor': $('#tab1').html(responseText).fadeIn(500, function() { ... load the contents of the tab and stuff... }); $("#prolearn").tabs("select",1); break; case ... The tab is fueled and then focus is moved from tab0 (from where the ajax call is initiated) to tab1. Now, that code won't work, but this version does: case 'baseeditor': $("#prolearn").tabs("select",1); $('#tab1').html(responseText).fadeIn(500, function() { ... load the contents of the tab and stuff... }); break; case ... Can someone explain the difference - have I just been lucky getting away with my original version? Thanks/Bruce

    Read the article

  • Help to resolve 'Out of memory' exception when calling DrawImage

    - by Jack Juiceson
    Hi guys, About one percent of our users experience sudden crash while using our application. The logs show below exception, the only thing in common that I've seen so far is that, they all have XP SP3. Thanks in advance Out of memory. at System.Drawing.Graphics.CheckErrorStatus(Int32 status) at System.Drawing.Graphics.DrawImage(Image image, Rectangle destRect, Int32 srcX, Int32 srcY, Int32 srcWidth, Int32 srcHeight, GraphicsUnit srcUnit, ImageAttributes imageAttrs, DrawImageAbort callback, IntPtr callbackData) at System.Drawing.Graphics.DrawImage(Image image, Rectangle destRect, Int32 srcX, Int32 srcY, Int32 srcWidth, Int32 srcHeight, GraphicsUnit srcUnit, ImageAttributes imageAttr, DrawImageAbort callback) at System.Drawing.Graphics.DrawImage(Image image, Rectangle destRect, Int32 srcX, Int32 srcY, Int32 srcWidth, Int32 srcHeight, GraphicsUnit srcUnit, ImageAttributes imageAttr) at System.Windows.Forms.ControlPaint.DrawBackgroundImage(Graphics g, Image backgroundImage, Color backColor, ImageLayout backgroundImageLayout, Rectangle bounds, Rectangle clipRect, Point scrollOffset, RightToLeft rightToLeft) at System.Windows.Forms.Control.PaintBackground(PaintEventArgs e, Rectangle rectangle, Color backColor, Point scrollOffset) at System.Windows.Forms.Control.PaintBackground(PaintEventArgs e, Rectangle rectangle) at System.Windows.Forms.Control.OnPaintBackground(PaintEventArgs pevent) at System.Windows.Forms.ScrollableControl.OnPaintBackground(PaintEventArgs e) at System.Windows.Forms.Control.PaintTransparentBackground(PaintEventArgs e, Rectangle rectangle, Region transparentRegion) at System.Windows.Forms.Control.PaintBackground(PaintEventArgs e, Rectangle rectangle, Color backColor, Point scrollOffset) at System.Windows.Forms.Control.PaintBackground(PaintEventArgs e, Rectangle rectangle) at System.Windows.Forms.Control.OnPaintBackground(PaintEventArgs pevent) at System.Windows.Forms.ScrollableControl.OnPaintBackground(PaintEventArgs e) at System.Windows.Forms.Control.PaintTransparentBackground(PaintEventArgs e, Rectangle rectangle, Region transparentRegion) at System.Windows.Forms.Control.PaintBackground(PaintEventArgs e, Rectangle rectangle, Color backColor, Point scrollOffset) at System.Windows.Forms.Control.PaintBackground(PaintEventArgs e, Rectangle rectangle) at System.Windows.Forms.Control.OnPaintBackground(PaintEventArgs pevent) at System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer, Boolean disposeEventArgs) at System.Windows.Forms.Control.WmPaint(Message& m) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam) Operation System Information ---------------------------- Name = Windows XP Edition = Home Service Pack = Service Pack 3 Version = 5.1.2600.196608 Bits = 32

    Read the article

  • What is the flag to show the nesting of views in a Mac app?

    - by theMikeSwan
    I have just spet the last few hours trying to find the flag to use in Terminal to launch an app with the colored outlines around the various view elements to show how they are nested. I know that Matt Gemmell covered it during the Cocoa Face Off session of NSConference 2009 (at about the 13minute mark in the video). Unfortunately I can't actually read what he types and he doesn't speak the exact command. I know it has to be in the Apple docs somewhere but the search system is currently not being of any use. It looks like her just adds -showAllViews YES to the end of the command to open TextEdit but that command has no effect in 10.6.6. I have also tried every other capitalization I can think of as well as using view instead of views. Every command opens TextEdit just fine but doesn't show the colored outlines.

    Read the article

  • How can i pasta the selected region outside emacs

    - by luthur
    i am using Mac os and emacs -nw(the terminal mode) i don't know how can i pasta things (having been implemented by M-w in emacs -nw) outside the emacs. i know that the emacs -ns can do it Searching from the internet and the command C-h b, i find out that method, but it didn't work out. (setq x-select-enable-clipboard t) (setq interprogram-cut-function 'x-select-text) i don't got to know well about the argument of interprogram-cut-function. Where the x-select-text come from and What it means? Help me with that.Thanks a lot.

    Read the article

  • android checkbox box issue

    - by raqz
    i have this check box in a alertdialog. when i try to check the state of the checkbox, the application force closes. any idea why? LayoutInflater factory = LayoutInflater.from(NewActivity.this); final View textDisplayView = factory.inflate(R.layout.nearestlocs, null); final AlertDialog.Builder newAlert = new AlertDialog.Builder(NewActivity.this); newAlert.setView(textDisplayView); final CheckBox checkBoxLab = (CheckBox) findViewById(R.id.checkboxlab); newAlert.setPositiveButton("Display on Map", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int whichButton) { if(checkBoxLab.isChecked()){ libDisplayFlag = true; } error log 03-13 08:01:58.273: ERROR/AndroidRuntime(6188): Uncaught handler: thread main exiting due to uncaught exception 03-13 08:01:58.292: ERROR/AndroidRuntime(6188): java.lang.NullPointerException 03-13 08:01:58.292: ERROR/AndroidRuntime(6188): at com.isproj3.NewActivity$3.onClick(NewActivity.java:158) 03-13 08:01:58.292: ERROR/AndroidRuntime(6188): at com.android.internal.app.AlertController$ButtonHandler.handleMessage(AlertController.java:158) 03-13 08:01:58.292: ERROR/AndroidRuntime(6188): at android.os.Handler.dispatchMessage(Handler.java:99) xml <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent"> <LinearLayout android:orientation="horizontal" android:gravity="center" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_weight="1"> <CheckBox android:id="@+id/checkboxlib" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Library" android:gravity="left" android:textColor="#FF0000" android:paddingBottom="5px" android:textSize="07pt" android:checked="true" /> <TextView android:id="@+id/librarytext" android:layout_width="wrap_content" android:layout_height="wrap_content" android:gravity="center" android:paddingBottom="5px" android:textSize="8pt" /> </LinearLayout> </LinearLayout>

    Read the article

  • Replace your SKY+ HD Hard drive

    - by BizTalk Visionary
    As there are a number of different unit types there are a number of links provided here: If you wish to upgrade the Amstrad HD Box, please use this guide. How to upgrade the Hard Drive of your Amstrad HD box If you wish to upgrade the Thomson HD Box, please use this guide. How to upgrade the Hard Drive in your Thomson HD Box. If you wish to upgrade the Pace HD Box, please use this guide. How to upgrade the Hard Drive in your Pace HD Box If you wish to upgrade the Samsung HD Box, please use this guide. How to upgrade the Hard Drive in your Samsung HD Box I recommend you use a Hitachi DeskStar 1TB Hard Drive SATAII 7200rpm 16MB Cache

    Read the article

  • Web Platform Installer issues deploying Azure SDK 1.4 on refreshed systems.

    - by Enrique Lima
    Recently I have been doing quite a bit of testing on different means to deploy the Azure SDKs and such. After a very successful couple of systems, I started running into issues last night. Here is the problem, if I go to the Windows Azure Website, and go to Develop, then click on the SDK and Tools, then Get Tools & SDK, it launches the Web Platform Installer.  All seems well at that point, except it will go through the initial process, will find the SDK files for 1.4, but since the tools for Visual Studio are still 1.3, the location throws back a 404, which causes the Installer to fail.  NOTE:If you already had SDK 1.3 and the tools in place, it will go through. The fix is to go directly to the Microsoft Download Center location and download the files.  Here is the link … http://www.microsoft.com/downloads/en/details.aspx?FamilyID=7a1089b6-4050-4307-86c4-9dadaa5ed018

    Read the article

  • Copyrights, Trademarks, Patents - Oh My!

    - by kennedysteve
    Good references when looking to see if someone really legally owns a name, copyright, etc. Copyrights = http://cocatalog.loc.gov/ Trademarks = http://tess2.uspto.gov Patents = http://patft.uspto.gov/ Website Address = http://www.internic.net/whois.html   Copyright Copyright, a form of intellectual property law, protects original works of authorship including literary, dramatic, musical, and artistic works, such as poetry, novels, movies, songs, computer software, and architecture. Copyright does not protect facts, ideas, systems, or methods of operation, although it may protect the way these things are expressed.   Trademark A trademark protects words, phrases, symbols, or designs identifying the source of the goods or services of one party and distinguishing them from those of others.   Patents Set of exclusive rights to an inventor for a limited period of time in exchange for a public disclosure of an invention.   Website Address (aka "Domain name") The core portion of a website name (such as "apple.com" or "msn.com") of a web site, which is uniquely registered to an individual or company (also found to the right of the @ sign in an email address such as "[email protected]".)   Side note #1. LLC Company Names appear to be registered and maintained by state only. If you want to reserve a LLC name nation wide, you may have to register with each state.   Side note #2. The copyright office's FAQ has a question called "How do I protect my sighting of Elvis?". No kidding. Check it out. http://www.

    Read the article

  • poorman's redandunt domain name server array

    - by John
    Can I configure my domain, example.com's name servers as: ns1.dyndns.com ns2.dyndns.com ns1.opendns.com ns2.opendns.com That is, combining free dns services to create a redundant name server array? Note these name servers from different companies are not aware other companies' name servers also serve our domain. In case one company, say, ns1(2).dyndns.com is down, will people experience interruption when visiting my example.com? If one name server is unreachable, the next name server will be tried, or?

    Read the article

  • Which VPN-Software for Road-Worriors

    - by Phoibe
    Hello, I am using Unix (Debian) as my server platform and want to configure the following: A remote user can connect to a secure VPN server and use its IP to access the Internet, mostly for browsing and e-mail. I read a lot about OpenS/WAN+L2PT and OpenVPN but I am still confused how I should configure it. I would prefer IPSec+PPTP/L2PT since the road warrior doesn't have to install any extra software on iPhone/Windows7. Is there a good how-to for IPSec or what would you suggest?

    Read the article

  • LDAP loginShell on platforms with different paths

    - by neoice
    I'm using LDAP to deal with users and authentication across my network. I'm now adding FreeBSD hosts and have hit a problem with login shells. on Linux, shells tend to be in /bin/$shellname, so setting my login shell in LDAP to /bin/zsh works perfectly. on FreeBSD, /bin/zsh doesnt exist, I need to use /usr/local/bin/zsh. is there a solution to this? I imagine I might be able to make some sort of login-shell.sh script that LDAP passes out as the "shell" and then use the script to determine the actual shell for the user, but I'm not a fan of that idea. I'm using Debian and FreeBSD, both with a standard OpenLDAP/PAM/nss setup. edit: it looks like using /bin/sh and adding an exec $shell to .profile would "work", but that doesnt scale very well.

    Read the article

  • nginx howto correct the path from a back-end server redirect response under a virtual directory

    - by noname
    The following was my deployed servers: client ------ nginx proxy(example.com) ------ back-end server(192.168.1.20) The nginx proxy's external URL was configured under a virtual directory http://example.com/demo/ The back-end server was configure to http://192.168.1.20:8080/ the following was part of the nginx configure file: location /demo { proxy_pass http://192.168.1.20:8080/; proxy_redirect default; proxy_set_header Host $http_host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; } When the back-end server send a redirect response (HTTP CODE 302) with LOCATION head field "http://192.168.1.20/subdir/", the nginx map this LOCATION header field to "http://example.com/subdir/", not the disired "http://example.com/demo/subdir/"

    Read the article

  • vqadmin "invalid language file" with google chrome

    - by MrStatic
    We have been running our qmail setup for awhile with no issues. One of our admins has moved to Google Chrome as his main browser and we have noticed something odd. No matter what, when he loads the vqadmin page it errors on him with simply invalid language file. Yet if he loads Firefox, Opera, Safari or shudders IE8 it works fine. Searching google only results in 'Use IE' or 'Set english as your language in the browser'. A: I try to have people avoid IE if possible and B: There is no english option in Chrome.

    Read the article

  • MySQL, replacing &nbsp; with... nothing (delete those, please!)

    - by javipas
    I'm trying to purge my WordPress content from "false" carriage return (CR). These are caused after a migration of my content, that now presents from time to time a &nbsp; code that makes the web rendering engine to "paint" a CR where I would like to be nothing. The paragraphs seem to have a double CR because of this, and look too far apart. I'd like to be able to make a MySQL query in order to get rid of that strings, but at the moment I haven't found the key. What I've tried is UPDATE wp_posts set post_content = replace (post_content,'&nbsp;',' '); But i get <p> </p> where before were the &nbsp; strings. This seems not the answer at all. Could it have to be with the ampersand, and in that case, should I use something like &amp;nbsp; or something similar?

    Read the article

  • File permission set to 644 and wordpress cannot access them?

    - by Joel
    Hi everyone, I'm having problems with WordPress not be able to access files. When installing certain themes and plugins, it comes up with an error saying that it cannot create the directory. When I try to edit style.css it says that I need to make that file writable. The file permissions were set to 644. It wouldn't work until I changed the settings to 777 or 776. WordPress was installed by our local ISP. Anyone got any ideas? It seems that WordPress has not been setup properly. Is there anyway I can fix this without reinstalling the whole thing? Thanks, Joel

    Read the article

  • Use Port Binding Permissions on Windows

    - by Sharon
    This should be an easy one, but I can't find anything on it. I want to use IIS Express with my local user account to bind to a port on my netbios name. For example, http://computername:1315. My local user account doesn't have permission to do this, but I have administrator access on the machine. Anyone know how to grant permission to my local user account to bind to a port with my computer name instead of localhost? This is on Windows 7.

    Read the article

  • How do I setup a syslog server for my network?

    - by Solignis
    I would like to setup a syslog server to forward all log file from all of my VMs and servers. I really don't much about what is out there. So I turn to the community, Something on Linux is fine, what I want more is alert ability like emails telling me something is not right. If there was something to sort the logs by source that would be cool. Where would I want run the syslog server from? My admin WS or a server/VM? Any input would be wonderful. Thanks in advance.

    Read the article

  • Failed none and iptables

    - by Michael
    The problem is that when I ssh to my host with putty and enter user name, after that the password prompt delays. Found this is directly related to my iptables and can solve by changing default policy to ACCEPT. If default INPUT policy is ACCEPT, then password prompt is coming immediately. Mar 13 00:05:01 server-ubuntu sshd[6154]: Connection from 192.168.0.10 port 26304 Mar 13 00:05:06 server-ubuntu sshd[6154]: Failed none for acid from 192.168.0.10 port 26304 ssh2 However, if default INPUT policy is DROP, I got slight delay in getting password prompt after I enter username Mar 13 00:07:12 server-ubuntu sshd[6177]: Connection from 192.168.0.10 port 26333 Mar 13 00:07:35 server-ubuntu sshd[6177]: Failed none for acid from 192.168.0.10 port 26333 ssh2 For the second case, I tried to set default policy for FORWARD and OUTPUT chains to ACCEPT, but it didn't help. The only rule in this case is: -A INPUT -i eth1 -m mac --mac-source 00:26:XX:XX:XX:XX -j ACCEPT 00:26:XX:XX:XX:XX is the mac address from which I am trying to ssh to server's LAN(eth1). I'm sure there has to be some rule, which I can use while default INPUT chain policy is DENY in order to get password prompt immediately. I realize that the error message in the log is something normal and part of some verification procedure.

    Read the article

  • Apache internal test servers

    - by user74274
    I want to build a test system in the office. On one box I will install XAMPP. I will put a website that I want to test on that box. Now I do not want it connected to the Internet. So my plan is to use a reverse proxy to resolve things like ads and other external links. So I am thinking of using mod_proxy for that. Now my question is, How many boxes do I need? 1 for Xampp, 1 for mod_proxy and 1 for the server where mod proxy redirects them to. Total of three. But maybe I could do it with less. Can I run Mod_proxy on the first box? Is there a better way? Thanks

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10  | Next Page >