Search Results

Search found 771 results on 31 pages for 'johnny coder'.

Page 13/31 | < Previous Page | 9 10 11 12 13 14 15 16 17 18 19 20  | Next Page >

  • Will <include> override the layout_width/layout_height value?

    - by Johnny
    I have a layout xml file named my_layout.xml, in which the root view's layout_width and layout_height has been specified as 200px. <com.jlee.demo.MyLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="horizontal" android:layout_width="200px" android:layout_height="200px"> If I used this xml to be included in another xml, and specify the layout_width and layout_height as 100px. <include layout="@layout/my_layout" android:layout_width="100px" android:layout_height="100px"/> What would be the real width/height of my_layout?

    Read the article

  • 401 Unauthorized returned on GET request (https) with correct credentials

    - by Johnny Grass
    I am trying to login to my web app using HttpWebRequest but I keep getting the following error: System.Net.WebException: The remote server returned an error: (401) Unauthorized. Fiddler has the following output: Result Protocol Host URL 200 HTTP CONNECT mysite.com:443 302 HTTPS mysite.com /auth 401 HTTP mysite.com /auth This is what I'm doing: // to ignore SSL certificate errors public bool AcceptAllCertifications(object sender, System.Security.Cryptography.X509Certificates.X509Certificate certification, System.Security.Cryptography.X509Certificates.X509Chain chain, System.Net.Security.SslPolicyErrors sslPolicyErrors) { return true; } try { // request Uri uri = new Uri("https://mysite.com/auth"); HttpWebRequest request = (HttpWebRequest)WebRequest.Create(uri) as HttpWebRequest; request.Accept = "application/xml"; // authentication string user = "user"; string pwd = "secret"; string auth = "Basic " + Convert.ToBase64String(System.Text.Encoding.Default.GetBytes(user + ":" + pwd)); request.Headers.Add("Authorization", auth); ServicePointManager.ServerCertificateValidationCallback = new System.Net.Security.RemoteCertificateValidationCallback(AcceptAllCertifications); // response. HttpWebResponse response = (HttpWebResponse)request.GetResponse(); // Display Stream dataStream = response.GetResponseStream(); StreamReader reader = new StreamReader(dataStream); string responseFromServer = reader.ReadToEnd(); Console.WriteLine(responseFromServer); // Cleanup reader.Close(); dataStream.Close(); response.Close(); } catch (WebException webEx) { Console.Write(webEx.ToString()); } I am able to log in to the same site with no problem using ASIHTTPRequest in a Mac app like this: NSURL *login_url = [NSURL URLWithString:@"https://mysite.com/auth"]; ASIHTTPRequest *request = [ASIHTTPRequest requestWithURL:login_url]; [request setDelegate:self]; [request setUsername:name]; [request setPassword:pwd]; [request setRequestMethod:@"GET"]; [request addRequestHeader:@"Accept" value:@"application/xml"]; [request startAsynchronous];

    Read the article

  • Parallelizing some LINQ to XML

    - by Lol coder
    How can I make this code run in parallel? List<Crop> crops = new List<Crop>(); //Get up to 10 pages of data. for (int i = 1; i < 10; i++) { //i is basically used for paging. XDocument document = XDocument.Load(string.Format(url, i)); crops.AddRange(from c in document.Descendants("CropType") select new Crop { //The data here. }); }

    Read the article

  • [NASM] How do I print out the content of a register in Hex

    - by Johnny ASM
    Hi, I'm currently getting started with NASM and wanted to know, how to output the contents of a register with NASM in Hexadecimal. I can output the content of eax with section .bss reg_buf: resb 4 . . . print_register: mov [reg_buf], eax mov eax, SYS_WRITE mov ebx, SYS_OUT mov ecx, reg_buf mov edx, 4 int 80h ret Let's say eax contains 0x44444444 then the output would be "DDDD". Apparently each pair of "44" is interpreted as 'D'. My ASCII table approves this. But how do I get my program to output the actual register content (0x44444444)?

    Read the article

  • What's happening between onResume and the activity is really displayed?

    - by Johnny
    I didn't nothing in the onResume of my Activity, but it still takes about 5 seconds between the onResume is called and the activity is really displayed. What's happening under there? Here is the code snip: onResume: @Override protected void onResume() { Log.d(TAG, "on resume >>>"); super.onResume(); } logcat: 05-28 10:36:05.621 D/LoginDialogActivity( 447): on resume >>> 05-28 10:36:06.231 I/ARMAssembler( 52): generated scanline__00000077:03010104_00000004_00000000 [ 22 ipp] (41 ins) at [0x3e3358:0x3e33fc] in 5646001 ns 05-28 10:36:10.690 I/ActivityManager( 52): Displayed activity com.aimi.appstore/.ui.activity.LoginDialogActivity: 5169 ms (total 5331 ms) AndroidManifest.xml: <activity android:name=".ui.activity.LoginDialogActivity" android:theme="@android:style/Theme.Dialog" />

    Read the article

  • where are the svn folders I checked in?

    - by johnny
    Trying to understand something. I created a d:\svn\repository on my server. I committed folders but when I go back to d:\svn\repository I do not see them. Are they all in a database? Will all my repositories go in that main folder and svn tracks them? What if I have two projects? Thank you.

    Read the article

  • Truncating double without rounding in C

    - by Coder
    Lets consider we have a double R = 99.999999; (which may be obtained by a result of some other computation),now the desired output is 99.99 I tried using printf("%.2lf",R); but it's rounding off the value.How to get the desired output ? (preferably using printf)

    Read the article

  • retrieve value from hashtable with clone of key; C#

    - by Johnny
    I would like to know if there is any possible way to retrieve an item from a hashtable using a key that is identical to the actual key, but a different object. I understand why it is probably not possible, but I would like to see if there is any tricky way to do it. My problem arises from the fact that, being as stupid as I am, I created hashtables with int[] as the keys, with the integer arrays containing indices representing spatial position. I somehow knew that I needed to create a new int[] every time I wanted to add a new entry, but neglected to think that when I generated spatial coordinate arrays later they would be worthless in retrieving the values from my hashtables. Now I am trying to decide whether to rearrange things so that I can store my values in ArrayLists, or whether to search through the list of keys in the Hashtable for the one I need every time I want to get a value, neither of the options being very cool. Unless of course there is a way to get //1 to work like //2! Thanks in advance. static void Main(string[] args) { Hashtable dog = new Hashtable(); //1 int[] man = new int[] { 5 }; dog.Add(man, "hello"); int[] cat = new int[] { 5 }; Console.WriteLine(dog.ContainsKey(cat)); //false //2 int boy = 5; dog.Add(boy, "wtf"); int kitten = 5; Console.WriteLine(dog.ContainsKey(kitten)); //true; }

    Read the article

  • javascript xmlhttprequest question.

    - by Johnny
    assumbe ie is still the dominate web browser, the XMLHttpRequest.responseText or XMLHttpRequest.responseXML in ie desire txt or xml/xhtml/html,but what about the server response the xmlHttprequest whith MIME TYPE octact/binary? would the response string all littele than 256 ?(every char of that string < 256), thanks very much for a straight answer, i have no webserver env,so i don't know how to test it out.

    Read the article

  • how to read in a list of custom configuration objects

    - by Johnny
    hi, I want to implement Craig Andera's custom XML configuration handler in a slightly different scenario. What I want to be able to do is to read in a list of arbitrary length of custom objects defined as: public class TextFileInfo { public string Name { get; set; } public string TextFilePath { get; set; } public string XmlFilePath { get; set; } } I managed to replicate Craig's solution for one custom object but what if I want several? Craig's deserialization code is: public class XmlSerializerSectionHandler : IConfigurationSectionHandler { public object Create(object parent, object configContext, XmlNode section) { XPathNavigator nav = section.CreateNavigator(); string typename = (string)nav.Evaluate("string(@type)"); Type t = Type.GetType(typename); XmlSerializer ser = new XmlSerializer(t); return ser.Deserialize(new XmlNodeReader(section)); } } I think I could do this if I could get Type t = Type.GetType("System.Collections.Generic.List<TextFileInfo>") to work but it throws Could not load type 'System.Collections.Generic.List<Test1.TextFileInfo>' from assembly 'Test1, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.

    Read the article

  • How do you get Microsoft Access 2007 32bit to show 64bit ODBC Drivers on Windows 7 64bit?

    - by johnny
    I followed the advice here: Windows 7 64 bit odbc drivers for Ms Access Missing but it does not apply. I have Oracle drivers that are 64bit. If I click the ODBC mmc in my admin tools I can see the DSN. In my properties of the ODBC administrator, it appears to be pointing to the 64bit version of the ODBC administrator, which is good: %windir%\system32\odbcad32.exe If I use this version of the ODBC administrator, I can see the Oracle drivers and my DSN via the mmc. When I go to Microsoft Access 2007 (32bit), however, and click external data, ODBC, my 32bit ODBC administrator is opening, which does not have the driver. Can Access 2007 32bit use a 64bit driver to connect to a database (oracle in this case)? The driver works fine in all other applications, just not Access. How can I get Access to use the 64bit ODBC administrator? EDIT: For clarification, the problem is that Access is opening the 32bit version, the syswow64 version. I need it to open the native 64bit version, which it is not opening. The problem is that Microsoft Access keeps opening the 32bit version. I need it to open the 64bit version. The MMC of the ODBC administrator is pointing to the 64bit version, but Microsoft Access keeps opening the 32bit version. I need it to open the 64bit version. Thanks for help.

    Read the article

  • HTML E-Mail as fileattachment

    - by johnny
    I have a Problem with Outlook 2010. I sent an E-Mail with a Contactform with this Code: $message = ' <html> <head> <title>Anfrage ('.$cfg->get('global.page.title').')</title> <style type="text/css"> body { background:#FFFFFF; color:#000000; } #tbl td { background:#F0F0F0; vertical-align:top; } #tbl2 td { background:#E0E0E0; vertical-align:top; } </style> </head> <body> <p>Mail von der Webseite '.$cfg->get('global.page.title').'</p> <table id="tbl"> <tr> <td>Absender</td> <td>'.htmlspecialchars($_POST['name']).' ('.htmlspecialchars(trim($_POST['email'])).')</td> </tr> <tr id="tbl2"> <td>Betreff:</td> <td>'.htmlspecialchars($_POST["topic"]).'</td> </tr> <tr> <td>Nachricht:</td> <td>'.nl2br(htmlspecialchars($_POST["message"])).'</td> </tr> </table> </body> </html>'; $absender = $_POST['name'].' <'.$_POST['email'].'>'; $header = "From: $absender\n"; $header .= "Reply-To: $absender\n"; $header .= "X-Mailer: PHP/" . phpversion(). "\n"; $header .= "X-Sender-IP: " . $_SERVER["REMOTE_ADDR"] . "\n"; $header .= "Content-Type: text/html; Charset=utf-8"; $send_mail = mail($cfg->get('contact.toMailAdress'), "Anfrage (".$cfg->get('global.page.title').")", $message, $header); //$send_mail = mail("[email protected]", "Anfrage (".$cfg->get('global.page.title').")", $message, $header); $_SESSION['kontakt_form_time'] = time(); $tpl->assign("mail_sent", $send_mail); When I sent the email, doesn't shows the message. it generates a File named [NAME].h. The Message is in this File. How can I fix that, that the message shows in the E-Mail. Is this a Problem about the settings in Outlook?

    Read the article

  • How do I merge a local branch into TFS

    - by Johnny
    hi, I did a stupid thing and branched my project on my local disk instead of doing it on the TFS. So now I have two projects on my disk: the old one which has TFS bindings and the new, which doesn't. I want to merge those changes back into the TFS project. How would I go about doing that? I can't do Compare because my local branch has no TFS bindings. There should be some way to compare the differences between the two projects locally and then meld the differences into the old project and check-in, but I can't find an easy way of doing that. Any other solutions?

    Read the article

  • how to find distinct digit set numbers over a range of integers?

    - by evil.coder
    Suppose i have a unsigned integer, call it low and one another call it high such that highlow. The problem is to find distinct digit set numbers over this range. For example, suppose low is 1 and high is 20 then the answer is 20, because all the numbers in this range are of distinct digit sets. If suppose low is 1 and high is 21, then the answer is 20, because 12 and 21 have same digit set i.e.1, 2. I am not looking for a bruteforce algo., if anyone has a better solution then a usual bruteforce approach, please tell..

    Read the article

  • can javascript process binary data?

    - by Johnny
    admit me describe my questions in situation-oriented way: assume IE is still the dominate web browser(the firefox have document for binary processing): the XMLHttpRequest.responseText or XMLHttpRequest.responseXML in ie desire txt or xml/xhtml/html,but what about the server response the xmlHttprequest whith MIME TYPE application/octet ? would the response string all little than 256 ?(every char of that string < 256), thanks very much for a straight answer, i have no webserver env,so i don't know how to test it out. because use txt or xml have a issue of character set encode, and i don't know how to process #[[[CDDATA node of one encoded xml(ex : utf-8,ascii,gb18030) with javascript, when i getNodeText, does the docObj return me byte or decoded char ? if it was decoded char which according to the header indicated charSet in the httpresponse , it would be all wrong. to avoid mess up with charSet ,i would like the server to response octet data and force strings data to be encoded as utf-8 but another charSet in the binary format. if the response is octal, so i guess the browser would not try to decode the response"txt" does this weird? or miss understanding the fundamental things? EDIT: I believe the question is asking this: Can Javascript safely process strings that aren't encoded in Unicode? What are the problems with trying to do so? EDIT: no no no , i means if http-header: content-type is "application/octet" , would the ie try to decoded it as (16bits Unicode | ie local setting charset ) when i get XMLHttpRequestobj.responseText use javascript ? or it(ie) just wrap every single byte of the response body as a javascript string, then every char in that string little than or equal 256 (char<=256), am i talking Mars language? sadly, if i were Marsizen,i would come as tourist without fuzzy questions. however i am in a country which share at least one property with Mars : RED

    Read the article

  • Difference between these two namespaces in javascript

    - by Lol coder
    First off, all I'm trying to do is to structure my javascript code properly. I've been told I must not have anything global. So I took the 2 types of namespaces declaration from this answer and now asking you guys for the pros and cons of each. var namespace1 = new function () { var internalFunction = function () { }; this.publicFunction = function () { }; }; var namespace2 = { publicFunction: function () { } }; Also, how do i have a private function in the last one namespace2?

    Read the article

  • Invalid argument for foreach()

    - by johnny-kessel
    Error I'm receiving Invalid argument supplied for foreach() The offending portions is this: foreach($subs[$id] as $id2 => $data2) Strange cause I'm using the same construct elsewhere and it works fine.. I'm using it to generate sub-categories and it works but I want to get rid of the error This is more context foreach($parents as $id => $data) { if($x == 0) { $html .= "<tr width='25%' class='row2'>"; } $shtml = ""; $i = 0; ***foreach($subs[$id] as $id2 => $data2)*** { $i++; if($i == 15) { $shtml .= $this->ipsclass->compiled_templates[ 'skin_businesses' ]->portal_categories_sub_row( $id2, $data2['cat_name'], 1 ) . ""; break; } else $shtml .= $this->ipsclass->compiled_templates[ 'skin_businesses' ]->portal_categories_sub_row( $id2, $data2['cat_name'], 0 ) . ""; }

    Read the article

  • Firebug kills -webkit Settings in CSS File - Why?

    - by Johnny
    style.css - Original File .box { -webkit-border-radius:8px; -moz-border-radius:8px; padding:10px; } style.css - In Firebug CSS Console .box { -moz-border-radius:8px 8px 8px 8px; padding:10px; } How can I force Firebug to show my -webkit css styles as well? Thanks for your help!

    Read the article

  • Incorrect sizing of a JPanel in a JScrollPane In Java 1.5

    - by Coder
    Hi, I am making an image loading component which consists of a JPanel containing a JScrollPane, which in turn contains another JPanel. What this component does is allows images to be dropped on top of it, after which point the image is loaded and the inner most JPanel is set to the size of the image dropped. This in turn causes the scroll bars to show up and the user can scroll the image. This all works fine. The problem comes in when i try to auto-shrink the image to the maximum visible area in the outer JPanel. In this case i do a uniform scale of the image to be less than or equal to the width and height of the outer JPanel. What happens now is that both the horizontal and vertical scroll bars show up indicating the the inner JPanel is bigger than the visible area (which should not be the case). I verified that the image is scale to the proper dimensions(ie. the maximum width and height is respected). I also verified that if i decrease the maximum height by 3 pixels, then no scroll bars appear. What i believe the problem is, is that panel.getWidth() and panel.getHeight() don't actually return the visible area (maximum area) that sub components can take up. Ie. there is likely some more width and height taken up by the border around the JPanel or something like that. My question is, how do i get around this problem. Functionally all i want is to determine the maximum size a JPanel can be in a JScrollPane, then set the panel to that size and paint an image over top of it and be assured that the scroll bars of the scroll pane will not show up. Right now the scroll bars are set to AS_NEEDED. Thanks!

    Read the article

  • Iphone geo location permission check

    - by Johnny Mast
    Dear Developers, Hi i have a quick question about the iphone (iOS) geolocation api's. Currenly i have a map in my application and the operating system will ask the user if it wants to allow the use of geolocations. Now thats all nice but the thing is i want to change my app when geolocations is allowed to a so called "Geo location" mode where new options are available or "standard" mode with less ui elements when permissions are not granted. What can i use to check if permission is granted?. So basicaly is that an api that tells me permission granted yes or no.

    Read the article

  • Should I begin Learning C# with C# 3 or C# 4 ?

    - by Naughty.Coder
    Should I learn C#3 or C#4 !? there are alot more books on C#3 than C#4 , would my programming abilities be outdated if I learned C#3 !? And another small question : there are books like : beginning Visual C# 2008 , and Illustrated C# 2008 . The question is : Do they mean the IDE when they mention Visual C# 2008 ?

    Read the article

  • Can't get precise layout on Nexus One

    - by Johnny
    I want to use precise layout on Nexus One, my code is like this: <LinearLayout android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="90px"> <ImageView android:layout_width="5px" android:layout_height="fill_parent" android:src="@drawable/d10" /> <ImageView android:layout_width="94px" android:layout_height="fill_parent" android:src="@drawable/d5" /> <ImageView android:layout_width="94px" android:layout_height="fill_parent" android:src="@drawable/d6" /> <ImageView android:layout_width="94px" android:layout_height="fill_parent" android:src="@drawable/d7" /> <ImageView android:layout_width="94px" android:layout_height="fill_parent" android:src="@drawable/d8" /> <ImageView android:layout_width="94px" android:layout_height="fill_parent" android:src="@drawable/d9" /> <ImageView android:layout_width="5px" android:layout_height="fill_parent" android:src="@drawable/d10" /> But it turns out on Nexus One, the screen width is not 480 px. So this LinearLayout will exceed the screen width. How should I fix this?

    Read the article

< Previous Page | 9 10 11 12 13 14 15 16 17 18 19 20  | Next Page >