Search Results

Search found 2399 results on 96 pages for 'alex gosselin'.

Page 84/96 | < Previous Page | 80 81 82 83 84 85 86 87 88 89 90 91  | Next Page >

  • TableView Background image going over cell textLabel

    - by Alex Trott
    Currently my tableview looks like this: as you can see, cell.textLabel and cell.detailTextLable both load this background, and i can't work out how to get them to stop loading the background, and for it only to be the backing on the cell. Here's my current code to change the cell: - (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath { [cell setBackgroundColor:[UIColor colorWithPatternImage:[UIImage imageNamed:@"tableCell.png"]]]; } How can i get round this problem? Thanks in advance.

    Read the article

  • compare date split across colums

    - by alex-tech
    Greetings. I am querying tables from Microsoft SQL 2008 which have date split across 3 columns: day, month and year. Unfortunately, I do not have control over this because data is coming in to the database daily from a 3rd party source in that format. I need to add between to a where clause so user can pull records within a range. Would be easy enough if date was in a single column but finding it nearly impossible when its split across three columns. To display the date, I am doing a CAST( CAST(year as varchar(4)) + '-' + CAST(month as varchar(2)) + '-' + CAST(day as varchar(2)) as date) AS "date"` in a select. I tried to put it as a parameter for datediff function or just the regular between but get no results. Thanks for any help.

    Read the article

  • Empty files generated from running `mysqldump` using PHP

    - by alex
    I keep getting empty files generated from running $command = 'mysqldump --opt -h localhost -u username -p \'password\' dbname > \'backup 2009-04-15 09-57-13.sql\''; command($command); Anyone know what might be causing this? My password has strange characters in it, but works fine with connecting to the db. I've ran exec($command, $return) and outputted the $return array and it is finding the command. I've also ran it with mysqldump > file.sql and the file contains Usage: mysqldump [OPTIONS] database [tables] OR mysqldump [OPTIONS] --databases [OPTIONS] DB1 [DB2 DB3...] OR mysqldump [OPTIONS] --all-databases [OPTIONS] For more options, use mysqldump --help So it would seem like the command is working.

    Read the article

  • In a Windows forms application, how can I use a listbox in a DataGridView coloumn instead of a combo

    - by Alex
    I'm working on a windows forms application that uses a DataGridView. Some of the cells contain a DataGridViewComboBox. In some cases, I have several values to display in the combobox. For that scenario, it would be better to use a ListBox instead of a ComboBox. Is it possible to use a multi-column listbox within a DataGridView instead of a ComboBox? If so, can you point me in the right direction? Thanks much. Al D.

    Read the article

  • Responsive width for iPhone

    - by Alex Marchant
    This is my first time building a responsive site, and as I tailor the CSS for the iPhone I'm running into a problem. The styles all apply correctly, the text changes size and the wrapper changes widths. The problem is the iPhone browser still opens up at a huge width, see the screenshot: I'm using @media all and (max-device-width: 480px) {} to set the specific iPhone css. body {width:;} doesn't work. Thanks for the help :)

    Read the article

  • Retrieving an element by array index in jQuery vs the each() function.

    - by Alex Ciminian
    I was writing a "pluginable" function when I noticed the following behavior (tested in FF 3.5.9 with Firebug 1.5.3). $.fn.computerMove = function () { var board = $(this); var emptySquares = board.find('div.clickable'); var randPosition = Math.floor(Math.random() * emptySquares.length); emptySquares.each(function (index) { if (index === randPosition) { // logs a jQuery object console.log($(this)); } }); target = emptySquares[randPosition]; // logs a non-jQuery object console.log(target); // throws error: attr() not a function for target board.placeMark({'position' : target.attr('id')}); } I noticed the problem when the script threw an error at target.attr('id') (attr not a function). When I checked the log, I noticed that the output (in Firebug) for target was: <div style="width: 97px; height: 97px;" class="square clickable" id="8"></div> If I output $(target), or $(this) from the each() function, I get a nice jQuery object: [ div#8.square ] Now here comes my question: why does this happen, considering that find() seems to return an array of jQuery objects? Why do I have to do $() to target all over again? [div#0.square, div#1.square, div#2.square, div#3.square, div#4.square, div#5.square, div#6.square, div#7.square, div#8.square] Just a curiosity :).

    Read the article

  • Why is this span above the text? I want it beside the text.

    - by alex
    <td valign="center" colspan="2"> <a href="" class="table_desc" > <span class="desc_info_butt"></span> </a> text here </td> .desc_info_butt{ background:url(Description_Button.png) top left no-repeat; height:16px; width:16px; display:block; } For some reason, the image and text appear on two different lines!~

    Read the article

  • How to approach socket programming between C# -> Java (Android)

    - by Alex
    I've recently knocked up a server/client app for Windows & Android that allows one to send a file from Windows to an android phone over a socket connection. It works great for a single file but trying to send multiple files over in a single stream is causing me problems. I've also realised that aside from the binary data, I will need to send messages over the socket to indicate error states and other application messages. I have little experience with network programming and and wondering what is the best way forward. Basically the C# server side of the app just goes into a listening state and uses Socket.SendFile to transmit the file. On Android I use the standard Java Socket.getInputStream() to receive the file. That works great for a single file transfer, but how should I handle multiple files and error/messaging information? Do I need to use a different socket for each file? Should I be using a higher level framework to handle this or can I send everything over the single socket? Any other suggestions for frameworks or learning materials?

    Read the article

  • Logging errors in ASP.NET (MVC) through the Custom Error

    - by Alex
    In my web.config I have the following: <customErrors mode="RemoteOnly" defaultRedirect="/error.aspx"/> When an error occurs, the user is redirected to /error.aspx?aspxerrorpath=/somepage where I can get user's name, name of the page, date, but... I can't get the error message! I can get it via the OnException method, but then I won't be able to get the name of the page which is very important for me. How can I get both the page and the error message?

    Read the article

  • Text box input target iframe

    - by alex
    I'm an html noob and I just wanted to know if it's possible to make a text box in which you could type a website and when you click submit it will load the website in the iframe of your choice.

    Read the article

  • How to read large number of rows efficiently using Zend_Db?

    - by Alex N.
    Is there a simple :) and efficient way or reading very large number of rows sequentially using Zend_Db? Basically I need to process entire table, row by row. Table is large, primary key sequence is not guaranteed(i.e. not an autoincrement, but is UNSIGNED INT). What's the best way to approach this? Environment: PHP 5.2, Zend Framework 1.10, MySQL 5.1

    Read the article

  • null reference problems with c#

    - by alex
    Hi: In one of my window form, I created an instance of a class to do some works in the background. I wanted to capture the debug messages in that class and displayed in the textbox in the window form. Here is what I did: class A //window form class { public void startBackGroundTask() { B backGroundTask = new B(this); } public void updateTextBox(string data) { if (data != null) { if (this.Textbox.InvokeRequired) { appendUIDelegate updateDelegate = new appendUIDelegate(updateUI); try { this.Invoke(updateDelegate, data); } catch (Exception e) { Console.WriteLine(e.Message); } } else { updateUI(data); } } } private void updateUI(string data) { if (this.Textbox.InvokeRequired) { this.Textbox.Invoke(new appendUIDelegate(this.updateUI), data); } else { //update the text box this.Textbox.AppendText(data); this.Textbox.AppendText(Environment.NewLine); } } private delegate void appendUIDelegate(string data); } class B // background task { A curUI; public b( A UI) { curUI = UI; } private void test() { //do some works here then log the debug message to UI. curUI.updateTextBox("message); } } I keep getting a null reference exception after this.Invoke(updateDelegate, data); is called. I know passing "this" as a parameter is strange. But I want to send the debug message to my window form. Please help. Thanks

    Read the article

  • How do I change a MySQL table to UTF-8?

    - by alex
    I know there are many settings for a language for a table and a database. I already created the database. I believe when I created it, it was default/LATIN. I want to change everything-I mean...both the table and the database, to UTF-8. How can I do that? thanks.

    Read the article

  • Is it possible in Scala to force the caller to specify a type parameter for a polymorphic method ?

    - by Alex Kravets
    //API class Node class Person extends Node object Finder { def find[T <: Node](name: String): T = doFind(name).asInstanceOf[T] } //Call site (correct) val person = find[Person]("joe") //Call site (dies with a ClassCast inside b/c inferred type is Nothing) val person = find("joe") In the code above the client site "forgot" to specify the type parameter, as the API writer I want that to mean "just return Node". Is there any way to define a generic method (not a class) to achieve this (or equivalent). Note: using a manifest inside the implementation to do the cast if (manifest != scala.reflect.Manifest.Nothing) won't compile ... I have a nagging feeling that some Scala Wizard knows how to use Predef.<:< for this :-) Ideas ?

    Read the article

  • Sending a file to an API - C#

    - by alex
    I'm trying to use an API which sends a fax. I have a PHP example below: (I will be using C# however) <?php //This is example code to send a FAX from the command line using the Simwood API //It is illustrative only and should not be used without the addition of error checking etc. $ch = curl_init("http://url-to-api-endpoint"); $fax_variables=array( 'user'=> 'test', 'password'=> 'test', 'sendat' => '2050-01-01 01:00', 'priority'=> 10, 'output'=> 'json', 'to[0]' => '44123456789', 'to[1]' => '44123456780', 'file[0]'=>'@/tmp/myfirstfile.pdf', 'file[1]' => '@/tmp/mysecondfile.pdf' ); print_r($fax_variables); curl_setopt ($ch, CURLOPT_POST, 1); curl_setopt ($ch, CURLOPT_POSTFIELDS, $fax_variables); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $result=curl_exec ($ch); $info = curl_getinfo($ch); $result['http_code']; curl_close ($ch); print_r($result); ?> My question is - in the C# world, how would I achieve the same result? Do i need to build a post request? Ideally, i was trying to do this using REST - and constructing a URL, and using HttpWebRequest (GET) to call the API

    Read the article

  • Be notified of method calls in .NET

    - by Alex
    Basically, what I want to do is to be notified whenever a specific method has been called. I was hoping I could accomplish this using Reflection, but my attempts haven't gotten me anywhere yet, so I'm hoping that perhaps somebody else with the same need has accomplished this before and can enlighten me. I figured using MethodInfo was the way to go, but like I said, I found nothing there that could help me accomplish what I wanted to do. Any suggestions, hints or solutions would be greatly appreciated.

    Read the article

  • Project Euler #3

    - by Alex
    Question: The prime factors of 13195 are 5, 7, 13 and 29. What is the largest prime factor of the number 600851475143? I found this one pretty easy, but running the file took an extremely long time, it's been going on for a while and the highest number I've got to is 716151937. Here is my code, am I just going to have a wait or is there an error in my code? //User made class public class Three { public static boolean checkPrime(long p) { long i; boolean prime = false; for(i = 2;i<p/2;i++) { if(p%i==0) { prime = true; break; } } return prime; } } //Note: This is a separate file public class ThreeMain { public static void main(String[] args) { long comp = 600851475143L; boolean prime; long i; for(i=2;i<comp/2;i++) { if(comp%i==0) { prime = Three.checkPrime(i); if(prime==true) { System.out.println(i); } } } } }

    Read the article

  • Order mysql results without identifier

    - by Alex Crooks
    Usually I would have a table field called ID on auto increment. That way I could order using this field etc. However I have no control over the structure of a table, and wondered how to get the results in reverse order to default. I'm currently using $q = mysql_query("SELECT * FROM ServerChat LIMIT 15"); However like I said there is no field I can order on, so is there a way to tell mysql to reverse the order it gets the results? I.e last row to first row instead of the default.

    Read the article

< Previous Page | 80 81 82 83 84 85 86 87 88 89 90 91  | Next Page >