Search Results

Search found 4119 results on 165 pages for 'bebe 17'.

Page 90/165 | < Previous Page | 86 87 88 89 90 91 92 93 94 95 96 97  | Next Page >

  • How to find out all versions of iPad from user-agent string?

    - by User11091981
    I wanted to find out all the version's of iPad (excluding iPhone, iPod) from user agent string, currently while testing I got the following string Mozilla/5.0 (iPad; CPU OS 5_1_1 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko) Version/5.1 Mobile/9B206 Safari/7534.48.3 Question: Will the following code works fine for all the iPad's? String userAgentStr = request.getHeader("User-agent"); if (userAgentStr.contains("iPad")) { //do my logic } EDIT: I am using Dolphin browser from iPad but I am getting the following UA string: Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_2_1 like Mac OS X; en_US) AppleWebKit/533.17.9 (KHTML, like Gecko) Mobile/8C148 Safari/6533.18.5 Similarly iBrowser from iPad UA string is: Mozilla/5.0 (iPhone; CPU iPhone OS 5_1_1 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko) Mobile/9B206 So my above code is breaking...

    Read the article

  • I Clean Solution'd my Winform App and now it's broken...

    - by Refracted Paladin
    I have a Winform App that uses a 3rd Party Library of Controls, DevExpress. I also created a bunch of Controls myself, extending those controls. Everything has been working fine when all of a sudden I opened VS today and on the Design Page all my extended controls were missing. I then tried rebuilding to no avail. Then I tried Cleaning and Rebuilding and made it even worse. Now I have tons(520) of erros stating things like -- Error 179 The name 'datBirthDate' does not exist in the current context D:\Documents\Visual Studio 2008\Projects\MatrixReloaded\MatrixReloaded\Controls\Member\ucGeneral.cs 339 17 MatrixReloaded also if I try to open a form or user control in Design Mode I first get this -- could not find type, "MyType" please make sure that the assembly that contains this type is referenced and then, if I click Ignore and Continue I get this for all Forms and Contros when I try and look at them in Design Mode -- Exception of type System.OutOfMemoryException was thrown Help!?!? When I googled I came across mostly references to VS 2003...I am on 2008 sp1.

    Read the article

  • Django Grouping Query

    - by Matt
    I have the following (simplified) models: class Donation(models.Model): entry_date = models.DateTimeField() class Category(models.Model): name = models.CharField() class Item(models.Model): donation = models.ForeignKey(Donation) category = models.ForeignKey(Category) I'm trying to display the total number of items, per category, grouped by the donation year. I've tried this: Donation.objects.extra(select={'year': "django_date_trunc('year', %s.entry_date)" % Donation._meta.db_table}).values('year', 'item__category__name').annotate(items=Sum('item__quantity')) But I get a Field Error on item__category__name. I've also tried: Item.objects.extra(select={"year": "django_date_trunc('year', entry_date)"}, tables=["donations_donation"]).values("year", "category__name").annotate(items=Sum("quantity")).order_by() Which generally gets me what I want, but the item quantity count is multiplied by the number of donation records. Any ideas? Basically I want to display this: 2010 - Category 1: 10 items - Category 2: 17 items 2009 - Category 1: 5 items - Category 3: 8 items

    Read the article

  • Craft a JSONpath expression so that it retrieves only a specific value?

    - by Alex
    Hello, I have some JSON of which the following is a small sample: results": { "div": [ { "class": "sylEntry", "id": "sylOne", "div": [ { "class": "sT", "id": "sOT", "p": "Mon 11/17, Computer work time" }, { "class": "des", "id": "dOne", "p": "All classes Siebel 0218" } ] }, I would like to only retrieve the "p" content for the div element with class "sT". I would like to use a loop and doing something like this: var arrayOfResults = $.results..div.p does not work because I only want to retrieve the p value for the div element with class "sT". So how do I construct my JSONpath so that it will retrive the array of p elements that are contained within the divs class "sT". Thanks!!

    Read the article

  • No GPS updates on Galaxy S3

    - by Valelik
    I'm developing a GPS tracker and it works like a charm. But a couple of weeks ago a customer of me (a trackage company) bought Samsung Galaxy S3 for his drivers. And since that we have really strange behaviour of my app. The app receives location updates from GPS receiver, but after some hours of work it doesn't receive any location updates. I have registered the app for onGpsStatusChanged() too and in this time onGpsStatusChanged() was called (I see that GPS receiver have 10-17 satellites!), but the method onLocationChanged() was not called! After the service restart (=re-registering of LocationListener) it works again. It is really strange. It seems that after some hours of work the GPS reciever is not in the mood for calling onLocationChanged() :) Any idea what may be wrong?

    Read the article

  • Pyparsing CSV string with random quotes

    - by gtfx
    Hey, I have a string like the following: <118date=2010-05-09,time=16:41:27,device_id=FE-2KA3F09000049,log_id=0400147717,log_part=00,type=statistics,subtype=n/a,pri=information,session_id=o49CedRc021772,from="[email protected]",mailer="mta",client_name="example.org,[194.177.17.24]",resolved=OK,to="[email protected]",direction="in",message_length=6832079,virus="",disposition="Accept",classifier="Not,Spam",subject="=?windows-1255?B?Rlc6IEZ3OiDg5fDp5fog+fno5fog7Pf46eHp7S3u4+Tp7SE=?=" I tried using CSV module and it didn't fit, cause i haven't found a way to ignore what's quoted. Pyparsing looked like a better answer but i haven't found a way to declare all the grammars. Currently, i am using my old Perl script to parse it, but i want this written in Python. if you need my Perl snippet i will be glad to provide it. Any help is appreciated.

    Read the article

  • php: ip2long returning negative val

    - by andufo
    hi, function ip_address_to_number($IPaddress) { if(!$IPaddress) { return false; } else { $ips = split('\.',$IPaddress); return($ips[3] + $ips[2]*256 + $ips[1]*65536 + $ips[0]*16777216); } } that function executes the same code as the php bundled function ip2long. however, when i print these 2 values, i get 2 different returns. why? (im using php 5.2.10 on a wamp environment). ip2long('200.117.248.17'); //returns -931792879 ip_address_to_number('200.117.248.17'); // returns 3363174417

    Read the article

  • Is it possible to have a tableless select with multiple rows?

    - by outis
    A SELECT without a FROM clause gets us a multiple columns without querying a table: SELECT 17+23, REPLACE('bannanna', 'nn', 'n'), RAND(), CURRENT_TIMESTAMP; How can we write a query that results in multiple rows without referring to a table? Basically, abuse SELECT to turn it into a data definition statement. The result could have a single column or multiple columns. I'm most interested in a DBMS neutral answer, but others (e.g. based on UNPIVOT) are welcome. There's no technique application behind this question; it's more theoretical than practical.

    Read the article

  • jquery clickling fast

    - by Johansrk
    Hi. I have this function, that adds 31px to my style bottom on ul. It works fine, but if I click fast, it no longer adds 31px, but some weird number like 17.423px. I guess it's because the animation isn't done, and thereby by clicking fast it adds 31px to the current px amount. My thought is that I need to insert a stop(). But where? Thanks $(function () { $('.topTenTwocolumns .topTenTwocolumnsWrap .down').click(function () { if ($("ul").css("bottom") !== '2728px') { $(this).parents('.topTenTwocolumnsWrap').children('ul').stop().animate({ bottom: '+=31' }, 200); } }); });

    Read the article

  • cannot read multiple rows from sqldatareader

    - by amby
    Hi, when i query for only one record/row, sqldatareader is giving correct result but when i query for multiple rows, its giving error on the client side. below is my code. please tell me what is the problem here. string query = "select * from Customer_Order where orderNumber = " + order;//+" OR orderNumber = 17"; DataTable dt = new DataTable(); Hashtable sendData = new Hashtable(); try { using (SqlConnection conn = new SqlConnection(ConnectionString)) { using (SqlCommand cmd = new SqlCommand(query, conn)) { conn.Open(); SqlDataReader dr = cmd.ExecuteReader(CommandBehavior.CloseConnection); dt.Load(dr); } }

    Read the article

  • Reading a triangle of numbers into a 2d array of ints in Python

    - by Gabriel Silk
    I want to read a triangle of integer values from a file into a 2D array of ints using Python. The numbers would look like this: 75 95 64 17 47 82 18 35 87 10 20 04 82 47 65 ... The code I have so far is as follows: f = open('problem18.input', 'r') arr = [] for i in range(0, 15): arr.append([]) str = f.readline() a = str.split(' ') for tok in a: arr[i].append(int(tok[:2])) print arr I have a feeling this could be done in a tighter, more Pythonesque way. How would you do it?

    Read the article

  • Matching of tuples

    - by Jack
    From what I understood I can use pattern-matching in a match ... with expression with tuples of values, so something like match b with ("<", val) -> if v < val then true else false | ("<=", val) -> if v <= val then true else false should be correct but it gives me a syntax error as if the parenthesis couldn't be used: File "ocaml.ml", line 41, characters 14-17: Error: Syntax error: ')' expected File "ocaml.ml", line 41, characters 8-9: Error: This '(' might be unmatched referring on first match clause.. Apart from that, can I avoid matching strings and applying comparisons using a sort of eval of the string? Or using directly the comparison operator as the first element of the tuple?

    Read the article

  • R ggplot barplot; Fill based on two separate variables

    - by user1476968
    A picture says more than a thousand words. As you can see, my fill is based on the variable variable. Within each bar there is however multiple data entities (black borders) since the discrete variable complexity make them unique. What I am trying to find is something that makes each section of the bar more distinguishable than the current look. Preferable would be if it was something like shading. Here's an example (not the same dataset, since the original was imported): dat <- read.table(text = "Complexity Method Sens Spec MMC 1 L Alpha 50 20 10 2 M Alpha 40 30 80 3 H Alpha 10 10 5 4 L Beta 70 50 60 5 M Beta 49 10 80 6 H Beta 90 17 48 7 L Gamma 19 5 93 8 M Gamma 18 39 4 9 H Gamma 10 84 74", sep = "", header=T) library(ggplot2) library(reshape) short.m <- melt(dat) ggplot(short.m, aes(x=Method, y= value/100 , fill=variable)) + geom_bar(stat="identity",position="dodge", colour="black") + coord_flip()

    Read the article

  • Symbol exporting problem using __declspec(dllexport)

    - by Gayan
    I use __declspec(dllexport) with several methods in a library. But one of the symbols do not get exported properly. The value in question is called "restart". I've given the output from dumpbin.exe, below: 1 0 0002DB27 ev_err = @ILT+2850(_ev_err) 2 1 0002DADC m_foutput = @ILT+2775(_m_foutput) 3 2 0002D361 m_free = @ILT+860(_m_free) 4 3 0002D505 m_free_vars = @ILT+1280(_m_free_vars) 5 4 0002D055 m_get = @ILT+80(_m_get) 6 5 0002D95B m_ident = @ILT+2390(_m_ident) 7 6 0002D80C m_inverse = @ILT+2055(_m_inverse) 8 7 0002D0F5 m_mlt = @ILT+240(_m_mlt) 9 8 0002D339 m_ones = @ILT+820(_m_ones) 10 9 0002D43D m_rand = @ILT+1080(_m_rand) 11 A 0002DC3F m_resize = @ILT+3130(_m_resize) 12 B 0002D465 m_zero = @ILT+1120(_m_zero) 13 C 0002D3A7 px_foutput = @ILT+930(_px_foutput) 14 D 0002DA2D px_free = @ILT+2600(_px_free) 15 E 00092DE0 restart = _restart 16 F 0002DB45 set_err_flag = @ILT+2880(_set_err_flag) 17 10 0002D550 v_foutput = @ILT+1355(_v_foutput) 18 11 0002D839 v_free = @ILT+2100(_v_free) This seems to indicate that restart did not get exported properly but I can't figure out why. I use the following line to export the method: extern __declspec(dllexport) jmp_buf restart; What is the reason for this anomaly and how can I resolve it?

    Read the article

  • Recursive function causing a stack overflow

    - by dbyrne
    I am trying to write a simple sieve function to calculate prime numbers in clojure. I've seen this question about writing an efficient sieve function, but I am not to that point yet. Right now I am just trying to write a very simple (and slow) sieve. Here is what I have come up with: (defn sieve [potentials primes] (if-let [p (first potentials)] (recur (filter #(not= (mod % p) 0) potentials) (conj primes p)) primes)) For small ranges it works fine, but causes a stack overflow for large ranges: user=> (sieve (range 2 30) []) [2 3 5 7 11 13 17 19 23 29] user=> (sieve (range 2 15000) []) java.lang.StackOverflowError (NO_SOURCE_FILE:0) I thought that by using recur this would be a non-stack-consuming looping construct? What am I missing?

    Read the article

  • Doctrine_Table_Exception: Unknown relation alias shoesTable [closed]

    - by Sadiqur Rahman
    I am getting following error message: Doctrine_Table_Exception: Unknown relation alias shoesTable in /home/public_html/projects/giftshoes/system/database/doctrine/Doctrine/Relation/Parser.php on line 237 My Code is below: ------------BaseShoe------------ <?php // Connection Component Binding Doctrine_Manager::getInstance()->bindComponent('Shoes', 'sadiqsof_giftshoes'); /** * BaseShoes * * This class has been auto-generated by the Doctrine ORM Framework * * @property integer $sku * @property string $name * @property string $keywords * @property string $description * @property string $manufacturer * @property float $sale_price * @property float $price * @property string $url * @property string $image * @property string $category * @property Doctrine_Collection $Viewes * * @package ##PACKAGE## * @subpackage ##SUBPACKAGE## * @author ##NAME## <##EMAIL##> * @version SVN: $Id: Builder.php 6820 2009-11-30 17:27:49Z jwage $ */ abstract class BaseShoes extends Doctrine_Record { public function setTableDefinition() { $this->setTableName('shoes'); $this->hasColumn('sku', 'integer', 4, array( 'type' => 'integer', 'fixed' => 0, 'unsigned' => false, 'primary' => true, 'autoincrement' => false, 'length' => '4', )); $this->hasColumn('name', 'string', 255, array( 'type' => 'string', 'fixed' => 0, 'unsigned' => false, 'primary' => false, 'notnull' => true, 'autoincrement' => false, 'length' => '255', )); $this->hasColumn('keywords', 'string', 255, array( 'type' => 'string', 'fixed' => 0, 'unsigned' => false, 'primary' => false, 'notnull' => true, 'autoincrement' => false, 'length' => '255', )); $this->hasColumn('description', 'string', null, array( 'type' => 'string', 'fixed' => 0, 'unsigned' => false, 'primary' => false, 'notnull' => true, 'autoincrement' => false, 'length' => '', )); $this->hasColumn('manufacturer', 'string', 20, array( 'type' => 'string', 'fixed' => 0, 'unsigned' => false, 'primary' => false, 'notnull' => true, 'autoincrement' => false, 'length' => '20', )); $this->hasColumn('sale_price', 'float', null, array( 'type' => 'float', 'fixed' => 0, 'unsigned' => false, 'primary' => false, 'notnull' => true, 'autoincrement' => false, 'length' => '', )); $this->hasColumn('price', 'float', null, array( 'type' => 'float', 'fixed' => 0, 'unsigned' => false, 'primary' => false, 'notnull' => true, 'autoincrement' => false, 'length' => '', )); $this->hasColumn('url', 'string', null, array( 'type' => 'string', 'fixed' => 0, 'unsigned' => false, 'primary' => false, 'notnull' => true, 'autoincrement' => false, 'length' => '', )); $this->hasColumn('image', 'string', null, array( 'type' => 'string', 'fixed' => 0, 'unsigned' => false, 'primary' => false, 'notnull' => true, 'autoincrement' => false, 'length' => '', )); $this->hasColumn('category', 'string', 50, array( 'type' => 'string', 'fixed' => 0, 'unsigned' => false, 'primary' => false, 'notnull' => true, 'autoincrement' => false, 'length' => '50', )); } public function setUp() { parent::setUp(); $this->hasMany('Viewes', array( 'local' => 'sku', 'foreign' => 'sku')); } } --------------ShoesTable-------- <?php class ShoesTable extends Doctrine_Table { function getAllShoes($from = 0, $total = 15) { $q = Doctrine_Query::create() ->from('Shoes') ->limit($total) ->offset($from); return $q->execute(array(), Doctrine::HYDRATE_ARRAY); } } ---------------Shoes Model----------------- <?php /** * Shoes * * This class has been auto-generated by the Doctrine ORM Framework * * @package ##PACKAGE## * @subpackage ##SUBPACKAGE## * @author ##NAME## <##EMAIL##> * @version SVN: $Id: Builder.php 6820 2009-11-30 17:27:49Z jwage $ */ class Shoes extends BaseShoes { function __construct() { parent::__construct(); $this->shoesTable = Doctrine::getTable('Shoes'); } function getAllShoes() { return $this->shoesTable->getAllShoes(); } }

    Read the article

  • No Internet access while being connected to VPN using Cisco VPN Client 5.

    - by szeldon
    Hi, I have an access to corporate VPN using Cisco VPN Client 5.0.00:0340, but when I'm connected to it, I don't have an Internet access. I'm using Windows XP SP3. As it was suggested here http://forums.speedguide.net/showthread.php?t=209167 , I tried to enable "Allow local LAN Access" but it doesn't work. I also tried a second solution - deleting entry using "route" command, but it didn't help. I used "route delete 192.168.100.222". It's a third day of my attempts to solve this issue and I don't have an idea what else to do. I'm not very experienced in VPN stuff, but I know something about networking. Basing on my knowledge, I think that it's theoretically possible to achieve Internet access using my local network and only corporate stuff to be routed using VPN connection. I think that theoretically this should look like this: every IP being inside by corporation - VPN interface IP every other IP - my ethernet interface I've tried many possibilities of how to change those routes, but neither of them work. I'd really appreciate any help. My route configuration before connecting to VPN: =========================================================================== Interface List 0x1 ........................... MS TCP Loopback interface 0x2 ...00 c0 a8 de 79 01 ...... Atheros AR5006EG Wireless Network Adapter - Teefer2 Miniport 0x10005 ...02 00 4c 4f 4f 50 ...... Microsoft Loopback Card 0x160003 ...00 17 42 31 0e 16 ...... Marvell Yukon 88E8055 PCI-E Gigabit Ethernet Controller - Teefer2 Miniport =========================================================================== =========================================================================== Active routes: Network Destination Netmask Gateway Interface Metrics 0.0.0.0 0.0.0.0 192.168.101.254 192.168.100.222 10 10.0.0.0 255.255.255.0 10.0.0.10 10.0.0.10 30 10.0.0.10 255.255.255.255 127.0.0.1 127.0.0.1 30 10.255.255.255 255.255.255.255 10.0.0.10 10.0.0.10 30 127.0.0.0 255.0.0.0 127.0.0.1 127.0.0.1 1 192.168.100.0 255.255.254.0 192.168.100.222 192.168.100.222 1 192.168.100.222 255.255.255.255 127.0.0.1 127.0.0.1 1 192.168.100.255 255.255.255.255 192.168.100.222 192.168.100.222 1 224.0.0.0 240.0.0.0 10.0.0.10 10.0.0.10 3 224.0.0.0 240.0.0.0 192.168.100.222 192.168.100.222 1 255.255.255.255 255.255.255.255 10.0.0.10 10.0.0.10 1 255.255.255.255 255.255.255.255 192.168.100.222 192.168.100.222 1 255.255.255.255 255.255.255.255 192.168.100.222 2 1 Default gateway: 192.168.101.254. =========================================================================== My route configuration after connection to VPN: =========================================================================== Interface List 0x1 ........................... MS TCP Loopback interface 0x2 ...00 c0 a8 de 79 01 ...... Atheros AR5006EG Wireless Network Adapter - Teefer2 Miniport 0x10005 ...02 00 4c 4f 4f 50 ...... Microsoft Loopback Card 0x160003 ...00 17 42 31 0e 16 ...... Marvell Yukon 88E8055 PCI-E Gigabit Ethernet Controller - Teefer2 Miniport 0x170006 ...00 05 9a 3c 78 00 ...... Cisco Systems VPN Adapter - Teefer2 Miniport =========================================================================== =========================================================================== Active routes: Network Destination Netmask Gateway Interface Metrics 0.0.0.0 0.0.0.0 10.251.6.1 10.251.6.51 1 10.0.0.0 255.255.255.0 10.0.0.10 10.0.0.10 30 10.0.0.0 255.255.255.0 10.251.6.1 10.251.6.51 10 10.0.0.10 255.255.255.255 127.0.0.1 127.0.0.1 30 10.1.150.10 255.255.255.255 192.168.101.254 192.168.100.222 1 10.251.6.0 255.255.255.0 10.251.6.51 10.251.6.51 20 10.251.6.51 255.255.255.255 127.0.0.1 127.0.0.1 20 10.255.255.255 255.255.255.255 10.0.0.10 10.0.0.10 30 10.255.255.255 255.255.255.255 10.251.6.51 10.251.6.51 20 127.0.0.0 255.0.0.0 127.0.0.1 127.0.0.1 1 192.168.100.0 255.255.254.0 192.168.100.222 192.168.100.222 10 192.168.100.0 255.255.254.0 10.251.6.1 10.251.6.51 10 192.168.100.222 255.255.255.255 127.0.0.1 127.0.0.1 10 192.168.100.255 255.255.255.255 192.168.100.222 192.168.100.222 10 213.158.197.124 255.255.255.255 192.168.101.254 192.168.100.222 1 224.0.0.0 240.0.0.0 10.0.0.10 10.0.0.10 30 224.0.0.0 240.0.0.0 10.251.6.51 10.251.6.51 20 224.0.0.0 240.0.0.0 192.168.100.222 192.168.100.222 10 255.255.255.255 255.255.255.255 10.0.0.10 10.0.0.10 1 255.255.255.255 255.255.255.255 10.251.6.51 10.251.6.51 1 255.255.255.255 255.255.255.255 192.168.100.222 192.168.100.222 1 255.255.255.255 255.255.255.255 192.168.100.222 2 1 Default gateway: 10.251.6.1. ===========================================================================

    Read the article

  • c++ variadic macro argument count

    - by chedi
    Hi, is there any way to count the number of argument of a variadic macro, other than this one: #define PP_NARG(...) PP_NARG_(__VA_ARGS__,PP_RSEQ_N()) #define PP_NARG_(...) PP_ARG_N(__VA_ARGS__) #define PP_ARG_N( \ _1, _2, _3, _4, _5, _6, _7, _8, _9,_10, _11,_12,_13,_14,_15,_16,_17,_18,_19,_20, \ _21,_22,_23,_24,_25,_26,_27,_28,_29,_30, _31,_32,_33,_34,_35,_36,_37,_38,_39,_40, \ _41,_42,_43,_44,_45,_46,_47,_48,_49,_50, _51,_52,_53,_54,_55,_56,_57,_58,_59,_60, \ _61,_62,_63,N,...) N #define PP_RSEQ_N() \ 63,62,61,60,59,58,57,56,55,54,53,52,51,50,49,48,47,46,45,44,43,42,41,40, \ 39,38,37,36,35,34,33,32,31,30,29,28,27,26,25,24,23,22,21,20,19,18,17,16, \ 15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0

    Read the article

  • Please help, now I have a matrix, I want use Combination algorithm to generate a array for length 6

    - by user313429
    The first thanks a lot for your help , the following is my matrix, I want to implement combination algorithm between multiple arrays in LINQ for this matrix. int[,] cj = { { 10, 23, 16, 20 }, { 22, 13, 1, 33 }, { 7, 19, 31, 12 }, { 30, 14, 21, 4 }, { 2, 29, 32, 6 }, { 18, 26, 17, 8 }, { 25, 11, 5, 28 }, { 24, 3, 15, 27 } }; other: public static IEnumerable<IEnumerable<T>> Combinations<T>(this IEnumerable<T> elements, int k) { return k == 0 ? new[] { new T[0] } : elements.SelectMany((e, i) => elements.Skip(i + 1).**Combinations**(k - 1).Select(c => (new[] { e }).Concat(c))); } The above method has a error in my project, System.Collections.Generic.IEnumerable' does not contain a definition for 'Combinations' and no extension method 'Combinations' accepting a first argument of type 'System.Collections.Generic.IEnumerable' could be found (are you missing a using directive or an assembly reference? I use .Net Framework3.5, what is the reason it?

    Read the article

  • Using Full-Text Search in SQL Server 2005 across multiple tables, columns

    - by crisgomez
    Hi, I have a problem, I created a full text search query which return a record(s), in which the paramater I have supplied match(es) in every fields(full-text indexed) of multiple tables. The problem is , when the user.id is equal to ceritification.AId it returns a records eventhough it was not satisfied with the parameter supplied. For this example I supplied a value "xandrick" which return an Id=184, but the problem is it returns two ids which is 184 and 154.What is the best way to return an ID(s) that satisfied of the supplied given value? User table Id Firstname Lastname Middlename Email AlternativeEmail 154 Gregorio Honasan Pimentel [email protected] [email protected] 156 Qwerty Qazggf fgfgf [email protected]. [email protected] 184 Xandrick Flores NULL [email protected] null Certification table Id AID Certification School 12 184 sdssd AMA 13 43 web-based and framework 2 Asian development foundation college 16 184 hjhjhj STI 17 184 rrrer PUP 18 154 vbvbv AMA SELECT DISTINCT Users.Id FROM Users INNER JOIN Certification on Users.Id=Certification.aid LEFT JOIN FREETEXTTABLE (Users,(Firstname,Middlename,Lastname,Email,AlternativeEmail), 'xandrick' )as ftUsr ON Users.Id=ftUsr.[KEY] LEFT JOIN FREETEXTTABLE (Certification,(Certification,School), 'xandrick' )as ftCert ON Certification.Id=ftCert.[KEY]

    Read the article

  • Git pull error: unable to create temporary sha1 filename

    - by gnus.es
    Hi everyone, I've got a small git repo setup with the only real purpose to be able to develop locally on several machines (work, home, laptop). Thus I have one branch and I commit/push once I leave a computer, pull once I sit down at the next. Has worked fine, up to now that is. Now when I pull on my 'live test' machine, I get the following: remote: Counting objects: 38, done. remote: Compressiremote: ng objects: 100% (20/20), done. remote: Total 20 (delta 17), reused 0 (delta 0) error: unable to create temporary sha1 filename .git/objects/ed: File exists fatal: failed to write object fatal: unpack-objects failed Searching around the net the only real answer I could find was the following: http://marc.info/?l=git&m=122720741928774&w=2 which basically states that this is a bogus error that's on top of the pile and thus says nothing about what really is wrong. Where do I go from here to find out what is wrong? Edit: Removed the local copy and re-cloned

    Read the article

  • Top x rows and group by (again)

    - by Tibor Szasz
    Hello, I know it's a frequent question but I just can't figure it out and the examples I found didn't helped. What I learned, the best strategy is to try to find the top and bottom values of the top range and then select the rest, but implementing is a bit tricky. Example table: id | title | group_id | votes I'd like to get the top 3 voted rows from the table, for each group. I'm expecting this result: 91 | hello1 | 1 | 10 28 | hello2 | 1 | 9 73 | hello3 | 1 | 8 84 | hello4 | 2 | 456 58 | hello5 | 2 | 11 56 | hello6 | 2 | 0 17 | hello7 | 3 | 50 78 | hello8 | 3 | 9 99 | hello9 | 3 | 1 I've fond complex queries and examples, but they didn't really helped.

    Read the article

  • Setting selected item in custom Zend_Form_Element

    - by sanders
    Hello Everyone, I have created my own little form element for inputting time's. Since I need this on a few places in my application, i decided to create a seperate element for it. Here is the code so fa: class EventManager_Form_Element_Time extends Zend_Form_Element { public function init() { parent::init(); $this->addDecorator('ViewScript', array( 'viewScript' => 'time.phtml' )); $this->addValidator(new Zend_Validate_Regex('/^[0-9]+:[0-9]+:[0-9]+$/')); } public function setValue($value) { if(is_array($value)) { @list($hours, $minutes, $seconds) = $value; $value = sprintf('%s:%s:%s', $hours, $minutes, $seconds); } return parent::setValue($value); } } The corresponding view script, which I have created is: <?php @list($hours, $minutes, $seconds) = explode(':', $this->element->getValue()); ?> <dt> <?= $this->formLabel($this->element->getName(), $this->element->getLabel()); ?> </dt> <dd> <select id="<?= $this->element->getName();?>"> <option value="00">00</option> <option value="01">01</option> <option value="02">02</option> <option value="03">03</option> <option value="04">04</option> <option value="05">05</option> <option value="06">06</option> <option value="07">07</option> <option value="08">08</option> <option value="09">09</option> <option value="10">10</option> <option value="11">11</option> <option value="12">12</option> <option value="13">13</option> <option value="14">14</option> <option value="15">15</option> <option value="16">16</option> <option value="17">17</option> <option value="18">18</option> <option value="19">19</option> <option value="20">20</option> <option value="21">21</option> <option value="22">22</option> <option value="23">23</option> </select> <select id="<?= $this->element->getName();?>"> <option value="00">00</option> <option value="15">15</option> <option value="30">30</option> <option value="45">45</option> </select> <input id="<?= $this->element->getName(); ?>" type="hidden" name="<?= $this->element->getName(); ?>[]" value="00" /> <?php if(count($this->element->getMessages()) > 0): ?> <?= $this->formErrors($this->element->getMessages()); ?> <?php endif; ?> </dd> My problem is that sometimes i want to set a default selected value to my selecboxes when I populate my form. The question is how? Is there anyone that could help me out with this? Thanks.

    Read the article

  • SQL query duration is longer for smaller dataset?

    - by entens
    I received reports that a my report generating application was not working. After my initial investigation, I found that the SQL transaction was timing out. I'm mystified as to why the query for a smaller selection of items would take so much longer to return results. Quick query (averages 4 seconds to return): SELECT * FROM Payroll WHERE LINEDATE >= '04-17-2010'AND LINEDATE <= '04-24-2010' ORDER BY 'EMPLYEE_NUM' ASC, 'OP_CODE' ASC, 'LINEDATE' ASC Long query (averages 1 minute 20 seconds to return): SELECT * FROM Payroll WHERE LINEDATE >= '04-18-2010'AND LINEDATE <= '04-24-2010' ORDER BY 'EMPLYEE_NUM' ASC, 'OP_CODE' ASC, 'LINEDATE' ASC I could simply increase the timeout on the SqlCommand, but it doesn't change the fact the query is taking longer than it should. Why would requesting a subset of the items take longer than the query that returns more data? How can I optimize this query?

    Read the article

  • problem with parsing string from excel file

    - by ohana
    hi, i have ruby code to parse data in excel file using Parseexcel gem. I need to save 2 columns in that file into a Hash, here is my code: worksheet.each { |row| if row != nil key = row.at(1).to_s.strip value = row.at(0).to_s.strip if !parts.has_key?(key) and key.length 0 parts[key] = value end end } however it still save duplicate keys into the hash: "020098-10". I checked the excel file at the specified row and found the difference are " 020098-10" and "020098-10". the first one has a leading space while the second doesn't. I dont' understand is it true that .strip function already remove all leading and trailing white space? also when i tried to print out key.length, it gave me these weird number: 020098-10 length 18 020098-10 length 17 which should be 9....

    Read the article

< Previous Page | 86 87 88 89 90 91 92 93 94 95 96 97  | Next Page >