Search Results

Search found 1020 results on 41 pages for 'car'.

Page 12/41 | < Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >

  • Check if previous clicked value is inside an array

    - by Lelly
    I have a list with different categories. All the list item are clickable. I want the user to pick between 1 and 3 items. They can toggle their choice, but maximum is alway 3. So far, so good. Where it get tricky for me, is that I have some special categories that can't be combined with any others. When a user click on one of these, all the other categories deselect and they can't add any other, (these item have only 1 category selection possible) Exemple: Let's say "Car" is a special category. If they click on Car, everything else deselect, Car is selected, and they can't select anything else. BUT they can click again on Car to deselect it, and from there the logic start over. What's missing in my code is the part in bold just above this. My code: $j('.chooseCat li').on('click',function(){ var $this = $j(this); //list item clicked var catId = $this.children("a").attr("rel"); // list item id var specialCat = ['6','36','63']; if ($this.hasClass("selected")) { $this.removeClass("selected"); $j("#categorySuggestions p.error").hide("fast") } else { if( $j.inArray(catId, specialCat) !== -1 ) { $j('.chooseCat li').removeClass("selected"); $this.addClass("selected"); } else { if ($j('.chooseCat li.selected').length <= 2){ $this.addClass("selected"); } else { $j("#categorySuggestions p.error").show("fast").html("You cannot select any more categories"); } } } }); A working jsFiddle of where Iam at: http://jsfiddle.net/nfQum/9/

    Read the article

  • How to deny the web access to some files?

    - by Strae
    I need to do an operation a bit strange. First, i run on Debian, apache2 (which 'runs' as user www-data) So, I have simple text file with .txt ot .ini, or whatever extension, doesnt matter. These files are located in subfolders with a structure like this: www.example.com/folder1/car/foobar.txt www.example.com/folder1/cycle/foobar.txt www.example.com/folder1/fish/foobar.txt www.example.com/folder1/fruit/foobar.txt therefore, the file name always the same, ditto for the 'hierarchy', just change the name of the folder: /folder-name-static/folder-name-dinamyc/file-name-static.txt What I should do is (I think) relatively simple: I must be able to read that file by programs on the server (python, php for example), but if I try to retrieve the file contents by broswer (digiting the url www.example.com/folder1/car/foobar.txt, or via cUrl, etc..) I must get a forbidden error, or whatever, but not access the file. It would also be nice that even accessing those files via FTP are 'hidden', or anyway couldnt be downloaded (at least that I use with the ftp root and user data) How can I do? I found this online, be put in the file .htaccess: <Files File.txt> Order allow, deny Deny from all </ Files> It seems to work, but only if the file is in the web root (www.example.com / myfile.txt), and not in subfolders. Moreover, the folders in the second level (www.example.com/folder1/fruit/foobar.txt) will be dinamycally created.. I would like to avoid having to change .htaccess file from time to time. It is possible to create a rule, something like that, that goes for all files with given name, which is on www.example.com/folder-name-static/folder-name-dinamyc/file-name-static.txt, where those parts are allways the same, just that one change ? EDIT: As Dave Drager said, i could semplify this keeping those file outside the web accessible directory. But those directory's will contain others files too, images, and stuff used by my users, so i'm simply try to not have a duplicate folders system, like: /var/www/vhosts/example.com/httpdocs/folder1/car/[other folders and files here] /var/www/vhosts/example.com/httpdocs/folder1/cycle/[other folders and files here] /var/www/vhosts/example.com/httpdocs/folder1/fish/[other folders and files here] //and, then for the 'secrets' files: /folder1/data/car/foobar.txt /folder1/data/cycle/foobar.txt /folder1/data/fish/foobar.txt

    Read the article

  • Check keyword popularity of 2000 phrases?

    - by Mark
    I just found a list of about 2000 car manufacturers which I want to put into a drop-down list... but 2000 is probably a bit too many, so I want to filter it down to maybe the top 100 most popular cars. I figure I can just use Google search popularity to give me a rough estimate of how popular the car is... but I can't find a tool that will let me query 2000 keywords. Anyone know of one?

    Read the article

  • replace multiple characters at different places in a string Excel 2007

    - by conspirisi
    =SUBSTITUTE(AD!H35,"&","") The formula above replaces an ampersand in a cell where I have the text Handy Person / Driver & Car giving Handy Person / Driver Car How do I also remove the forward slash '/' ? I've seen it done with nested substitute formulas, but as I probably need to remove even more characters in the future. I'd rather use a more elegant solution. Perhaps even replacing an entire class of non-alphanumeric characters is another solution?

    Read the article

  • SQL..Sum two rows

    - by Cha
    Sample data: LOCATION NAME LABEL1 LABEL2 SERVICE TIME NY Andrew A B HOUSE 2555 NY Andrew A B CAR 35 NJ Copley C A HOUSE 1025 NY Copley A B HOUSE 650 VA Dalton D C PET 25 What I want to do ias add another column where in it shows sum(Time) of rows with same data except for the Service.Also, the services that I need are only the sum of car and house.Is this possible? If not can you help me with the right query Sample output I need: LOCATION NAME LABEL1 LABEL2 SERVICE TIME SUM NY Andrew A B HOUSE 2555 **2590** NY Andrew A B CAR 35 NJ Copley C A HOUSE 1025 1025 NY Copley A B HOUSE 650 650

    Read the article

  • Webreference vs servicereference. Only one works ? Serialization ?

    - by phenevo
    Hi, I've got two applications. One uses webreference to my webservice, and second use servicereference to my webservice. There is metohod which I'm invoking: [WebMethod] public Car[] GetCars(string carCode) { Cars[] cars= ModelToContract.ToCars(MyFacade.GetCars(carCode); return cars; } Car has two pools: string Code {get;set;} CarType Type {get;set;} public enum CarType { Van=0, Pickup=1 } I'm debuging this webMethod, and... at the end webservice throw good collection of cars, which has one car: code="bmw",Type.Van But... Application with webrefence receives the same collection and application with servicereference gets collection, where field code is null... Invoking servicereference: MyService myService=new MyService() Cars[] cars= client.GetCars(carcode); Invoking webservice: MyService.MyServiceSoapClient client = new MyServiceS.MyServiceSoapClient(); Cars[] cars= client.GetCars(carcode);

    Read the article

  • Classes / instances in Ontology

    - by SODA
    Hi, I'm trying to comprehend ontology basics. Here's an example: car (class) 2009 VW CC (sub-class or instance?) My neighbor's 2009 VW CC (instance) My issue is understanding what is "2009 VW CC" (as a car model). If you're making product model a sub-class in the ontology - all of a sudden your ontology becomes bloated with thousands of subclasses of a "car". That's redundant. At the same time we can't say "2009 VW CC" is an instance, at least it's not material instance of a class. Does it make sense to distinguish between regular instances and material (distinct physical objects)? At the other hand, if both are instances (of different nature so to say), then how can instance inherit properties / relations of a non-class?

    Read the article

  • Jquery Randomizing within Categories

    - by David Chase
    Hi, so here is my question in a situation if you will. i have 6 items in div classes which correspond to 3 categories something like this class ="boat" class ="car" class ="bike" class ="blueboat" class ="redcar" class ="greenbike" so is there a jquery/javascript approach with .addClass where when someone clicks on the button "Randomize" it addClass .mine to each one of the 3 categories ie blueboat.mine and redcar.mine and bike.mine but not boat or car or greenbike because they are in the same category? or another situation rather than .addClass use a jquery/javascript so when "Randomize" is clicked to randomly show 3 out of 6 items one in each category of boat,car,bike and hide the rest blueboat,redcar,greenbike. in this situation all 6 items are on the page when document is ready but with the randomize only 3 are left one from each category. please let me know if anyone has any ideas or needs further clarification any help is greatly appreciated. thank you -david

    Read the article

  • drupal what if we have designed a content type with existing fields

    - by rakeshakurathi
    i have small problem.... i have one content type say cars with various fields, say more than 30 , user can create the content types... now i would like to show only few fields in different phases,is there any possibility to do that. more explantaion:- user may enter the car model and car details in the first page and upload images in second page.(say a popup in the block) is this is possible ? i m newbie to drupal, i would like to do this kind of data updation, i though with designing a one more content type with the existing fields, can any one explain this issue... what if i design a content type car1 with same fields say(file uplaod) in car content type.

    Read the article

  • In need of a semantic thesaurus as a SAS

    - by Roy Peleg
    Hello, I'm currently building a web application. In one of it's key processes the application need to match short phrases to other similar ones available in the DB. The application needs to be able to match the phrase: Looking for a second hand car in good shape To other phrases which basically have the same meaning but use different wording, such as: 2nd hand car in great condition needed or searching for a used car in optimal quality The phrases are length limited (say 250 chars), user generated & unstructured. I'm in need of a service / company / some solution which can help / do these connections for me. Can anyone give any ideas? Thanks, Roy

    Read the article

  • Webreference vs servicereference. Why ony one works ?

    - by phenevo
    Hi, I've got two applications. One uses webreference to my webservice, and second use servicereference to my webservice. There is metohod which I'm invoking: [WebMethod] public Car[] GetCars(string carCode) { Cars[] cars= ModelToContract.ToCars(MyFacade.GetCars(carCode); return cars; } Car has two pools: string Code {get;set;} CarType Type {get;set;} public enum CarType { Van=0, Pickup=1 } I'm debuging this webMethod, and... at the end webservice throw good collection of cars, which has one car: code="bmw",Type.Van But... Application with webrefence receives the same collection and application with servicereference gets collection, where field code is null... Invoking servicereference: MyService myService=new MyService() Cars[] cars= client.GetCars(carcode); Invoking webservice: MyService.MyServiceSoapClient client = new MyServiceS.MyServiceSoapClient(); Cars[] cars= client.GetCars(carcode);

    Read the article

  • C# winforms: DataSet with multiple levels of related tables

    - by Jake
    Hi, I am trying to use DataSet and DataAdapter to "filter" and "navigate" DataRows in DataTables. THE SITUATION: I have multiple logical objects, e.g. Car, Door and Hinge. I am loading a Form which will display complete Car information including each Door and their respective Hinges. In this senario, The form should display info for 1 car, 4 doors and 2 hinges for each door. Is it possible to use a SINGLE DataSet to navigate this Data? i.e. 1 DataRow in car_table, 4 DataRow in door_table and 8 DataRow in hinge_table, and still be able to navigate correctly between the different object and their relations? AND, able to DataAdapter.Update() easily? I have read about DataRelation but don't really understand how to use it. Not sure if it is the correct direction for my problem. Appreciate any advise. Thanks!

    Read the article

  • In need of a SaaS solution for semantic thesaurus matching

    - by Roy Peleg
    Hello, I'm currently building a web application. In one of it's key processes the application need to match short phrases to other similar ones available in the DB. The application needs to be able to match the phrase: Looking for a second hand car in good shape To other phrases which basically have the same meaning but use different wording, such as: 2nd hand car in great condition needed or searching for a used car in optimal quality The phrases are length limited (say 250 chars), user generated & unstructured. I'm in need of a service / company / some solution which can help / do these connections for me. Can anyone give any ideas? Thanks, Roy

    Read the article

  • Nhibernate mapping: fixed count multiple members instead of collection

    - by AhmetC
    I don't want to put wheels into a collection. How can i map kind of relation? Class Wheel { int id; Car Owner; } Class Car { int id; Wheel Wheel1; Wheel Wheel2; Wheel Wheel3; Wheel Wheel4; } I tried this but Wheelmap.Owner comes always null : Class WheelMap : ClassMap<Wheel> { Id(x=>x.Id); References(x=>x.Owner); } Class CarMap : ClassMap<Car> { Id(x=>x.Id); References(x=>x.Wheel1).Cascade.All(); References(x=>x.Wheel2).Cascade.All(); References(x=>x.Wheel3).Cascade.All(); References(x=>x.Wheel4).Cascade.All(); }

    Read the article

  • Python: Traffic-Simulation (cars on a road)

    - by kame
    Hello! I want to create a traffic simulator like here: http://www.doobybrain.com/wp-content/uploads/2008/03/traffic-simulation.gif But I didn't thougt very deep about this. I would create the class car. Every car has his own color, position and so on. And I could create the road with an array. But how to tell the car where to go? Could I hear your ideas? EDIT: Is it forbidden to get new ideas from good programmers? Why do some people want to close this thread? Or were to ask such questions? I dont understand them. :(

    Read the article

  • PHP Classes: Call method in instance of a class by instance's name

    - by Ursus Russus
    Hi, i have a class of this kind Class Car { private $color; public function __construct($color){ $this->color=$color; } public function get_color(){ return $this->$color; } } Then i create some instances of it: $blue_car = new car('blue'); $green_car = new car('green'); etc. Now i need to call method get_color() on the fly, according to instance's name $instance_name='green_car'; Is there any way to do it?

    Read the article

  • ColumnCount in DataGridView remains 0 after assigning data source

    - by Manan Shah
    I am having trouble with the following simple code List<Car> tempList = new List<Car>(); BindingSource bindingSource = new BindingSource(); bindingSource.DataSource = tempList; dgTempView.DataSource = bindingSource; Here, dgTempView is a data grid view After the above lines execute, the column count in the datagrid view remains 0. And when I try adding a Car instance in tempList, I get an error saying that 'no row can be added to a datagridview control that does not have columns' . I am not able to understand what am I missing here

    Read the article

  • Find all paths from root to leaves of tree in Scheme

    - by grifaton
    Given a tree, I want to find the paths from the root to each leaf. So, for this tree: D / B / \ A E \ C-F-G has the following paths from root (A) to leaves (D, E, G): (A B D), (A B E), (A C F G) If I represent the tree above as (A (B D E) (C (F G))) then the function g does the trick: (define (g tree) (cond ((empty? tree) '()) ((pair? tree) (map (lambda (path) (if (pair? path) (cons (car tree) path) (cons (car tree) (list path)))) (map2 g (cdr tree)))) (else (list tree)))) (define (map2 fn lst) (if (empty? lst) '() (append (fn (car lst)) (map2 fn (cdr lst))))) But this looks all wrong. I've not had to do this kind of thinking for a while, but I feel there should be a neater way of doing it. Any ideas for a better solution (in any language) would be appreciated.

    Read the article

  • Create IEnumerable<T>.Find()

    - by Brian
    I'd like to write: IEnumerable<Car> cars; cars.Find(car => car.Color == "Blue") Can I accomplish this with extension methods? The following fails because it recursively calls itself rather than calling IList.Find(). public static T Find<T>(this IEnumerable<T> list, Predicate<PermitSummary> match) { return list.ToList().Find(match); } Thanks!

    Read the article

  • How hard is it to create a not-so-random number generator?

    - by Duracell
    Backstory: So I was driving to band practice this evening. My car has a USB port where you can plug in a USB stick with MP3 files on it and the stereo will play them. I have about 100 MP3s on my stick so I pushed the 'Random' button. So from here to band practice, it played: Track 22 Track 45 Track 4 Track 11 Track 87 Track 66 Track 98 Then on the way home, it played Track 16 Track 27 Track 33 And then I stopped at the petrol station. I filled up, got back in the car and the stereo fired up again. It played Track 22 Track 45 Track 4 Track 11 Track 87 I thought, WTF? What's with this 'random' generator? What are they using as a seed, if not time? Is a car stereo so memory-tight that it can't even use the C stdlib? Does anyone know how this kind of thing happens?

    Read the article

  • Looking for a free tool to visualize object relationships for C#

    - by vfilby
    Here is my ideal solution: a free tool that reads a .csporj or .sln and generates a pretty picture that shows all the objects and how they are related. By relationships, I don't mean inheritance but rather dependency. For example, if we have a Car object and Car has a member variable Wheel, I would like that Car depends on Wheel to be visualized in the graph. I know visual studio can do inheritance graphs, but that is only half of what I am looking for. Is what I am looking for possible? Are there any tools that do something similar? Related question for java: http://stackoverflow.com/questions/1824261/are-there-any-tools-to-visualize-the-objects-being-used-in-a-program

    Read the article

  • what is the best way to have a Generic Comparer

    - by oo
    I have a lot of comparer classes where the class being compared is simply checking the name property of the object and doing a string compare. For example: public class ExerciseSorter : IComparer<Exercise> { public int Compare(Exercise x, Exercise y) { return String.Compare(x.Name, y.Name); } } public class CarSorter : IComparer<Car> { public int Compare(Car x, Car y) { return String.Compare(x.Name, y.Name); } } what is the best way to have this code generic so i dont need to write redundant code over and over again.

    Read the article

  • make tree in scheme

    - by ???
    (define (entry tree) (car tree)) (define (left-branch tree) (cadr tree)) (define (right-branch tree) (caddr tree)) (define (make-tree entry left right) (list entry left right)) (define (mktree order items_list) (cond ((= (length items_list) 1) (make-tree (car items_list) '() '())) (else (insert2 order (car items_list) (mktree order (cdr items_list)))))) (define (insert2 order x t) (cond ((null? t) (make-tree x '() '())) ((order x (entry t)) (make-tree (entry t) (insert2 order x (left-branch t)) (right-branch t))) ((order (entry t) x ) (make-tree (entry t) (left-branch t) (insert2 order x (right-branch t)))) (else t))) The result is: (mktree (lambda (x y) (< x y)) (list 7 3 5 1 9 11)) (11 (9 (1 () (5 (3 () ()) (7 () ()))) ()) ()) But I'm trying to get: (7 (3 (1 () ()) (5 () ())) (9 () (11 () ()))) Where is the problem?

    Read the article

  • Do there any dev who wrote iPhone wifi/bluetooth multiplay before?

    - by Jerry1923
    Hi there, do there any dev who wrote iPhone wifi/bluetooth multiplay before? Recently, I'm trying to make my latest game Doodle Kart to have mulityplay via bluetooth. But I found that there are hugh data need to share between the 2 devices. -your car's position and direction -your car's status(it is in normal state, it is hitting by bullet, it is falling into to hole....) -CUP car's position, dicretion, and their status -items position and status (pencil, bullet...) I'm thinking about one device calculate all the things, and the other device just wait and receive the data to display on the screen. Does it make sense? Hey, I should ask you the most important question first: Do you think it's possible to make bluetooth multiplay work on my game? It's just too much data need to share between the device.

    Read the article

  • Binding to object properties in C++

    - by Rich.Carpenter
    I've seen in WPF where you can bind control values to properties of other controls. How is that binding accomplished in C++? For example, if I have a class called Car and a guage control called RPM, how do I tie the value of RPM to the member variable Car.RPM, so that when Car.RPM changes, it is automatically (as in without a specific update call coded by me) reflected by the RPM control? General answers or directions to pertinent resources would be fine also, as I'm just beginning to dabble in C++ and haven't had much Google luck with this particular question.

    Read the article

< Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >