Daily Archives

Articles indexed Monday June 2 2014

Page 7/18 | < Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >

  • Creating A Simple Bash Script With Multiple Commands

    - by unorthodox grammar
    Trying to create a bash script that opens gnome-terminal, and then runs ls to display the contents of a directory, but it just opens gnome-terminal. I will be creating some other scripts that also use multiple commands. My script: #!/bin/bash gnome-terminal ls -a /examplefolder EDIT: To clarify what I'm trying to achieve. I'm trying to create a script that will open gnome-terminal, list the contents of /examplefolder, and then be ready for regular terminal usage. Is this possible, or am I barking up the wrong tree?

    Read the article

  • Battery Life in ubuntu 14.04

    - by user287466
    Today i had fresh installation of ubuntu 14.04 previously i had ubuntu 12.04 and had 5 to 6 hours of battery backup even at constant work, but in 14.04 getting 3 hrs only, tried with tlp but no use. lspci: 0:00.0 Host bridge: Intel Corporation 3rd Gen Core processor DRAM Controller (rev 09) 00:02.0 VGA compatible controller: Intel Corporation 3rd Gen Core processor Graphics Controller (rev 09) 00:14.0 USB controller: Intel Corporation 7 Series/C210 Series Chipset Family USB xHCI Host Controller (rev 04) 00:16.0 Communication controller: Intel Corporation 7 Series/C210 Series Chipset Family MEI Controller #1 (rev 04) 00:1a.0 USB controller: Intel Corporation 7 Series/C210 Series Chipset Family USB Enhanced Host Controller #2 (rev 04) 00:1b.0 Audio device: Intel Corporation 7 Series/C210 Series Chipset Family High Definition Audio Controller (rev 04) 00:1c.0 PCI bridge: Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 1 (rev c4) 00:1c.1 PCI bridge: Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 2 (rev c4) 00:1d.0 USB controller: Intel Corporation 7 Series/C210 Series Chipset Family USB Enhanced Host Controller #1 (rev 04) 00:1f.0 ISA bridge: Intel Corporation HM76 Express Chipset LPC Controller (rev 04) 00:1f.2 SATA controller: Intel Corporation 7 Series Chipset Family 6-port SATA Controller [AHCI mode] (rev 04) 00:1f.3 SMBus: Intel Corporation 7 Series/C210 Series Chipset Family SMBus Controller (rev 04) 01:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8101E/RTL8102E PCI Express Fast Ethernet controller (rev 05) 02:00.0 Network controller: Qualcomm Atheros QCA9565 / AR9565 Wireless Network Adapter (rev 01)

    Read the article

  • High CPU load - Ubuntu 14.04

    - by watt
    I noticed that sometimes when browsing (with other processes in the background), I get very high CPU load for the browser process (over 100%) and the computer becomes really slow. I tried switching from Firefox (with just a few extensions) to Chromium, but same thing happens without me visiting graphics-intense sites, flash sites or anything like that. I also noticed python or node (when running "make") produce the same high CPU load from time to time so this is not necessarily browser-related. When I only have a browser open, it doesn't seem to happen and everything is fine in Windows 7. I switched from unity to gnome3 with no effect. Specs: lenovo w510 (4gb RAM, i7 q820 @ 1.73) + up to date Ubuntu 14.04 64bit. Printscreen: http://imgur.com/8MZJNKC Do you guys have any idea why this might happen? Please let me know if there's other info you need. Thanks!

    Read the article

  • Not using nofollow for UGC links

    - by Noam
    My site contains many links that were user generated so I've added a rel=nofollow to them. I'm considering removing that tag at least partially, as these are most of my outgoing links and I've come to understand it isn't a good SEO sign to not have outgoing followed links. Although these are external sites, I have some data on the popularity and categorization of these sites. I'm trying to decide between two options: Removing the nofollow link for popular sites in most categories. Removing the nofollow for links that are in specific categories that represent the categorization I would like to achieve for my site. For example if this is a site about Basketball only remove the nofollow for links that are from sport sites. As these are both not exactly natural approaches, can this hurt me? Which option would you recommend?

    Read the article

  • Star rating not showing in rich snippets

    - by Danny R
    We've recently been doing a lot of work on our site's SEO (www.betterthanreviews.com). We recently did a push to update the rich snippets breadcrumb, meta description, and star rating. After giving Google some time to index the site, it has updated the breadcrumbs and meta descriptions for our review pages, but the stars are still not showing. This is currently how it appears on a Google search (link to the actual page: http://www.betterthanreviews.com/home-security/livewatch): This is what the Rich Snippets is supposed to look like, and how it appears in Google's testing tool: More context: As seen in our html, we are using schema.org language. We initially were using schema.org/Corporation for the site, but we now have the page labeled as schema.org/HomeAndConstructionBusiness because Google will not show star ratings for the Corporation language. However, in our Webmaster Tools, the Structured Data is still showing the Corporation language, which could be a potential issue. Here is a look at some of the coding that we used. But it can be looked at closer by inspecting the element: <div class="aggregate-rating" itemprop="aggregateRating" itemscope="" itemtype="http://schema.org/AggregateRating"> <div class="review row_fluid" itemprop="review" itemscope="" itemtype="http://schema.org/Review"> <div class="row_fluid rating" itemprop="reviewRating" itemscope="" itemtype="http://schema.org/Rating"> <meta content="4.5" itemprop="ratingValue" title="4.5 out of 5 stars" class="star-rating-readonly"> <meta content="2013-12-05" itemprop="datePublished"> <p class="review-headline" itemprop="headline">Way better than my previous system</p> <div> <p class="reviewer" itemprop="author">Scott H. </p> <span class="bullet">•</span> <p class="created_at">2 months ago</p> <p class="content" itemprop="description">I love it! The experience I have had so far is extremely positive. I had another alarm system before and I didn't like it but this one is really nice. I am telling everybody about it.</p> </div> </div> Any suggestions for how to fix this?

    Read the article

  • Good links somehow being converted to ones with a PHP redirect (not a virus)

    - by Rebecca
    This has happened to links we put on web pages and in emails. We might put www.oursite.org/work/ but when I view source it shows up as webmail.ourhosting.ca/hwebmail/services/go.php?url=https%3A%2F%2Fwww.oursite.org%2F%2work%2F This ends up at the webmail login page for our web host. But only some of the people who click the link get the login page; others go directly to the original page we intended. We don't want it to go to the webmail login page, nobody needs to log in to our web site. This occurs for links to pages on our site, but also to links to other sites that we put in emails or in posts. It seems to be browser independent as well as e-mail client independent as we variously have used Firefox and Chrome as well as MS Outlook and Thunderbird. I've tried to resolve the issue with our webhost but they keep telling me they don't support our browser, or our email client (i.e., they don't understand the issue). At the moment, our only option is to try another web host just to get rid of their login. Any ideas about what's going on?

    Read the article

  • How to point DNS records to Amazon AWS Elastic Beanstalk

    - by Lance
    I just created a new environment with AWS and uploaded a .zip file into elastic beanstalk. I used to have a friend's server host my site instead of GoDaddy so I changed my custom DNS name servers from pointing to my friend's server to GoDaddy's. AWS told me that I need I need to add a CNAME record on GoDaddy and I did. The alias is lance and the host is lance-env.elasticbeanstalk.com. I know that this change can take 24-48 hours to take effect but it's been a day already and when I go to my site, a default page from GoDaddy appears. I'm very new to AWS and would just like to find a way for AWS to host my site other than using Route53.

    Read the article

  • What is the correct way to reset and load new data into GL_ARRAY_BUFFER?

    - by Geto
    I am using an array buffer for colors data. If I want to load different colors for the current mesh in real time what is the correct way to do it. At the moment I am doing: glBindVertexArray(vao); glBindBuffer(GL_ARRAY_BUFFER, colorBuffer); glBufferData(GL_ARRAY_BUFFER, SIZE, colorsData, GL_STATIC_DRAW); glEnableVertexAttribArray(shader->attrib("color")); glVertexAttribPointer(shader->attrib("color"), 3, GL_FLOAT, GL_TRUE, 0, NULL); glBindBuffer(GL_ARRAY_BUFFER, 0); It works, but I am not sure if this is good and efficient way to do it. What happens to the previous data ? Does it write on top of it ? Do I need to call : glDeleteBuffers(1, colorBuffer); glGenBuffers(1, colorBuffer); before transfering the new data into the buffer ?

    Read the article

  • Limiting game loop to exactly 60 tics per second (Android / Java)

    - by user22241
    So I'm having terrible problems with stuttering sprites. My rendering and logic takes less than a game tic (16.6667ms) However, although my game loop runs most of the time at 60 ticks per second, it sometimes goes up to 61 - when this happens, the sprites stutter. Currently, my variables used are: //Game updates per second final int ticksPerSecond = 60; //Amount of time each update should take final int skipTicks = (1000 / ticksPerSecond); This is my current game loop @Override public void onDrawFrame(GL10 gl) { // TODO Auto-generated method stub //This method will run continuously //You should call both 'render' and 'update' methods from here //Set curTime initial value if '0' //Set/Re-set loop back to 0 to start counting again loops=0; while(System.currentTimeMillis() > nextGameTick && loops < maxFrameskip){ SceneManager.getInstance().getCurrentScene().updateLogic(); //Time correction to compensate for the missing .6667ms when using int values nextGameTick+=skipTicks; timeCorrection += (1000d/ticksPerSecond) % 1; nextGameTick+=timeCorrection; timeCorrection %=1; //Increase loops loops++; } render(); } I realise that my skipTicks is an int and therefore will come out as 16 rather that 16.6667 However, I tried changing it (and ticksPerSecond) to Longs but got the same problem). I also tried to change the timer used to Nanotime and skiptics to 1000000000/ticksPerSecond, but everything just ran at about 300 ticks per seconds. All I'm attempting to do is to limit my game loop to 60 - what is the best way to guarantee that my game updates never happen at more than 60 times a second? Please note, I do realise that very very old devices might not be able to handle 60 although I really don't expect this to happen - I've tested it on the lowest device I have and it easily achieves 60 tics. So I'm not worried about a device not being able to handle the 60 ticks per second, but rather need to limit it - any help would be appreciated.

    Read the article

  • Detect collision from a particular side

    - by Fabián
    I'm making a platform sidescrolling game. All I want to do is to detect if my character is on the floor: function OnCollisionStay (col : Collision){ if(col.gameObject.tag == "Floor"){ onFloor = true; } else {onFloor = false;} } function OnCollisionExit (col : Collision){ onFloor = false; } But I know this isn't the accurate way. If I hit a cube with a "floor" tag, in the air (no matter if with the character's feet or head) I would be able to jump. Is there a way to use the same box collision to detect if I'm touching something from a specific side?

    Read the article

  • What are the reasons for MMOs to have level caps [on hold]

    - by SamStephens
    In many MMOs players character progression is artificially capped, e.g. by level 60 or 90 or 100 or whatever. Why do MMOs have these level caps in the first place? Why not just allow characters to continue to arbitrary levels with a mathematically designed leveling system that keeps the leveling experience interesting and endless? Answers to this question may help us to see the reason behind the feature and decide if and how this should be implemented in our MMOs.

    Read the article

  • Why can I not echo out the value from an input text?

    - by user3684783
    I am using Wordpress to do an auction website. Here is what the code looks like <form method="post" action="<?php echo ProjectTheme_post_new_with_pid_stuff_thg($pid, '1');?>"> <?php do_action('ProjectTheme_step1_before_title'); ?> <!--////////// Project Title /////////////--> <li> <h2><?php echo __('Your Project Title', 'ProjectTheme'); ?>: <img src="../../images/help-icon.png" width="16" height="16" id="showhelp1"/></h2> <div id="help1">Your Project Title should be informative and brief.</div> <p><input type="text" style="width:90%;" class="do_input" name="project_title" value="Enter an informative & brief title..." onfocus="this.value = this.value=='Enter an informative & brief title...'?'':this.value;" onblur="this.value = this.value==''?'Enter an informative & brief title...':this.value;" /></p> <input type="submit" class="post-button" name="project_submit1" value="<?php _e("Next Step", 'ProjectTheme'); ?> &raquo;" /> </form> I am using a step by step form for users to fill in and I wanted to do a preview page, however I tried to use: if(isset($_POST['project_submit1'])){ $Name = $_POST['project_title']; echo "$Name"; } It shows up nothing.

    Read the article

  • Aiming Netbeans code snippets

    - by rwallace
    Not quite sure whether I'm using the right terminology here, but Netbeans has a very nice feature where e.g. if you start typing for it will offer to write a code fragment looping over an array or list, basing it on the name and type of an array or list variable actually in scope. If more than one such variable is in scope it will guess, sometimes correctly and sometimes not. Is there a way to aim this feature at the correct array/list variable?

    Read the article

  • Package website from Aptana Studio 3

    - by user3699921
    I have a web application built using Aptana Studio 3, the web application is targeted towards different platforms that execute HTML5 applications as native applications therefore not browsers per-se and therefore needs to be build differently for each platform as it is not a standard website. I need to be able to: Specify html templates that can be included/excluded in different builds for the same file Package the website in a zip Optionally override some modules (requirejs is used for modules) as they are device specific Publish to an FTP server Whilst I can do all of this manually it can be error prone.

    Read the article

  • Confusion testing fftw3 - poisson equation 2d test

    - by user3699736
    I am having trouble explaining/understanding the following phenomenon: To test fftw3 i am using the 2d poisson test case: laplacian(f(x,y)) = - g(x,y) with periodic boundary conditions. After applying the fourier transform to the equation we obtain : F(kx,ky) = G(kx,ky) /(kx² + ky²) (1) if i take g(x,y) = sin (x) + sin(y) , (x,y) \in [0,2 \pi] i have immediately f(x,y) = g(x,y) which is what i am trying to obtain with the fft : i compute G from g with a forward Fourier transform From this i can compute the Fourier transform of f with (1). Finally, i compute f with the backward Fourier transform (without forgetting to normalize by 1/(nx*ny)). In practice, the results are pretty bad? (For instance, the amplitude for N = 256 is twice the amplitude obtained with N = 512) Even worse, if i try g(x,y) = sin(x)*sin(y) , the curve has not even the same form of the solution. (note that i must change the equation; i divide by two the laplacian in this case : (1) becomes F(kx,ky) = 2*G(kx,ky)/(kx²+ky²) Here is the code: /* * fftw test -- double precision */ #include <iostream> #include <stdio.h> #include <stdlib.h> #include <math.h> #include <fftw3.h> using namespace std; int main() { int N = 128; int i, j ; double pi = 3.14159265359; double *X, *Y ; X = (double*) malloc(N*sizeof(double)); Y = (double*) malloc(N*sizeof(double)); fftw_complex *out1, *in2, *out2, *in1; fftw_plan p1, p2; double L = 2.*pi; double dx = L/((N - 1)*1.0); in1 = (fftw_complex*) fftw_malloc(sizeof(fftw_complex)*(N*N) ); out2 = (fftw_complex*) fftw_malloc(sizeof(fftw_complex)*(N*N) ); out1 = (fftw_complex*) fftw_malloc(sizeof(fftw_complex)*(N*N) ); in2 = (fftw_complex*) fftw_malloc(sizeof(fftw_complex)*(N*N) ); p1 = fftw_plan_dft_2d(N, N, in1, out1, FFTW_FORWARD,FFTW_MEASURE ); p2 = fftw_plan_dft_2d(N, N, in2, out2, FFTW_BACKWARD,FFTW_MEASURE); for(i = 0; i < N; i++){ X[i] = -pi + (i*1.0)*2.*pi/((N - 1)*1.0) ; for(j = 0; j < N; j++){ Y[j] = -pi + (j*1.0)*2.*pi/((N - 1)*1.0) ; in1[i*N + j][0] = sin(X[i]) + sin(Y[j]) ; // row major ordering //in1[i*N + j][0] = sin(X[i]) * sin(Y[j]) ; // 2nd test case in1[i*N + j][1] = 0 ; } } fftw_execute(p1); // FFT forward for ( i = 0; i < N; i++){ // f = g / ( kx² + ky² ) for( j = 0; j < N; j++){ in2[i*N + j][0] = out1[i*N + j][0]/ (i*i+j*j+1e-16); in2[i*N + j][1] = out1[i*N + j][1]/ (i*i+j*j+1e-16); //in2[i*N + j][0] = 2*out1[i*N + j][0]/ (i*i+j*j+1e-16); // 2nd test case //in2[i*N + j][1] = 2*out1[i*N + j][1]/ (i*i+j*j+1e-16); } } fftw_execute(p2); //FFT backward // checking the results computed double erl1 = 0.; for ( i = 0; i < N; i++) { for( j = 0; j < N; j++){ erl1 += fabs( in1[i*N + j][0] - out2[i*N + j][0]/N/N )*dx*dx; cout<< i <<" "<< j<<" "<< sin(X[i])+sin(Y[j])<<" "<< out2[i*N+j][0]/N/N <<" "<< endl; // > output } } cout<< erl1 << endl ; // L1 error fftw_destroy_plan(p1); fftw_destroy_plan(p2); fftw_free(out1); fftw_free(out2); fftw_free(in1); fftw_free(in2); return 0; } I can't find any (more) mistakes in my code (i installed the fftw3 library last week) and i don't see a problem with the maths either but i don't think it's the fft's fault. Hence my predicament. I am all out of ideas and all out of google as well. Any help solving this puzzle would be greatly appreciated. note : compiling : g++ test.cpp -lfftw3 -lm executing : ./a.out output and i use gnuplot in order to plot the curves : (in gnuplot ) splot "output" u 1:2:4 ( for the computed solution )

    Read the article

  • C# / this. and List<T>

    - by user3533030
    I am having trouble understanding how to initialize a List of objects and use it with methods inside of a class. I understand the mechanics of the List, but not how to initialize it inside a method and use it later. For example, I want to have a class that creates the List when it is constructed. Then, I want to use a method of that class to add elements to the list. The elements in the list are objects defined by the SolidWorks API. So, to construct the List, I used... public class ExportPoints : Exporter { public List<SldWorks.SketchPoint> listOfSketchPoints; public ExportPoints(SldWorks.SldWorks swApp, string nameSuffix) : base(swApp, nameSuffix) { List<SldWorks.SketchPoint> listOfSketchPoints = new List<SldWorks.SketchPoint>(); } public void createListOfFreePoints() { try { [imagine more code here] this.listOfSketchPoints.Add(pointTest); } catch (Exception e) { Debug.Print(e.ToString()); return; } } This fails during execution as if the listOfSketchPoints was never initialized as a List. So, I tried a hack and this worked: public ExportPoints(SldWorks.SldWorks swApp, string nameSuffix) : base(swApp, nameSuffix) { List<SldWorks.SketchPoint> listOfSketchPoints = new List<SldWorks.SketchPoint>(); this.listOfSketchPoints = listOfSketchPoints; } This approach creates the behavior that I want. However, it seems that I lack some understanding as to why this is necessary. Shouldn't it be possible to "initialize" a List that is a property of your object with a constructor? Why would you need to create the list, then assign the pointer of that new List to your property?

    Read the article

  • Set cookie value before view loaded in MVC?

    - by James123
    I need to set a cookie value before my view called. otherwise I have to refresh the page to get cookie value in the view. The problem here is the value of cookie will get in controller. [HttpGet] [Route("Abstract/{meetingCode}")] [AllowAnonymous] public ActionResult Index(string meetingCode) { var meetingAbstract = new MeetingAbstract(); meetingAbstract.Meeting = _abstractContext.GetMeetingWithMeetingCode(meetingCode); if (meetingAbstract.Meeting != null) { var cookie = new HttpCookie("_culture"); cookie.Value = meetingAbstract.Meeting.language.language_locale_code;//"en-US"; cookie.Expires = DateTime.Now.AddDays(365); cookie.Path = "/"; this.ControllerContext.HttpContext.Response.Cookies.Add(cookie); ... Any other way without refresh the page again to set cookie value?

    Read the article

  • Using SQLAlchemy, how can I return a count with multiple columns

    - by Andy
    I am attempting to run a query like this: SELECT comment_type_id, name, count(comment_type_id) FROM comments, commenttypes WHERE comment_type_id=commenttypes.id GROUP BY comment_type_id Without the join between comments and commenttypes for the name column, I can do this using: session.query(Comment.comment_type_id,func.count(Comment.comment_type_id)).group_by(Comment.comment_type_id).all() However, if I try to do something like this, I get incorrect results: session.query(Comment.comment_type_id, Comment.comment_type, func.count(Comment.comment_type_id)).group_by(Comment.comment_type_id).all() I have two problems with the results: (1, False, 82920) (2, False, 588) (3, False, 4278) (4, False, 104370) Problems: The False is not correct The counts are wrong My expected results are: (1, 'Comment Type 1', 13820) (2, 'Comment Type 2', 98) (3, 'Comment Type 2', 713) (4, 'Comment Type 2', 17395) How can I adjust my command to pull the correct name value and the correct count?

    Read the article

  • head detection from video

    - by Aman Kaushal
    I have to detect heads of people in crowd in real time.For that I detected edge from video using matlab but from edge detected video , how to identify heads that i am unable to do. I used edge detection of video because it is easy to find circle from edged video and detection of head would be easy can anyone help me or suggest me any method for head- detection in real time. I have used VGG head detector and viola jones algorithm but it is only detecting face for small size video not detecting heads for large crowd. Suggestions?

    Read the article

  • Attribute Address getting displayed instead of Attribute Value

    - by Manish
    I am try to create the following. I want to have one drop down menu. Depending on the option selected in the first drop down menu, options in second drop down menu will be displayed. The options in 2nd drop down menu is supposed by dynamic, i.e., options change with the change of values in first menu. Here, instead of getting the drop down menus, I am getting the following Choose your Option1: Choose your Option2: Note: I strictly don't want to use javascript. home_form.py class HomeForm(forms.Form): def __init__(self, *args, **kwargs): var_filter_con = kwargs.pop('filter_con', None) super(HomeForm, self).__init__(*args, **kwargs) if var_filter_con == '***': var_empty_label = None else: var_empty_label = ' ' self.option2 = forms.ModelChoiceField(queryset = db_option2.objects.filter(option1_id = var_filter_con).order_by("name"), empty_label = var_empty_label, widget = forms.Select(attrs={"onChange":'this.form.submit();'}) ) self.option1 = forms.ModelChoiceField(queryset = db_option1.objects.all().order_by("name"), empty_label=None, widget=forms.Select(attrs={"onChange":'this.form.submit();'}) ) view.py def option_view(request): if request.method == 'POST': form = HomeForm(request.POST) if form.is_valid(): cd = form.cleaned_data if cd.has_key('option1'): f = HomeForm(filter_con = cd.get('option1')) return render_to_response('homepage.html', {'home_form':f,}, context_instance=RequestContext(request)) return render_to_response('invalid_data.html', {'form':form,}, context_instance=RequestContext(request)) else: f = HomeForm(filter_con = '***') return render_to_response('homepage.html', {'home_form':f,}, context_instance=RequestContext(request)) homepage.html <!DOCTYPE HTML> <head> <title>Nivaaran</title> </head> <body> <form method="post" name = 'choose_opt' action=""> {% csrf_token %} Choose your Option1: {{ home_form.option1 }} <br/> Choose your Option2: {{ home_form.option2 }} </form> </body>

    Read the article

  • How to make if loop in grails?

    - by user3569696
    I'm beginner in Grails, please help. I have this in my gsp <div class="right66"> <g:select class="time_pick" name="pick_day" placeholder="" from="${['Dani', 'Sati', 'Minute']}" valueMessagePrefix="book.category"/> </div> In translation: Dani=Days, Sati= Hours, Minute= Minutes. I need to save data in minutes but User have privilege to choose will his input be in minutes, days or hours. So i have to do if loop. I now how if loop works but i don't know how to wite it in grails. I was thinking something like this: n=1 if(params.type=Dani){ n= 3600 }else if(params.type=Sati) { n=60 } def minute=params.minute*n but how to call that choosen input "Dani"? I can't write Params.type=Dani. Does if loop go in controller in my case?

    Read the article

  • Simple Jquery function won't work

    - by stijn26
    I have following jQuery code $(document).ready(function() { for(var i=1;i<4;i++) { var img= ".img"+i; var p= ".p"+i; $(img).on("click", function(){ $(p).hide(); }); } }); Applied on the following html: <div> <article> <h1>Over mezelf <img src='images/plus.png' class='img1'/></h1> <p class='p1'>Test</p> </article> <article> <h1>Contact <img src='images/plus.png' class='img2'/></h1> <p class='p2'>Test</p> </article> <article> <h1>Website <img src='images/plus.png' class='img3'/></h1> <p class='p3'>Test</p> </article> </div> When I click on the images, the last <p> disappears, it doesn't work on the other ones.

    Read the article

  • Removing random object from parent CCprite

    - by Natty
    probably this is a simple problem to solve, since I'm quite new. I have a scene with a waiter holding a tray of food (the food is a random CCSprite choosen from an array) each time he comes onscreen he holds a new piece of food (the user touches the food and the waiter walks off to return again with a new piece of food however I cant seem to delete the old peice of food from the screen as it says the child is already added... any help would be great -(id) init { ///other code then... waiterOnSCreen = [CCSprite spriteWithSpriteFrameName:@"CatUP.png"]; waiterOnSCreen.position = ccp(CatOffSCreenPosX, catXpos); [self addChild:waiterOnSCreen z:0]; //moving the waiter // the random food sprite is added later to the waiter // [waiterOnSCreen addChild:myRandomSprite]; } -(void)LoadRandomFood { ///I make my array here then... int i = arc4random() % [RandomFood count]; myRandomSprite = (CCSprite *)[RandomFood objectAtIndex:i]; //waiterOnSCreen is a CCSprite added on the init [waiterOnSCreen addChild:myRandomSprite]; myRandomSprite.position=ccp(290,220); myRandomSprite.tag = RandomFoodTag; } } later in if(CGRectContainsPoint(waiterOnSCreen.boundingBox, location)) { //trying to remove the food here //Ive already tried to remove the sprite using [self removeChildByTag:RandomeObjectTag]; //and also CCSprite *wantedSprite = (CCSprite *)[self getChildByTag:RandomFoodTag]; [wantedSprite removeFromParentAndCleanup:YES]; } }

    Read the article

  • call a python function in another class from a class?

    - by user3527697
    hi i'am begginer in pYthon and openerp , i want to call a function exists in another class for example: i have 2 class : class a: def notif_personne_event(self, cr, uid,ids,context=None): and import a class b: notifier(self, cr, uid,ids,context=None): self.notifiernotif_personne_event() but when i do this an error is displayed telling me that class b have not an attribute notifiernotif_personne_event() someone help me please

    Read the article

  • ASP.NET VB.NET GridView adding anchor tag to a cell

    - by user3036965
    I have an GridView control with some data in the first cell throughout the column. Ineed to make that cell data into a hyperlink (anchor tag) like the following. <a href=""myPage.aspx?r=" & strParam & """>" & strData & "</a>" Can anyone advise on the most effective way to do this? I am using a datatable and then assigning the datatable to the gridview. Any advice would be greatly appreciated. I need to use the Sub GridView1_RowDataBound(ByVal sender As Object, ByVal e As GridViewRowEventArgs). So I could add a hyperlink whatabout getting the parameters into the RowDataBound event is where my skills are falling down. Thank you

    Read the article

< Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >