Search Results

Search found 4637 results on 186 pages for 'john deerikio'.

Page 108/186 | < Previous Page | 104 105 106 107 108 109 110 111 112 113 114 115  | Next Page >

  • Improve long mysql query

    - by John Adawan
    I have a php mysql query like this $query = "SELECT * FROM articles FORCE INDEX (articleindex) WHERE category='$thiscat' and did>'$thisdid' and mid!='$thismid' and status='1' and group='$thisgroup' and pid>'$thispid' LIMIT 10"; As optimization, I've indexed all the parameters in articleindex and I use force index to force mysql to use the index, supposedly for faster processing. But it seems that this query is still quite slow and it's causing a jam and maxing out the max mysql connection limit. Let's discuss how we can improve on such long query.

    Read the article

  • Improve long mysql query

    - by John Adawan
    I have a php mysql query like this $query = "SELECT * FROM articles FORCE INDEX (articleindex) WHERE category='$thiscat' and did>'$thisdid' and mid!='$thismid' and status='1' and group='$thisgroup' and pid>'$thispid' LIMIT 10"; As optimization, I've indexed all the parameters in articleindex and I use force index to force mysql to use the index, supposedly for faster processing. But it seems that this query is still quite slow and it's causing a jam and maxing out the max mysql connection limit. Let's discuss how we can improve on such long query.

    Read the article

  • Multipage forms for joomla (looking outside the box)

    - by John Snow
    I have created a number of forms using various Joomla components which have more or less worked successfully. Recently I have attempted to create mult-page forms - the forms work...but they are slow as molasses. Having spent a couple of weeks trying to resolve this and not seeing any signs of improvement ...... I wonder if anyone has experience of using hosted forms services in Joomla either using a wrapper or as a static page within a Joomla site. Any pointers or recommendations would be appreciated.

    Read the article

  • C++ How do I properly use getline for ifstream members.

    - by John
    Ok so I have a problem with getline. I have a file that contains a couple strings. I created it by myself and I have each string on a seperate line. Ex. textfile.txt Line 1 Line 2 Line 3 Line 4 //Little snip of code ifstream inFile("textfile.txt"); getline(inFile, string1); When I debug the program and ask it to print out string1 it shows that "Line 1\r" is saved into string1. I understand that it's from me actually hitting enter when I created the file. This problem causes my program to have a segmentation fault. I know my code works because if I use ofstream to write the file first and then i read it in, it works. So for my quesiton, is their anyway to use the getline function without it picking up the escape sequence \r? If i am not clear just let me know.

    Read the article

  • MATLAB: How do I get 3D coordiantes from a user-click?

    - by John
    I'm using Matlab to create a small chess game for one of my courses this semester. The thing I'm having trouble with is having the user be able to select one of the chess pieces. To simplify things, I'm making it so that the user selects a piece by clicking on the square that the chess piece resides on rather than clicking the piece itself (which I assume would be much more difficult). I know how to get the x and y coordinates of the view-port, but how do I transform these coordinates into 3-space coordinates? I know that there are multiple x,y,z coordinates associated with each view-port coordinate, but I'm only interested in the x,y,z coordinate where z = 0 (since the board itself is in the x,y plane that intersects the z axis where z = 0). Thanks!

    Read the article

  • PHP script causes segmentation fault then the browser asks me to download the .php file with nothing in it?

    - by John
    I've noticed an unusual problem with some of my php programs. Sometimes when visiting a page like profile.edit.php, the browser throws a dialogue box asking to download profile.edit.php page. When I download it, there's nothing in the file. profile.edit.php is supposed to be a web form that edits user information. I've noticed this on some of my other php pages as well. I look in my apache error logs, and I see a segmentation fault message: [Mon Mar 08 15:40:10 2010] [notice] child pid 480 exit signal Segmentation fault (11) And also, the issue may or may not appear depending on which server I deploy my application too. Additonal Details This doesn't happen all the time though. It only happens sometimes. For example, profile.edit.php will load properly. But as soon as I hit the save button (form action="profile.edit.php?save=true"), then the page asks me to download profile.edit.php. Could it be that sometimes my php scripts consume too much resources? Sample code Upon save action, my profile.edit.php includes a data_access_object.php file. I traced the code in data_access_object.php to this line here if($params[$this->primaryKey]) { $q = "UPDATE $this->tableName SET ".implode(', ', $fields)." WHERE ".$this->primaryKey." = ?$this->primaryKey"; $this->bind($this->primaryKey, $params[$this->primaryKey], $this->tblFields[$this->primaryKey]['mysqlitype']); } else { $q = "INSERT $this->tableName SET ".implode(', ', $fields); } // Code executes perfectly up to this point // echo 'print this'; exit; // if i uncomment this line, profile.edit.php will actually show 'print this'. If I leave it commented, the browser will ask me to download profile.edit.php if(!$this->execute($q)){ $this->errorSave = -3; return false;} // When I jumped into the function execute(), every line executed as expected, right up to the return statement. And if it helps, here's the function execute($sql) in data_access_object.php function execute($sql) { // find all list types and explode them // eg. turn ?listId into ?listId0,?listId1,?listId2 $arrListParam = array_bubble_up('arrayName', $this->arrBind); foreach($arrListParam as $listName) if($listName) { $explodeParam = array(); $arrList = $this->arrBind[$listName]['value']; foreach($arrList as $key=>$val) { $newParamName = $listName.$key; $this->bind($newParamName,$val,$this->arrBind[$listName]['type']); $explodeParam[] = '?'.$newParamName; } $sql = str_replace("?$listName", implode(',',$explodeParam), $sql); } // replace all ?varName with ? for syntax compliance $sqlParsed = preg_replace('/\?[\w\d_\.]+/', '?', $sql); $this->stmt->prepare($sqlParsed); // grab all the parameters from the sql to create bind conditions preg_match_all('/\?[\w\d_\.]+/', $sql, $matches); $matches = $matches[0]; // store bind conditions $types = ''; $params = array(); foreach($matches as $paramName) { $types .= $this->arrBind[str_replace('?', '', $paramName)]['type']; $params[] = $this->arrBind[str_replace('?', '', $paramName)]['value']; } $input = array('types'=>$types) + $params; // bind it if(!empty($types)) call_user_func_array(array($this->stmt, 'bind_param'), $input); $stat = $this->stmt->execute(); if($GLOBALS['DEBUG_SQL']) echo '<p style="font-weight:bold;">SQL error after execution:</p> ' . $this->stmt->error.'<p>&nbsp;</p>'; $this->arrBind = array(); return $stat; }

    Read the article

  • facebook photo album grouping photos in news feed

    - by John Klingelhoets
    We have a social media "platform" - when we schedule photos to be published to Facebook, if a user schedules photos - they all go into the same album, as they schedule photos throughout the day - the photos become grouped and do not appear as a large photo - but rather a bunch of photos in a album. Is there any way to prevent photos from being grouped in the new feed and it just showing the newest uploaded photo in stream? I do not see an option.

    Read the article

  • Associate an Activity with an item in XML ListViews in Android

    - by John
    I have a ListView that is populated using an XML file. However, I want each item, when clicked, to start a new Activity related to that item. I understand how to use OnItemClick to start a Toast that shows the selected item's text. However, since the ListView is populated from an XML there is not a specific Id for each item in the list. So, how would I associate an Activity with each item in the ListView when the items do not have Ids?

    Read the article

  • Django display manytomany field in form when definition is on other model

    - by John
    Hi I have the definition for my manytomany relationship on one model but want to display the field on the form of my other model. How do I do this? for example: # classes class modelA(models.Model): name = models.CharField(max_length=300) manytomany = models.ManyToManyField(modelA) class modelB(models.Model): name = models.CharField(max_length=300) # forms class modelBForm(forms.ModelForm): class Meta: model = modelB If I then used modelBForm it would show a select box with the models from modelA rather than just name. Thanks

    Read the article

  • retrieve columns from sqlite3

    - by John Smith
    I have two tables in sqlite: CREATE TABLE fruit ('fid' integer, 'name' text); CREATE TABLE basket ('fid1' integer, 'fid2' integer, 'c1' integer, 'c2' integer); basket is supposed to have count c1 of fruit fid1 and c2 of fruit fid2 I created a view fruitbasket; create view fruitbasket as select * from basket inner join fruit a on a.fid=basket.fid1 inner join fruit b on b.fid=basket.fid2; it works (almost) as expected. When I type pragma table_info(fruitbasket); I get the following output 0|fid1|integer|0||0 1|fid2|integer|0||0 2|c1|integer|0||0 3|c2|integer|0||0 4|fid|integer|0||0 5|name|text|0||0 6|fid:1|integer|0||0 7|name:1|text|0||0 The problem is that I cannot seem to SELECT name:1. How can I do it other than going back and re-aliasing the columns?

    Read the article

  • dijit hovering MenuItem issue

    - by John
    I have a dijit.layout.TabContainer on my form. I resize the browser window in such a way that all tabs won't fit in a single screen. In this case dijit automatically adds a drop-down button at the right end of the TabContainer (I get this for free). If I click on the drop-down button then I get the full List of Tab Names. Hovering over the List of Tab Names (which is in fact a collection of menu items) it blanks out the menu item name which I'm currently over. e.g. Full List: Tab1 Tab2 Tab3 Hovering over Tab2 I get: Tab1 Tab3 I get the same issue with any other dijit.Menu, dijit.MenuItem AND I get the same issue on IE, Firefox, Chrome. I haven't tested on any other browser. Thanks.

    Read the article

  • Possibility of language data type not mapped to shipped .NET Framework?

    - by John K
    Does anybody know of a managed programming language implemented on .NET that contains a specialized data type that is not mapped through to the Common Type System/FCL/BCL or one that does not have a shipped .NET equivalent (e.g. shipped standard types like System.String, System.Int32)? This question would likely come from the perspective of someone porting a compiler (although I'm not doing that). Is it as simple as the language creating a new data type outside the BCL/FCL for its specialized type? If so does this hinder interoperability between programming languages that are otherwise accustomed to mapping all their built-in data types to what's in the BCL/FCL, like Visual Basic and C#? I can imagine this situation might come about if an obscure language compiler of some kind is ported to .NET for which there is no direct mapping of one of its implicit data types to the shipped Framework. How is this situation supported or allowed in general? What would be the expectation of the compiler and the Common Language Runtime?

    Read the article

  • C++ priority queue structure used ?

    - by John Retallack
    While searching for some functions in C++ STL documentation I read that push and pop for priority queues needs constant time. "Constant (in the priority_queue). Although notice that push_heap operates in logarithmic time." My question is what kind of data structure is used to mantain a priority queue with O(1) for push and pop ?

    Read the article

  • Planning and coping with deadlines in SCRUM

    - by John
    From wikipedia: During each “sprint”, typically a two to four week period (with the length being decided by the team), the team creates a potentially shippable product increment (for example, working and tested software). The set of features that go into a sprint come from the product “backlog,” which is a prioritized set of high level requirements of work to be done. Which backlog items go into the sprint is determined during the sprint planning meeting. During this meeting, the Product Owner informs the team of the items in the product backlog that he or she wants completed. The team then determines how much of this they can commit to complete during the next sprint. During a sprint, no one is allowed to change the sprint backlog, which means that the requirements are frozen for that sprint. After a sprint is completed, the team demonstrates the use of the software. I was reading this and two questions immediately popped into my head: 1)If a sprint is only a couple of weeks, decided in a single meeting, how can you accurately plan what can be achieved? High-level tasks can't be estimated accurately in my experience, and can easily double what seems reasonable. As a developer, I hate being pushed into committing what I can deliver in the next month based on a set of customer requirements, this goes against everything I know about generating reliable estimates rather than having to roughly estimate and then double it! 2)Since the requirements are supposed to be locked and a deliverable product available at the end, what happens when something does take twice as long? What if this feature is only 1/2 done at the end of the sprint? The wiki article goes on to talk about Sprint planning, where things are broken down into much smaller tasks for estimation (<1 day) but this is after the Sprint features are already planned and the release agreed, isn't it? kind of like a salesman promising something without consulting the developers.

    Read the article

  • Android: disabling highlight on listView click

    - by John Moffitt
    I want to disable the orange highlight that occurs when touching a listView row. So far in my xml I have tried the following: android:focusable="false" android:focusableInTouchMode="false" android:clickable="false" More information: I want there to be zero difference when a user touches the screen on this listView object.

    Read the article

  • Wireshark Plugin: Dissecting Payloads With Multiple Packets Per UDP Frame

    - by John Dibling
    I am writing a Wireshark plugin to dissect a protocol that places multiple application-level packets in a single UDP frame. There is no enclosing protocol that indicates how many packets there are in the frame. So essentially, the payload coming down the wire will look like this: uint64 sequence1 uint64 data1 uint8 flags1 uint64 sequence2 uint64 data2 uint8 flags2 : : : uint64 sequence_n uint64 data_n uint8 flags_n In my server code that actually processes this information, I simply loop through the frame until I reach the end. In looking through the plugins included with the wireshark source code, I didn't see any protocols that did any looping like this. I know other protocols pack multiple payloads per frame. What is the cannonical or standard way to handle protocols like this in a Wireshark dissector?

    Read the article

  • Faking a UITableView selection

    - by John Smith
    I have a UITableView where a selection displays some cool stuff in another part of the display. I tried to fake a keypress by writing: NSIndexPath *ip = [NSIndexPath indexPathForRow: 1 inSection:0]; [tableView selectRowAtIndexPath:ip animated:NO scrollPosition:UITableViewScrollPositionTop ]; [self tableView:tableView didSelectRowAtIndexPath:ip]; However it seems the last line is not being run. How can I make it run?

    Read the article

  • MochaUI: 'A is null' when adding columns

    - by Richard John
    I've just downloaded MochaUI, and I'm playing around trying to build an interface. I've successfully created windows, but I'm having trouble when it comes to layouts with columns. I've included all of the libraries in the same order as the demo, and this is in my init code: window.addEvent('domready', function(){ new MochaUI.Column({ id: 'sideColumn1', placement: 'left', width: 200, resizeLimit: [100, 300] }); }); When run, no column is created and I get the error: A is null Does anyone have any ideas? Thanks!

    Read the article

  • How to show Image Thumb in Flex DataGrid linked to FileReferenceList

    - by John V
    Hello I have a Flex datagrid linked to an array collection that gets filled from a FileReferenceList for uploading images to a server. I want to show a thumbnail of the image in one of the grid columns as a preview. I have seen a lot of examples of doing this with an Item Render but those examples where using images on the server. These images are on the client pc waiting to be uploaded?

    Read the article

< Previous Page | 104 105 106 107 108 109 110 111 112 113 114 115  | Next Page >