Search Results

Search found 2312 results on 93 pages for 'whats your favourite'.

Page 62/93 | < Previous Page | 58 59 60 61 62 63 64 65 66 67 68 69  | Next Page >

  • Php code not executing - dies out when trying to refer to member of static class - no error displaye

    - by Ali
    I'm having some problems with this piece of code. I've included a class declaration and trying to create an object of that class but my code dies out. It doesn't seem to be an include issue as all the files are being included even the files called for inclusion within the class file itself. However the object is not created - I tried to put an echo statement in the __construct function but nothing it just doesn't run infact doesn't create the object and the code won't continue from there - plus no error is reported or displayed and I have error reporting set to E_ALL and display errors set to true WHats happening here :( =============EDIT SOrry I checked again the error is prior to teh object creation thing - it dies out when it tries to refer to a constant in a static class like so: $v = Zend_Oauth::REQUEST_SCHEME_HEADER; THis is the class or part of it - it has largely static functions its the Zend Oauth class: class Zend_Oauth { const REQUEST_SCHEME_HEADER = 'header'; const REQUEST_SCHEME_POSTBODY = 'postbody'; const REQUEST_SCHEME_QUERYSTRING = 'querystring'; // continued LIke I said no error is being reported at all :(

    Read the article

  • Simplest way to extend doctrine for MVC Models

    - by RobertPitt
    Im developing my own framework that uses namespaces. Doctrine is already integrated into my auto loading system and im now at the stage where ill be creating the model system for my application Usually i would create a simple model like so: namespace Application\Models; class Users extends \Framework\Models\Database{} which would inherit all the default database model methods, But with Doctrine im still learning how it all works, as its not just a simple DBAL. I need to understand whats the part of doctrine my classes would extend where i can do the following: namespace Application\Models; class Users Extends Doctrine\Something\Table { public $__table_name = "users"; } And thus within the controller i would be able to do the following: public function Display($uid) { $User = $this->Model->Users->findOne(array("id" => (int)$id)); } Anyone help me get my head around this ?

    Read the article

  • alertDialog.getButton() method gives null pointer exception android

    - by Are
    Hi, Iam planing to give create 3 buttons with layout_weight=1, not interested in custom dialog.So I have written below code.It is not working.Always yes button gives me null. Whats wrong in this code? AlertDialog dialog= new AlertDialog.Builder(this).create(); dialog.setIcon(R.drawable.alert_icon); dialog.setTitle("title"); dialog.setMessage("Message"); dialog.setButton(AlertDialog.BUTTON_POSITIVE,"Yes", new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface arg0, int arg1) { } }); Button yesButton = dialog.getButton(AlertDialog.BUTTON_POSITIVE); Log.w("Button",""+yesButton);//here getting null LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT, 1f); yesButton.setLayoutParams(layoutParams); dialog.show(); Regards, Android developer.

    Read the article

  • database row/ record pointers

    - by David
    Hi I don't know the correct words for what I'm trying to find out about and as such having a hard time googling. I want to know whether its possible with databases (technology independent but would be interested to hear whether its possible with Oracle, MySQL and Postgres) to point to specific rows instead of executing my query again. So I might initially execute a query find some rows of interest and then wish to avoid searching for them again by having a list of pointers or some other metadata which indicates the location on a database which I can go to straight away the next time I want those results. I realise there is caching on databases, but I want to keep these "pointers" else where and as such caching doesn't ultimately solve this problem. Is this just an index and I store the index and look up by this? most of my current tables don't have indexes and I don't want the speed decrease that sometimes comes with indexes. So whats the magic term I've been trying to put into google? Cheers

    Read the article

  • How can I get the path separator in Perl?

    - by ram
    In case of Java, we can get the path separator using System.getProperty("path.separator"); Is there a similar way in Perl? All I want to do is to find a dir, immediate sub directory. Say I am being given two arguments $a and $b; I am splitting the first one based on the path separator and joining it again except the last fragment and comparing with the second argument. The problem is my code has to be generic and for that I need to know whats the system dependent path separator is?

    Read the article

  • Script to fix broken lines in a .txt file?

    - by Gravitas
    Hi, I'd love like to read books properly on my Kindle. To achieve my dream, I need a script to fix broken lines in a txt file. For example, if the txt file has this line: He watched Kahlan as she walked with her shoulders slumped down. ... then it should fix it by deleting the newline before the word "down": He watched Kahlan as she walked with her shoulders slumped down. So, fellow programmers, whats (a) the easiest way to do this and (b) the best language? p.s. The solution will involve searching for a lowercase letter in column 1, and deleting the newline before it to stitch the lines together. There are 1.2 million occurrences of this "rogue line break" in the novel I am trying to fix.

    Read the article

  • Combobox population problem

    - by Luke
    So I have a combobox - the designer code: this.cmbStatusBox.Items.AddRange(new object[] { "Ordered", "Cooking", "In-transit", "Delivered"}); The formload code: if (mainForm.boolEdit == true) { this.cmbStatusBox.Items.AddRange(new object[] { "Cooking", "In-transit", "Delivered"}); } else { this.cmbStatusBox.Items.AddRange(new object[] { "Ordered"}); } As you can see, I am trying to make the combobox have different values. As things stand, i get both whats in the designer and in formload in the comboboxes. How can i stop this? I also have an edit function, so when i edit a record, i want the combo box to be populated by what is already saved. Just a random question, can you stop the user entering a value that isn't in the combo box? Thankyou

    Read the article

  • changing text periodically in a span from an array with jquery

    - by Peter Clark
    I have a span, eg: <p>Here is a sentence <span id="rotate">this</span> is what changes</p> and I'd like the contents of that span to change every few moments between a list of terms, so the contents might change to be: <span id="rotate">then</span> <span id="rotate">thus</span> and so on. I'd like the text to fade out and then the new text fade in. Whats the best way to do this via jquery?

    Read the article

  • How to create and remove an html hidden field using jquery?

    - by ChickenBoy
    I am new to javascript and jquery so please bear with me. First of all here is my code so that you can test it to see whats wrong: http://jsfiddle.net/Lzw4e/1/ I want to create a new hidden field every time the user selects from the left <select> element and remove / destroy the hidden field when the user clicks the right <select> element. I used the jquery command $("<input type='hidden' value=selectedAddFootballPlayerId>"); but when I checked of firebug I can't see any hidden field being created. For removal of the hidden field I really don't know. Please help me. Thanks in advance.

    Read the article

  • Template inheritance: X is not a template

    - by user2923917
    I am trying to build a inheritance-structure which looks like: Base - template Grandpa - template Father class Base {}; template <int x> class Grandpa: public Base {}; template <int x> class Father: public Grandpa<x> {}; However, the compiler complains when compiling Father, that Grandpa is not a template. I guess it is just some synthatic issue, however everything I've tried so far led to even more compiler complaints ;) Any idea whats wrong?

    Read the article

  • Quartz 2D animating text?

    - by coure06
    i have to animate text around a circle. The text will also scale up/down. Whats the best approach to accomplish this? (i am using Quartz 2D) My approach is: -- Calculate point using sin and cos methods. -- Move Pen there and draw text with alpha and size. -- Clear the screen -- Calculate next point using sin and cos methods. -- Move pen there and draw text with alpha and size. -- clear the screen so on... any better way?

    Read the article

  • linq Multiple Where based on conditions.

    - by Bathan
    I want to query a table with some conditions based on user input. I wrote this : IQueryable turnoQuery = dc.Turno; if (helper.FechaUltimaCitaDesde != DateTime.MinValue) { turnoQuery = turnoQuery.Where(t => t.TurnoFecha >= helper.FechaUltimaCitaDesde); } if (helper.FechaUltimaCitaHasta != DateTime.MinValue) { turnoQuery = turnoQuery.Where(t => t.TurnoFecha <= helper.FechaUltimaCitaHasta); } if (helper.SoloCitasConsumidas) { turnoQuery = turnoQuery.Where(t => t.Estado == Convert.ToInt32(EnmEstadoDelTurno.Consumido)); } else if(helper.AnuladoresDeCitas) { turnoQuery = turnoQuery.Where(t => t.Estado == Convert.ToInt32(EnmEstadoDelTurno.Cancelado) || t.Estado == Convert.ToInt32(EnmEstadoDelTurno.Ausente)); } The problem I'm having is that the "where" clause gets stepped over with the last one. Whats the correct way to do something like this on LINQ? The "helper" object is a custom class storing the user input dates for this example.

    Read the article

  • Using two xmlhttprequest calls on a page

    - by blacktooth
    I have two divisions, <div id=statuslist></div><div id=customerlist></div> The function sendReq() creates a xmlhttprequest and fetches the data into the division. sendReq('statuslist','./include/util.php?do=getstatuslist','NULL'); sendReq('customerlist','emphome.php?do=getcustomerlist','NULL'); I have a problem, The data fetched into the 'customerlist' gets copied onto 'statuslist' If i change the order of function calls, sendReq('customerlist','emphome.php?do=getcustomerlist','NULL'); sendReq('statuslist','./include/util.php?do=getstatuslist','NULL'); Now the data of 'statuslist' gets into 'customerlist'.. Whats the problem with the code?

    Read the article

  • Creating a templated silverlight control that has a story board.

    - by Mrt
    I'm trying to create a templated silverlight control that has a simple animation (swap a few color properties). An example would be a control that is similar to the 'questions' menu item in stackoverflow. So the consumer of the control can specify the background color and the background color for the mouseover event. I've run into the issue that I can't use template binding for a storyboard animation (http://stackoverflow.com/questions/1336689/is-it-possible-to-use-templatebinding-in-a-storyboard-in-silverlight). Whats the best work around to this ? Cheers, MrT

    Read the article

  • Chrome Javascript

    - by Mike
    i have two spans on my page with class='hidden' and then some javascript to remove the class when a condition is met, its working fine in ie 9/10 and firefox but its not working in chrome when I run the function in the chrome JS console I get the message TypeError: Cannot read property 'attributes' of null Anybody know whats going on? <script type='text/javascript' > function showhidden() { var att =document.getElementById('hiddentextbox'); att.attributes[0].value=''; att =document.getElementById('hiddentextbox1'); att.attributes[0].value=''; }</script> Thanks

    Read the article

  • Image input onclick event being fired when enter button Pressed

    - by Anthony
    I have a strange problem where an onclick event on an input image is being fired when i hit enter in input text box <form id="MyForm" action="/someaction"> <input type="image" src="someimage.jpg" onclick="doStuff();$('#MyForm').submit();" /> <input type="text" name="textInput"/> </form> When the cursor is in the text box and i hit enter, rather than the form being submitted it calls the onclick event on the image input. Any ideas whats going on ?

    Read the article

  • How to make DropDownList automatically be selected based on the Label.Text

    - by Archana B.R
    I have a DropDownlist in the GridView, which should be visible only when edit is clicked. I have bound the DropDownList from code behind. When I click on Edit, the label value of that cell should automatically get selected in the DropDownList. The code I have tried is: protected void GridView3_RowDataBound(object sender, GridViewRowEventArgs e) { if (e.Row.RowType == DataControlRowType.DataRow) { SqlCommand cmd = new SqlCommand("SELECT Location_Name FROM Location_Table"); DropDownList bind_drop = (e.Row.FindControl("DropList") as DropDownList); bind_drop.DataSource = this.ExecuteQuery(cmd, "SELECT"); bind_drop.DataTextField = "Location_Name"; bind_drop.DataValueField = "Location_Name"; bind_drop.DataBind(); string Loc_type = (e.Row.FindControl("id2") as Label).Text.Trim(); bind_drop.Items.FindByValue(Loc_type).Selected = true; } } When I run the code, it gives an exception error Object reference not set in the last line of the above code. Cannot find out whats wrong. Kindly help

    Read the article

  • Vb.Net action delegate problem?

    - by Ramesh Vel
    Hi, Am vb.net newbie. This question might be very novice and answered before, but i couldn't find. I was trying the lambda features and got struck here. Private Function HigerOrderTest(highFunction as Func(Of Int16,Int16)) As Action(of String) Dim sam = highFunction(3) Dim DoIt as Action(of String) DoIt = sub(s) console.WriteLine(s) return DoIt End Function I got "Expression expected." at line DoIt = sub(s) console.WriteLine(s). And when i changed this to DoIt = function(s) console.WriteLine(s) i got Expression does not produce a value. error. Whats the problem? Cheers

    Read the article

  • Can't find Peopleware anywhere?

    - by ooo
    Many folks say that Peopleware is one of the best books for software professionals and managers, as I see a lot of people recommending it in the "have to read list." The strange thing is that I can't find a bookstore anywhere that actually has it. I found it on Amazon, but Borders, Barnes & Nobles, etc. don't have it and keep telling me it's out of print. Can anyone shed some light on whats going on here? Amazon doesn't stock it, it says its available from a few 3rd party sellers, but I tried two of them and both of them eventually refunded me and cancelled the order after stalling for a month.

    Read the article

  • Basic QT Event handling / Threading questions ?

    - by umanga
    Greetings , I am new to QT (4.6) and have some basic questions regarding its event mechanism.I come from Swing background so I am trying to compare it with QT. 1) Does Event-processing-loop run in seperate thread? (like EventDispatch thread in Swing) ? 2) If we open several 'QMainWindow' do they run in several threads? 3) Whats the best way to run an intensive process in a seperate thread? (like SwingWorker in Swing ? ) 4) If intesive-process runs in a seperate thread ,is it possible to call UI methods like update(),repaint() from that process? thanks in advance.

    Read the article

  • Rails + simple role system through associative table

    - by user202411
    So I have the Ninja model which has many Hovercrafts through ninja_hovercrafts (which stores the ninja_id and the hovercraft_id). It is of my understanding that this kind of arrangement should be set in a way that the associative table stores only enough information to bind two different classes. But I'd like to use the associative table to work as a very streamlined authorization hub on my application. So i'd also like this table to inform my system if this binding makes the ninja the pilot or co-pilot of a given hovercraft, through a "role" field in the table. My questions are: Is this ugly? Is this normal? Are there methods built into rails that would help me to automagically create Ninjas and Hovercrafts associations WITH the role? For exemple, could I have a nested form to create both ninjas and hcs in a way that the role field in ninjas_hovercrafts would be also filled? If managing my application roles this way isn't a good idea, whats the non-resource heavy alternative (my app is being designed trying to avoid scalability problems such as excessive joins, includes, etc) thank you

    Read the article

  • WPF: Best method for printing paginated datagrids

    - by FauxReal
    Boy did I get an education looking into this. I guess I've been spoiled by Powerbuilder, which has fantastic functionality for this out of the box. Does anyone seriously write custom documentpaginator objects to handle reporting needs for their LOB apps? I want to be able to print "for free" and not have to code like crazy just to take whats on the screen and throw it on paper. How are people doing this? Does anyone have a recommended 3rd party for allowing printing of largish datagrids? Thanks

    Read the article

  • How to create a static delegate from main-viewcontroller?

    - by geforce
    Hi, hope someone can help me on learning some new stuff about delegates in iOS-programming. I have a "MainViewController" which is the first VC when the app starts. I´ve a kind of modelselection with different UIImageViews and after choosing one of them, i´m pushing a new VC. I want to handle the modelChoice with a delegate, so all other viewControllers can listen to that and act based on the users choice. But does that mean that i have to alloc a new instance of that "MainViewController" in every VC? Whats the solution on that? How do i create (i think its called) static delegate? Would be great to learn that.. Thanks for sharing..

    Read the article

  • DotNetOpenAuth I need some help please

    - by Nate Gates
    I know this has been posted before, but never really answered, I'm using the DotNetOpenAuth to try and do GoogleID login, and every time I do details = OResponse.GetExtension<ClaimsResponse>(); I always, always, always get back null, I don't get whats the point of the GoogleID if I can't get back any information, I would think at the very least I would get an email address, so I could associate it other login information in my databse. I just don't understand could really use some help, Im probably just looking at openID in the wrong way. I'm using ASP.NET and looking to use openID/Facebook as my sole means of logging in users, I really don't want to mess with membership roles, or extra junk that ASP.NET likes to add.

    Read the article

  • Performance: float to int cast and clippling result to range

    - by durandai
    I'm doing some audio processing with float. The result needs to be converted back to PCM samples, and I noticed that the cast from float to int is surprisingly expensive. Whats furthermore frustrating that I need to clip the result to the range of a short (-32768 to 32767). While I would normally instictively assume that this could be assured by simply casting float to short, this fails miserably in Java, since on the bytecode level it results in F2I followed by I2S. So instead of a simple: int sample = (short) flotVal; I needed to resort to this ugly sequence: int sample = (int) floatVal; if (sample > 32767) { sample = 32767; } else if (sample < -32768) { sample = -32768; } Is there a faster way to do this? (about ~6% of the total runtime seems to be spent on casting, while 6% seem to be not that much at first glance, its astounding when I consider that the processing part involves a good chunk of matrix multiplications and IDCT)

    Read the article

< Previous Page | 58 59 60 61 62 63 64 65 66 67 68 69  | Next Page >