Search Results

Search found 11277 results on 452 pages for 'jeff certain'.

Page 21/452 | < Previous Page | 17 18 19 20 21 22 23 24 25 26 27 28  | Next Page >

  • MySQL Select names with last names ending with certain letter

    - by Brian
    I have a MySQL database with a field Name which contains full names. To select all people with last names ending in a particular letter, let's say A for this example, I use the following query: SELECT * FROM db WHERE Name LIKE '% A%'. However, this also selects users who have a middle name starting with A. Is there anyway to alter this query so that only a last name ending in A will be selected?

    Read the article

  • Flex - prevent dragging for certain items

    - by Tom
    Hi troops, how would you prevent dragging for some items of your List or DataGrid? Let's say I had a list with two items: 'Tom' and 'Jerry'. Only 'Tom' should be dragable, not 'Jerry'. Ideally I had a 'isDragEnabled(item:Object):Boolean' function, which is being queried by the drag source. My difficulties start with the fact that the 'dragStart' event handler has a null value for the dragSource, so right from the start I find it hard to find out what the drag-start is about.. Thanks in advance! PS There have been a few discussions on preventing or canceling a drop, but I haven't seen much about preventing the drag start, hence this question.

    Read the article

  • Remove certain filetypes in Python

    - by Gareth
    Hello. I am running a script that walks a directory structure and generates new files in each folder in the directory. I want to delete some of the files right after creation. This is my idea, but it is quite wrong I imagine: directory = os.path.dirname(obj) m = MeshExporterApplication(directory) os.remove(os.path.join(directory,"*.mesh.xml")) How to you put wildcards in a path? I guess not like /home/me/*.txt, but that is what I am trying. Thanks, Gareth

    Read the article

  • Javascript check if it has passed midnight since a certain time

    - by Jonah
    I need to create a javascript function that checks if it has been a day since timeX (an instance of Date). I do NOT mean whether is has been 24 hours since timeX, but instead whether it has passed a midnight since timeX. I am a PHP expert, not a JavaScript one, so I was wondering if anyone here had any quick answers. Thanks! function(dateLast, dateNow) {...}

    Read the article

  • Print a string that contains a certain pattern in Java

    - by jjpotter
    I am trying to find a regular expression within a line of a .csv file, so I can eventually save all the matches to another file, and lose all the other junk. So a line in my file might look like: MachineName,User,IP,VariableData,Location The VariableData is what I want to match, and if there's a match, print the line. I am using a pattern for this because I only want 3 out of 10 of variations of VariableData, and out of those 3, they are numbered differently(example, "pc104, pccrt102, pccart65"). I am trying to do this using the Scanner Class and keeping it simple as possible so I can understand it. Here is where I was heading with this...(the pattern isn't complete, just have it like this for testing). import java.io.File; import java.util.Scanner; import java.util.regex.Pattern; public class pcv { public static void main(String[] args) { File myFile = new File("c:\\temp\\report.csv"); Pattern myPat = Pattern.compile("pc"); try{ Scanner myScan = new Scanner(myFile); while(myScan.hasNext()){ if(myScan.hasNext(myPat)){ System.out.println("Test"); } } }catch(Exception e){ } } } This code loops, im guessing the .hasNext() methods are resetting themselves. I've played around with the Matcher class a little bit, but only found a way to match the expression but not get the whole line. My other throught was maybe somehow count the line that contains the pattern, then go back and print the line that corresponds to the counts.

    Read the article

  • Databind List Of Objects To A WinForms DataGridView, But Not Show Certain Public Properties

    - by Pyronaut
    I'm not even sure if i'm doing this correctly. But basically I have a list of objects that are built out of a class. From there, I am binding the list to a datagrid view that is on a Windows Form (C#) From there, it shows all the public properties of the object, in the datagrid view. However there is some properties that i still need accessible from other parts of my application, but aren't really required to be visible in the DataGridView. So is there an attribute or something similar that I can write above the property to exclude it from being shown. P.S. Im binding at runtime. So i cannot edit the columns via the designer. P.P.S. Please no answers of just making public variables (Although if that is the only way, let me know :)).

    Read the article

  • Time complexity of a certain program

    - by HokageSama
    In a discussion with my friend i am not able to predict correct and tight time complexity of a program. Program is as below. /* This Function reads input array "input" and update array "output" in such a way that B[i] = index value of nearest greater value from A[i], A[i+1] ... A[n], for all i belongs to [1, n] Time Complexity: ?? **/ void createNearestRightSidedLargestArr(int* input, int size, int* output){ if(!input || size < 1) return; //last element of output will always be zero, since no element is present on its right. output[size-1] = -1; int curr = size - 2; int trav; while(curr >= 0){ if(input[curr] < input[curr + 1]){ output[curr] = curr + 1; curr--; continue; } trav = curr + 1; while( input[ output [trav] ] < input[curr] && output [trav] != -1) trav = output[trav]; output[curr--] = output[trav]; } } I said time complexity is O(n^2) but my friend insists that this is not correct. What is the actual time complexity?

    Read the article

  • I have lots of images on a html page - how can i make certain ones load first (or certain ones load

    - by imlostmike
    Hi, i have a page with the main content area being big thumbnails, but elsewhere on the page are about 100-200 other (smaller) thumbs that are not important but must still show. What ways do i have to make the main ones show first (or the unimportant ones show last)? I was thinking of these ways: JS load: on page load (once it has finished loading), use a jquery's append() (or whatever other way) to write the html with the image code Set all unimportant images inside a div with style="display:none;". Then once the page has loaded, use JS to set it as visible what do you think is the best way?

    Read the article

  • UIWebViewNavigationTypeLinkClicked event not getting fired for certain links

    - by userlite
    Hi, I am using a UIWebView as an embedded browser within my iphone app. I am using the shouldStartLoadWithRequest function to handle UIWebViewNavigationTypeLinkClicked events for links clicked by a user. It is working as expected for a number of sites, but not for all. For example: when I click on any of the links on website http://www.foxnews.mobi, the UIWebViewNavigationTypeLinkClicked event is not getting fired. Same thing happens for some other sites. I read somewhere that links with blank target do not fire the event, however this is not the cause of the problem in my case. Any help is appreciated. Thanks.

    Read the article

  • XPath select certain amount of levels only

    - by Psytronic
    If I have an xml structure like this <root <sub <node / <node / </sub <sub <node / <sub <sub <sub <node / </sub </sub <sub <sub <sub <node / </sub <node / </sub </sub <node / <node / </root Is there an xpath syntax which will only select the first three levels of nodes? so it will collect <root <sub <node / <node / </sub <sub / <sub <sub / </sub <sub <sub / </sub <node / <node / </root Thanks, Psy

    Read the article

  • Using LINQ to search a byte array for all subarrays that start/stop with certain byte

    - by Joel B
    I'm dealing with a COM port application and we have a defined variable-length packet structure that I'm talking to a micro-controller with. The packet has delimiters for the start and stop bytes. The trouble is that sometimes the read buffer can contain extraneous characters. It seems like I'll always get the whole packet, just some extra chatter before/after the actual data. So I have a buffer that I append data to whenever new data is received from the COM port. What is the best way to search this buffer for any possible occurrences of my packet? For example: Say my packet delimiter is 0xFF and I have an array as such { 0x00, 0xFF, 0x02, 0xDA, 0xFF, 0x55, 0xFF, 0x04 } How can I create a function/LINQ-statment that returns all subarrays that start and end with the delimiter (almost like a sliding-correlator with wildcards)? The sample would return the following 3 arrays: {0xFF, 0x02, 0xDA, 0xFF}, {0xFF, 0x55, 0xFF}, and {0xFF, 0x02, 0xDA, 0xFF, 0x55, 0xFF}

    Read the article

  • Add Core Data Index to certain Attributes via migration

    - by steipete
    For performance reasons, i want to set the Indexed Attribute to some of my entities. I created a new core data model version to perform the changes. Core Data detects the changes and migrates my model to the new version, however, NO INDEXES ARE GENERATED. If I recreate the database from scratch, the indexes are there. I checked with SQLite Browser both on the iPhone and on the Simulator. The problem only occurs if a database in the prior format is already there. Is there a way to manually add the indexes? Write some sql for that? Or am I missing something? I did already some more critical migrations, no problems there. But those missing indexes are bugging me. Thanks for helping!

    Read the article

  • Detect if certain UIView was touched amongst other UIViews

    - by Rudiger
    HI Guys, Sorry if this has been answered elsewhere but I can't seem to get it to work. I have 3 UIViews, layered on top of one large uiview. I want to know if the user touches the top one and not care about the other ones. I will have a couple of buttons in the second UIView and a UITable in the 3rd UIView. Problem is I turn userInteractionEngabled on on the first view and that works, but all the other views respond in the same way even if I turn it off. If I disable userInteractionEnabled on self.view none of them respond. I also can't detect which view was touched in the touchesBegan delegate method. my code: UIView *aView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 320, 150)]; aView = userInteractionEnabled = YES; [self.view addSubview:aView]; UIView *bView = [[UIView alloc] initWithFrame:CGRectMake(0, 150, 320, 50)]; bView.userInteractionEnabled = NO; [self.view addSubview:bView]; -(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { //This gets called for a touch anywhere } Thanks for any help.

    Read the article

  • Jquery hover to only have effect for certain amount of time

    - by Andrew Cassidy
    Hi, I'm using a jquery hover effect but would only like the effect to last for around a second when rolled over....ie user rolls over image, it changes for a second, then reverts back to the original image. $(document).ready(function(){ $(function() { $('.rollover').hover(function() { var currentImg = $(this).attr('src'); $(this).attr('src', $(this).attr('hover')); $(this).attr('hover', currentImg); }, function() { var currentImg = $(this).attr('src'); $(this).attr('src', $(this).attr('hover')); $(this).attr('hover', currentImg); }); }); }); This is the code I'm using for the standard hover. Any help would be great, thanks.

    Read the article

  • Calculating bounding box a certain distance away from a lat/long coordinate in Java

    - by Bryce Thomas
    Given a coordinate (lat, long), I am trying to calculate a square bounding box that is a given distance (e.g. 50km) away from the coordinate. So as input I have lat, long and distance and as output I would like two coordinates; one being the south-west (bottom-left) corner and one being the north-east (top-right) corner. I have seen a couple of answers on here that try to address this question in Python, but I am looking for a Java implementation in particular. Just to be clear, I intend on using the algorithm on Earth only and so I don't need to accommodate a variable radius. It doesn't have to be hugely accurate (+/-20% is fine) and it'll only be used to calculate bounding boxes over small distances (no more than 150km). So I'm happy to sacrifice some accuracy for an efficient algorithm. Any help is much appreciated. Edit: I should have been clearer, I really am after a square, not a circle. I understand that the distance between the center of a square and various points along the square's perimeter is not a constant value like it is with a circle. I guess what I mean is a square where if you draw a line from the center to any one of the four points on the perimeter that results in a line perpendicular to a side of the perimeter, then those 4 lines have the same length.

    Read the article

  • How to scan an array for certain information

    - by Andrew Martin
    I've been doing an MSc Software Development conversion course, the main language of which is Java, since the end of September. We have our first assessed practical coming and I was hoping for some guidance. We have to create an array that will store 100 integers (all of which are between 1 and 10), which are generated by a random number generator, and then print out ten numbers of this array per line. For the second part, we need to scan these integers, count up how often each number appears and store the results in a second array. I've done the first bit okay, but I'm confused about how to do the second. I have been looking through the scanner class to see if it has any methods which I could use, but I don't see any. Could anyone point me in the right direction - not the answer, but perhaps which library it comes from? Code so far: import java.util.Random; public class Practical4_Assessed { public static void main(String[] args) { Random numberGenerator = new Random (); int[] arrayOfGenerator = new int[100]; for (int countOfGenerator = 0; countOfGenerator < 100; countOfGenerator++) arrayOfGenerator[countOfGenerator] = numberGenerator.nextInt(10); int countOfNumbersOnLine = 0; for (int countOfOutput = 0; countOfOutput < 100; countOfOutput++) { if (countOfNumbersOnLine == 10) { System.out.println(""); countOfNumbersOnLine = 0; countOfOutput--; } else { System.out.print(arrayOfGenerator[countOfOutput] + " "); countOfNumbersOnLine++; } } } } Thanks, Andrew

    Read the article

  • Rewrite only external requests to a certain URL

    - by Cyclone
    I want to rewrite from http://example.com/blah/<something>/<somethingelse> to http://<something>.example.com/<somethingelse>, but only if the request is not an internal redirect. How can I achieve this effect? I know I can use %{THE_REQUEST}, but I can't seem to find any good examples. Thanks for the help!

    Read the article

  • deny access to certain folder using php

    - by mckenzie
    Hello, Is it possible to "deny from all" apache htaccess style using php. I can't use htaccess because im using different webserver, so i wan't to use php to workaround it. So let say user are trying to access folder name 'david', all content and subdirectory are denied from viewing.

    Read the article

  • How can I remove certain characters from inside angle-brackets, leaving the characters outside alone

    - by Iain Fraser
    Edit: To be clear, please understand that I am not using Regex to parse the html, that's crazy talk! I'm simply wanting to clean up a messy string of html so it will parse Edit #2: I should also point out that the control character I'm using is a special unicode character - it's not something that would ever be used in a proper tag under any normal circumstances Suppose I have a string of html that contains a bunch of control characters and I want to remove the control characters from inside tags only, leaving the characters outside the tags alone. For example Here the control character is the numeral "1". Input The quick 1<strong>orange</strong> lemming <sp11a1n 1class1='jumpe111r'11>jumps over</span> 1the idle 1frog Desired Output The quick 1<strong>orange</strong> lemming <span class='jumper'>jumps over</span> 1the idle 1frog So far I can match tags which contain the control character but I can't remove them in one regex. I guess I could perform another regex on my matches, but I'd really like to know if there's a better way. My regex Bear in mind this one only matches tags which contain the control character. <(([^>])*?`([^>])*?)*?> Thanks very much for your time and consideration. Iain Fraser

    Read the article

  • Extracting Certain XML Elements with PHP SimpleXML

    - by Peter
    I am having some problems parsing this piece of XML using SimpleXML. There is always only one Series element, and a variable number of Episode elements beneath. I want to parse XML so I can store the Series data in one table, and all the Episode data in another table. XML: <Data> <Series> <id>80348</id> <Genre>|Action and Adventure|Comedy|Drama|</Genre> <IMDB_ID>tt0934814</IMDB_ID> <SeriesID>68724</SeriesID> <SeriesName>Chuck</SeriesName> <banner>graphical/80348-g.jpg</banner> </Series> <Episode> <id>935481</id> <Director>Robert Duncan McNeill</Director> <EpisodeName>Chuck Versus the Third Dimension 2D</EpisodeName> <EpisodeNumber>1</EpisodeNumber> <seasonid>27984</seasonid> <seriesid>80348</seriesid> </Episode> <Episode> <id>935483</id> <Director>Robert Duncan McNeill</Director> <EpisodeName>Buy More #15: Employee Health</EpisodeName> <EpisodeNumber>2</EpisodeNumber> <seasonid>27984</seasonid> <seriesid>80348</seriesid> </Episode> </Data> When I attempt to access just the first Series element and child nodes, or iterate through the Episode elements only it does not work. I have also tried to use DOMDocument with SimpleXML, but could not get that to work at all. PHP Code: <?php if(file_exists('en.xml')) { $data = simplexml_load_file('en.xml'); foreach($data as $series) { echo 'id: <br />' . $series->id; echo 'imdb: <br />' . $series->IMDB_ID; } } ?> Output: id:80348 imdb:tt0934814 id:935481 imdb: id:1534641 imdb: Any help would be greatly appreciated.

    Read the article

  • Fetch posts with attachments in a certain category?

    - by TiuTalk
    I need to retreive a list of posts that have (at least) one attachment that belongs to a category in WordPress. The relation between attachments and categories I made by myself using the WordPress default method. Here's the query that i'm running right now: SELECT p.* FROM `wp_posts` AS p # The post INNER JOIN `wp_posts` AS a # The attachment ON p.`ID` = a.`post_parent` AND a.`post_type` = 'attachment' INNER JOIN `wp_term_relationships` AS ra ON a.`ID` = ra.`object_id` AND ra.`term_taxonomy_id` IN (3) # The category ID list WHERE p.`post_type` = 'post' ORDER BY p.`post_date` DESC LIMIT 15 The problem here is that the query only use the first found attachment, and if it doesn't belongs to the category, the result isn't returned.

    Read the article

  • Echo certain value from smarty array

    - by zx
    Hi, So currently I have an array with smarty.. {foreach from=$_sequences key=k item=v} Name => {$v.menu} Type => {$v.type} Step => {$v.pri} Data =>{$v.data} {/foreach} which gives me Name = Test Type = Audio Step = 1 Data = audio1 Name = Test2 Type = Audio Step = 2 Data = audio2 Name = Test3 Type = Audio Step = 3 Data = audio3 Now how would I get the data for step = 2 to echo out? So from that foreach I only want to display "audio2"

    Read the article

  • JAXB: Unmarshalling does not always populate certain classes?

    - by user278458
    Hello, I have a JAXB class generation problem I was hoping to get some help with. Here's the part of the XML that is the source of my problem... Code: <xs:complexType name="IDType"> <xs:choice minOccurs="0" maxOccurs="2"> <xs:element name="DriversLicense" minOccurs="0" maxOccurs="1" type="an..35" /> <xs:element name="SSN" minOccurs="0" maxOccurs="1" type="an..35" /> <xs:element name="CompanyID" minOccurs="0" maxOccurs="1" type="an..35" /> </xs:choice> </xs:complexType> <xs:simpleType name="an..35"> <xs:restriction base="an"> <xs:maxLength value="35" /> </xs:restriction> </xs:simpleType> <xs:simpleType name="an"> <xs:restriction base="xs:string"> <xs:pattern value="[ !-~]*" /> </xs:restriction> </xs:simpleType> ...now this will generate JAXBElement types due the the "choice" with a "maxOccurs 1" . I want to avoid those, so I did that by modifying the code to use a "Wrapper" element and move the maxOccurs up to a sequence tag as follows... Code: <xs:complexType name="IDType"> <xs:sequence maxOccurs="2"> <xs:element name=Wrapper> <xs:complexType> <xs:choice> <xs:element name="DriversLicense" minOccurs="0" maxOccurs="1" type="an..35" /> <xs:element name="SSN" minOccurs="0" maxOccurs="1" type="an..35" /> <xs:element name="CompanyID" minOccurs="0" maxOccurs="1" type="an..35" /> </xs:choice> </xs:complexType> </xs:element> </xs:sequence> </xs:complexType> <xs:simpleType name="an..35"> <xs:restriction base="an"> <xs:maxLength value="35" /> </xs:restriction> </xs:simpleType> <xs:simpleType name="an"> <xs:restriction base="xs:string"> <xs:pattern value="[ !-~]*" /> </xs:restriction> </xs:simpleType> For class generating, looks like it works great - the JAXB element is replaced with a list of wrappers as String (i.e. List ) and compiles fine. However, when I unmarshall the actual XML data into the generated classes the data in the wrapper class is not populated - yet JAXB does not throw an exception. My question is: Do I need to change the schema a different way to make this work? Or is there something I can add/change/delete to the generated code or annotations? Appreciate any help you can offer! Thanks.

    Read the article

< Previous Page | 17 18 19 20 21 22 23 24 25 26 27 28  | Next Page >