Search Results

Search found 5136 results on 206 pages for 'comment bot'.

Page 63/206 | < Previous Page | 59 60 61 62 63 64 65 66 67 68 69 70  | Next Page >

  • PHP & AJAX SEO - For users with javascript and non javascript

    - by RussellHarrower
    So I understand this may come across as a open question, but I need away to solve this issue. I can either make the site do ajax request that load the body content, or I can have links that re-loads the whole page. I need the site to be SEO compliant, and I would really like the header to not re-load when the content changes, the reason is that we have a media player that plays live audio. Is there away that if Google BOT or someone without ajax enabled it does the site like normal href but if ajax or javascript allowed do it the ajax way.

    Read the article

  • WebClient.DownloadString() Not Producing Exact HTML

    - by Ryan Fuentes
    So here's the deal. I'm creating a spider bot for a website that scans all the product pages and records the product data. I'm using C# and the WebClient library to download the HTML string. The site I'm crawling must be specially made because the HTML that is received from WebClient.DownloadString() is different than the HTML that I get when I view the source of the HTML when visiting it on a browser. This seems intentional because the only info I can't get is the price. Does anyone know a workaround for this problem or can anyone explain what is happening? Thanks.

    Read the article

  • Drupal 6 - I am using drupal_execute to insert a CCK node into my site. Everything is working excep

    - by rdurbin
    $form_state['values']['field_prx_mp3_labels'][0][value] = $mp3_labels; $form_state['values']['taxonomy'][0][value] = array('tags'=>array('1'=>'Music')); $errs = drupal_execute('prx_content_node_form', $form_state, (object) $nodeTmp); This is a Drupal 6 site. I am using drupal_execute to create a node programatically. The first line is working for field_prx_mp3_labels. The second (for taxonomy) is not. Here is what my select on the node add for my cck looks like: <select name="taxonomy[2][]" multiple="multiple" class="form-select" id="edit-taxonomy-2" size="9"><option value="">- None -</option><option value="5">Music</option><option value="6">-Rock/Pop</option><option value="7">-Jazz/Blues</option><option value="8">-Classical</option><option value="9">-Music Documentaries</option><option value="10">-Festivals/Concerts</option><option value="11">Arts</option><option value="19">-Literature</option><option value="12">Nature</option><option value="13">History</option><option value="15">-Music</option><option value="14">Culture</option><option value="17">-American Indian</option><option value="18">-Latino</option><option value="16">-Youth Perspective</option></select> I have tried many many variations for line 2 (relating to the taxonomy). This comment seemed close but it hasn't worked for me: http://drupal.org/node/178506#comment-1155576 Thanks!

    Read the article

  • Where to give feedback on a new Feature is SO ?

    - by justjoe
    After using SO, for sometimes, i realize i got some problems. zen masters fighting each other on one of my question. Every side have their own arguments and Everybody seem right. Frankly, this make me confuse : How can i choose somebody's answer where personally i don't know the right answer. So, i would like to propose a feature 'i choose this because' for a user who asked. So at least he/she explain why he choose the particular answer. Maybe it's silly, but as somebody who getting helps from other's answer, i would like to know everybody get what they deserve. Usually in this kind of situation, i just upvote every good answer and check the one i think the right one. Second feature : every hot question always got plenty answer and comment. And if among person who answer it, start to debate then it will become a little bit hectic. Right now a page only have ability to sort answer based on oldest, newest votest. So, is it possible to make a new sort based on timeline what make comment and answer collide. I believe it will be more easy to read. this feature can only see by the person who create the question, or also for public.

    Read the article

  • Syntax for documenting JSON structure

    - by Roman A. Taycher
    So I'm trying to document the format of the json returned by an api I am writing against and I'd like to know if there is any popular format for the documentation of json structure. Note I'm not trying to to test or validate anything, I'm just using this for documentation. Also some ways to add comments to non-constants(items always returned w/ the same value) would be nice. This the not totally thought out scheme I'm currently using: Plain names refer to identifiers or types. Some types have type-comment Strings that appear to be constant(always returned for that type of request) strings are "str" Constant Numbers would be just the number Constant null is null Booleans are true/false for constant booleans or Boolean otherwise [a,b,c] are lists with 3 items a,b,c [... ...] is a list of repeating elements of some types/constants/patterns {a:A,b:B,c:c} and {... ...} is the same for a dictionary. example: story := [header,footer] header := {"data":realHeader,"kind":"Listing"} realHeader := {"after": null, "before": null, "children": [{"data": realRealHeader, "kind": "t3"}], "modhash": ""} footer := {"data":AlmostComments,"kind":"Listing"} AlmostComments := {"data": {"after": null, "before": null, "children": comments, "modhash": ""}, "kind": "t1"} comments := [...{"data":comment, "kind":"t1"}...] realRealHeader := {"author": string, "clicked": boolean, "created": int, "created_utc": int, "domain": "code.reddit.com", "downs": int, "hidden": boolean, "id": string-id, "is_self": boolean, "levenshtein": null, "likes": null, "media": null, "media_embed": { }, "name": string-id, "num_comments": int, "over_18": false, "permalink": string-urlLinkToStoryStartingFrom/r, "saved": false, "score": int, "selftext": string, "selftext_html": string-html, "subreddit": string-subredditname, "subreddit_id": string-id, "thumbnail": "", "title": string, "ups": int, "url": "http://code.reddit.com/" } comments := { "author": string, "body": string-body_html-wout-html, "body_html": string-html-formated, "created": int, "created_utc": int, "downs": int, "id": string-id, "levenshtein": null, "likes": null, "link_id": string-id, "name": string-id", "parent_id": string-id, "replies": AlmostComments or null, "subreddit": string-subredditname, "subreddit_id": string-id, "ups": int }

    Read the article

  • Communication with different social networks, strategy pattern?

    - by bclaessens
    Hi For the last few days I've been thinking how I can solve the following programming problem and find the ideal, flexible programming structure. (note: I'm using Flash as my platform technology but that shouldn't matter since I'm just looking for the ideal design pattern). Our Flash website has multiple situations in which it has to communicate with different social networks (Facebook, Netlog and Skyrock). Now, the communication strategy doesn't have to change multiple times over one "run". The strategy should be picked once (at launch time) for that session. The real problem is the way the communication works between each social network and our website. Some networks force us to ask for a token, others force us to use a webservice, yet another forces us to set up its communication through javascript. The problem becomes more complicated when our website has to run in each network's canvas. Which results in even more (different) ways of communicating. To sum up, our website has to work in the following cases: standalone on the campaign website url (user chooses their favourite network) communicate with netlog OR communicate with facebook OR communicate with skyrock run in a netlog canvas and log in automatically (website checks for netlog parameters) run in a facebook canvas and log in automatically (website checks for facebook params) run in a skyrock canvas and log in automatically (website checks for skyrock params) As you can see, our website needs 6 different ways to communicate with a social network. To be honest, the actual significant difference between all communication strategies is the way they have to connect to their individual network (as stated above in my example). Posting an image, make a comment, ... is the same whether it runs standalone or in the canvas url. WARNING: posting an image, posting a comment DOES differ from network to network. Should I use the strategy pattern and make 6 different communication strategies or is there a better way? An example would be great but isn't required ;) Thanks in advance

    Read the article

  • Help with active record relations

    - by Christian Fazzini
    class CreateActivities < ActiveRecord::Migration def self.up create_table :activities do |t| t.references :user t.references :media t.integer :artist_id t.string :type t.timestamps end end def self.down drop_table :activities end end class Fan < Activity belongs_to :user, :counter_cache => true end class Activity < ActiveRecord::Base belongs_to :user belongs_to :media belongs_to :artist, :class_name => 'User', :foreign_key => 'artist_id' end class User < ActiveRecord::Base has_many :activities has_many :fans end I tried changing my activity model too, without any success: class Activity < ActiveRecord::Base has_many :activities, :class_name => 'User', :foreign_key => 'user_id' has_many :activities, :class_name => 'User', :foreign_key => 'artist_id' end One thing to note. Activity is an STI. Fan inherits from Activity. In console, I do: # Create a fan object. User is a fan of himself fan = Fan.new => #<Fan id: nil, user_id: nil, media_id: nil, artist_id: nil, type: "Fan", comment: nil, created_at: nil, updated_at: nil> # Assign a user object fan.user = User.first => #<User id: 1, genre_id: 1, country_id: 1, .... # Assign an artist object fan.artist_id = User.first.id => 1 # Save the fan object fan.save! => true Activity.last => #<Fan id: 13, user_id: 1, media_id: nil, artist_id: 1, type: "Fan", comment: nil, created_at: "2010-12-30 08:41:25", updated_at: "2010-12-30 08:41:25"> Activity.last.user => #<User id: 1, genre_id: 1, country_id: 1, ..... But... Activity.last.artist => nil Why is Activity.last.artist returning nil?

    Read the article

  • Understanding C++ pointers (when they point to a pointer)

    - by Stephano
    I think I understand references and pointers pretty well. Here is what I (think I) know: int i = 5; //i is a primitive type, the value is 5, i do not know the address. int *ptr; //a pointer to an int. i have no way if knowing the value yet. ptr = &i; //now i have an address for the value of i (called ptr) *ptr = 10; //go get the value stored at ptr and change it to 10 Please feel free to comment or correct these statements. Now I'm trying to make the jump to arrays of pointers. Here is what I do not know: char **char_ptrs = new char *[50]; Node **node_ptrs = new Node *[50]; My understanding is that I have 2 arrays of pointers, one set of pointers to chars and one to nodes. So if I wanted to set the values, I would do something like this: char_ptrs[0] = new char[20]; node_ptrs[0] = new Node; Now I have a pointer, in the 0 position of my array, in each respective array. Again, feel free to comment here if I'm confused. So, what does the ** operator do? Likewise, what is putting a single * next to the instantiation doing (*[50])? (what is that called exactly, instantiation?)

    Read the article

  • How to disable a checkbox based on date using php?

    - by udaya
    I have iterated a table based on my query result... I have a column lastDate it contains a date value like 01/24/2010... Now i have to check the date value with the current date if currentdate is less than or equal to lastDate i have to enable the checkbox else disable it..... Any suggestion how it can be done in php... Here is my code <? if(isset($comment)) { echo '<tr><td class=table_label colspan=5>'.$comment.'</td></tr>'; } ?> <td align="center" class="table_label" id="txtsubdat"> <? $dd=$row['dDate']; if($dd=='') { } else { $str = $dd; $dd = strtotime ( $str ); echo date ( 'm/d/Y' , $dd ); } ?> </td> <td align="center"> <input type="checkbox" name="group" id="group" value="<?=$row['dAssignment_id']?>" onclick="checkdisplay(this);"> </td> <? } ?>

    Read the article

  • Facebook - generating fb tag in Jquery - not working

    - by Gublooo
    Hey guys Kind of stuck here - I have this functionality on my site where I display 10 user comments along with their photo and when a user clicks on "More" - using Jquery more results are fetched from DB and the results are displayed via string generated in the Jquery method. This is a shortened version of my Jquery function $(".more_swipes").live('click',function() { var profile_id = 'profile-user_id; ?'; $.getJSON("/profile/more-swipes", { user_id: profile_id},function(swipes) { $.each(swipes, function(i,data){ newcomment="<div"; newcomment +="<fb:profile-pic uid='"+data.fb_userid+"' linked='false'/"; newcomment +="Name="+data.user_name+"-Comment="+data.comment; $("#moreswipes").append(newcomment); }); }); return false; }); Here as you can see I'm using the tag <fb:profile-pic uid='"+data.fb_userid+"' linked='false'/ Now when more results get displayed, the profile pic of the user is not getting displayed - when I look at the source code - this is how the fb tag looks when its generated thru Jquery <fb:profile-pic uid="222222" linked="false" height="50" width="50" Whereas the FB tags not generated thru the Jquery code look like <fb:profile-pic uid="222222" linked="false" height="50" width="50" class="FB_profile_pic <fb_profile_pic_rendered FB_ElementReady" style="width:px;height:50px" <img src="http://profile.atk......2025.jpg" alt="User Name" title="User Name" style="width:px;height:50px" class="FB_profile_pic"/ </fb:profile-pic So when I add it as a String in JQuery function - facebook is not identifying it and executing it Any idea how to fix this Thanks a bunch

    Read the article

  • jQuery Validation plugin: disable validation for specified submit buttons when there is submitHandle

    - by ccppjava
    Ok, I am using umbraco forum module, and on the comment form it uses jquery validate plugin. The problem is that I have added a search button on the same page using a UserControl, the search submit button triggers the comment form submission validation. I have done some research, and added the 'cancel' css class to the button. This bypass the first validation issue, however, it still fall into the 'submitHandler'. Have read the source code and find a way to detect whether the search button triggers the submission. however, there is not a nice way to bypass the handler. I am currently using a ugly way to do it: create javascript errors! I would like to know a nicer way to do the job. Many thanks! Btw, I am currently using: submitHandler: function (form) { $(form).find(':hidden').each(function () { var name = $(this).attr('name'); if (name && name.indexOf('btnSearch') === name.length - 'btnSearch'.length) { // this is a dirty hack to avoid the validate plugin to work for the button eval("var error = 1 2 ''"); } }); // original code from umbraco ignored here.... } ...............

    Read the article

  • WCF REST Starter Kit not filling base class members on POST

    - by HJG
    I have a WCF REST Starter Kit service. The type handled by the service is a subclass of a base class. For POST requests, the base class members are not correctly populated. The class hierarchy looks like this: [DataContract] public class BaseTreeItem { [DataMember] public String Id { get; set; } [DataMember] public String Description { get; set; } } [DataContract] public class Discipline : BaseTreeItem { ... } The service definition looks like: [WebHelp(Comment = "Retrieve a Discipline")] [WebGet(UriTemplate = "discipline?id={id}")] [OperationContract] public Discipline getDiscipline(String id) { ... } [WebHelp(Comment = "Create/Update/Delete a Discipline")] [OperationContract] [WebInvoke(Method = "POST", UriTemplate = "discipline")] public WCF_Result DisciplineMaintenance(Discipline discipline) { ... } Problem: While the GET works fine (returns the base class Id and Description), the POST does not populate Id and Description even though the XML contains the fields. Sample XML: <?xml version="1.0" encoding="utf-8"?> <Discipline xmlns="http://schemas.datacontract.org/2004/07/xxx.yyy.zzz"> <DeleteFlag>7</DeleteFlag> <Description>2</Description> <Id>5</Id> <DisciplineName>1</DisciplineName> <DisciplineOwnerId>4</DisciplineOwnerId> <DisciplineOwnerLoginName>3</DisciplineOwnerLoginName> </Discipline> Thanks for any assistance.

    Read the article

  • How do I bind to a custom view in Cocoa using Xcode 4?

    - by Newt
    I'm a beginner when it comes to writing Mac apps and working with Cocoa, so please forgive my ignorance. I'm looking to create a custom view, that exposes some properties, which I can then bind to an NSObjectController. Since it's a custom view, the Bindings Inspector obviously doesn't list any of the properties I've added to the view that I can then bind to using Interface Builder. After turning to the Stackoverflow/Google for help, I've stumbled across a couple of possible solutions, but neither seem to be quite right for my situation. The first suggested creating an IBPlugin, which would then mean my bindings would be available in the Bindings Inspector. I could then bind the view to the controller using IB. Apparently IBPlugins aren't supported in Xcode 4, so that one's out the window. I'm also assuming (maybe wrongly) that IBPlugins are no longer supported because there's a better way of doing such things these days? The second option was to bind the controller to the view programmatically. I'm a bit confused as to exactly how I would achieve this. Would it require subclassing NSObjectController so I can add the calls to bind to the view? Would I need to add anything to the view to support this? Some examples I've seen say you'd need to override the bind method, and others say you don't. Also, I've noticed that some example custom views call [self exposeBinding:@"bindingName"] in the initializer. From what I gather from various sources, this is something that's related to IBPlugins and isn't something I need to do if I'm not using them. Is that correct? I've found a post on Stackoverflow here which seems to discuss something very similar to my problem, but there wasn't any clear winner as to the best answer. The last comment by noa on 12th Sept seems interesting, although they mention you should be calling exposeBinding:. Is this comment along the right track? Is the call to exposeBinding really necessary? Apologies for any dumb questions. Any help greatly appreciated.

    Read the article

  • PHP Notice: Undefined index when looping array...

    - by Jonathan
    Hi, I'm looping a two-dimensional array like this: if (!empty($aka)) { foreach ($aka as $ak) { if($ak["lang"]=="es") { $sptitle=$ak["title"]; } } } Pretty simple. If the array ($aka) is not empty I loop trough it and when it finds that the "lang" index is equal to "es" I just save the "title" value for that index in $sptitle. The problem is that the array ($aka) contains a lot of information and sometimes there is no "lang" index... and I get this error: Notice: Undefined index: lang. How can I fix this??? This is a extract of the array to help you understand. Notice that [1] doesn't have a [lang] index but [2] does have: [1] =&gt; Array ( [title] =&gt; The Lord of the Rings: The Motion Picture [year] =&gt; [country] =&gt; USA [comment] =&gt; promotional title ) [2] =&gt; Array ( [title] =&gt; Señor de los anillos: La comunidad del anillo, El [year] =&gt; [country] =&gt; Argentina [comment] =&gt; Chile, Mexico, Peru, Spain [lang] =&gt; es ) Thanks!

    Read the article

  • Using fonts that aren't on iPhone

    - by 4thSpace
    I'd like to use some fonts that aren't part of the iPhone OS. I've seen games that use non standard fonts. I can install the fonts, create images for each one in Photoshop and then use those images in the iPhone app. However, I don't think that is a practical way to go. If the color or tint needs to be adjusted (because of background) or size, I'll have to redesign every font I'm using. Is there a better way to do this? I read this http://stackoverflow.com/questions/360751/can-i-embed-a-custom-font-in-an-iphone-application and downloaded the open source font label app. However, it crashes most of the time when I try using particular fonts. In regards to the last comment about using UIFont with the fontWithName:size, that certainly doesn't work. Your font variable will be nil. Listing all available fonts reveals why - none of the custom fonts are in the list. I've also read http://stackoverflow.com/questions/566054/how-do-i-include-a-font-with-my-iphone-application, which definitely does not work. Same as last comment in above link.

    Read the article

  • Tomcat does not pick up the class file - the JSP file is not displayed

    - by blueSky
    I have a Java code which is a controller for a jsp page, called: HomeController.java. Code is as follows: @Controller public class HomeController { protected final transient Log log = LogFactory.getLog(getClass()); @RequestMapping(value = "/mypage") public String home() { System.out.println("HomeController: Passing through..."); return "home"; } } There is nothing especial in the jsp page: home.jsp. If I go to this url: http://localhost:8080/adcopyqueue/mypage I can view mypage and everything works fine. Also in the tomcat Dos page I can see the comment: HomeController: Passing through... As expected. Now under the same directory that I have HomeController.java, I've created another file called: LoginController.java. Following is the code: @Controller public class LoginController { protected final transient Log log = LogFactory.getLog(getClass()); @RequestMapping(value = "/loginpage") public String login() { System.out.println("LoginController: Passing through..."); return "login"; } } And under the same place which I have home.jsp, I've created login.jsp. Also under tomcat folders, LoginController.class exists under the same folder that HomeController.class exists and login.jsp exists under the same folder which home.jsp exists. But when I go to this url: http://localhost:8080/adcopyqueue/loginpage Nothing is displayed! I think tomcat does not pick up LoginController.class b/c on the tomcat Dos window, I do NOT see this comment: LoginController: Passing through... Instead I see following which I do not know what do they mean? [ INFO] [http-8080-1 01:43:45] (AppInfo.java:populateAppInfo:34) got manifest [ INFO] [http-8080-1 01:43:45] (AppInfo.java:populateAppInfo:36) manifest entrie s 8 The structure and the code for HomeController.java and LoginController.java plus the jsp files match. I have no idea why tomcat sees one of the files and not the other? Clean build did not help. Does anybody have any idea? Any help is greatly appraciated.

    Read the article

  • i have this code but when i run it i get an exception:

    - by nisnis84
    i have this code but when i run it i get an exception: java.security.AccessControlException: access denied (java.net.SocketPermission 127.0.0.1:8081 connect,resolve) this is the code, the server running good but the client dont work <OBJECT classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" width="615" height="360" codebase="http://java.sun.com/products/plugin/autodl/jinstall-1_4-windows-i586.cab#Version=1,4,0,mn"> <PARAM name="code" value="client/LlamaChat.class"> <PARAM name="archive" value="LlamaChat.jar"> <PARAM name="type" value="application/x-java-applet;version=1.4"> <PARAM name="scriptable" value="true"> <PARAM name="username" value="[replace with username]"> <PARAM name="port" value="[replace with port]"> <COMMENT> <EMBED type="application/x-java-applet;version=1.4" width="615" height="360" code="client/LlamaChat.class" archive="LlamaChat.jar" pluginspage="http://java.sun.com/j2se/1.4.1/download.html" username="nis" port="8081" <NOEMBED> No Java 1.4 plugin </NOEMBED></EMBED> </COMMENT> </OBJECT>

    Read the article

  • Can I detect whether an object has called GC.SuppressFinalize?

    - by Joe White
    Is there a way to detect whether or not an object has called GC.SuppressFinalize? I have an object that looks something like this (full-blown Dispose pattern elided for clarity): public class ResourceWrapper { private readonly bool _ownsResource; private readonly UnmanagedResource _resource; public ResourceWrapper(UnmanagedResource resource, bool ownsResource) { _resource = resource; _ownsResource = ownsResource; if (!ownsResource) GC.SuppressFinalize(this); } ~ResourceWrapper() { if (_ownsResource) // clean up the unmanaged resource } } If the ownsResource constructor parameter is false, then the finalizer will have nothing to do -- so it seems reasonable (if a bit quirky) to call GC.SuppressFinalize right from the constructor. However, because this behavior is quirky, I'm very tempted to note it in an XML doc comment... and if I'm tempted to comment it, then I ought to write a unit test for it. But while System.GC has methods to set an object's finalizability (SuppressFinalize, ReRegisterForFinalize), I don't see any methods to get an object's finalizability. Is there any way to query whether GC.SuppressFinalize has been called on a given instance, short of buying Typemock or writing my own CLR host?

    Read the article

  • how can i check ID of a clicked element js

    - by necker
    how can i check if an ID of a clicked element is lets say 'target'. what i am trying to do is actually show and hide comment form on clicking in the text field and hide it when the user clicks out of the form. the problem is that if the user clicks Submit button the form hides and nothing is sent over. so i'll have to check if the submit buttons id matches the clicked element and not hide it in this case. i am using ruby on rails remote_form_for and onblur and onfocus events now. this is my bigger form that i am showing. <div id="bigArea" style="display:none"> <% remote_form_for @horses do |f|%> <%= f.text_area :description, {:onBlur=>"{$(bigArea').hide();$('smallField').show();}"} %> <%= f.submit "Submit"%> <% end %> </div> and this is the smaller form field that hides everytime you click in it. <div id="smallField"> <%= text_field_tag 'sth',"Click to comment, {:onFocus=>"$('bigArea').show();$('smallField').hide();"} %> </div> My question is how can i disallow the form to hide when a user clicks submit button? i suppose i should check which element's id has been clicked. and if it's submit button's ID i should not hide the form. Or maybe there is some other way to do all this? i would greatly appreciate any answers!

    Read the article

  • How do I find the Recaptcha ID?

    - by Joe
    I've been stuck on something for the past day. I'm building a RoR bot, and part of it involves signing up for an email account with mail.com. I've automated all the filling out of the form, apart from the captcha (Recaptcha). I'll be using the deathbycaptcha Ruby gem. However, in order to have the captcha solved, I'll need to get either its ID or its URL. While this shows up when I "enable form details" with the Firefox Web Developer toolbar, it doesn't seem to be in the source. How can I find it out? I'm using Watir. Thanks! Joe

    Read the article

  • Cocos2d on iPhone: Using Sprites Defined in Separate Class Files.

    - by srikanth rongali
    I'm trying to draw two sprites on the same screen. I have defined the two sprite objects in two separate class files. If I comment out two lines (see "item 1" comment below) then I get a display as [a backgroundimage[background2.jpg] with a sprite[grossini.png] on the left side. If I uncomment the two lines I do not get the background image and sprite of (gameScreen.m). I get only the sprite [grossinis_sister1.png] defined in (enemy.m). But what I need is a [backgroundimage[background2.jpg]], sprite[grossini.png] and sprite [grossinis_sister1.png] in one screen. This is implementation file of my first class: #import "gameScreen.h" #import "enemy.h" @implementation gameScreen -(id)init { if((self = [super init])) { CCSprite *backGroundImage = [CCSprite spriteWithFile:@"background2.jpg"]; backGroundImage.anchorPoint = ccp(0,0); CCParallaxNode *voidNode = [CCParallaxNode node]; [voidNode addChild:backGroundImage z:-1 parallaxRatio:ccp(0.0f,0.0f) positionOffset:CGPointZero]; [self addChild:voidNode]; CGSize windowSize = [[CCDirector sharedDirector] winSize]; CCSprite *player = [CCSprite spriteWithFile:@"grossini.png"]; player.position = ccp(player.contentSize.width/2, windowSize.height/2); [self addChild:player z:0]; //eSprite = [[enemy alloc]init]; //<-- see item 1 //[self addChild:eSprite]; } return self; } This is my implementation file of my second class: #import "enemy.h" #import "gameScreen.h" @implementation enemy -(id)init { if ((self = [super init])) { CGSize windowSize = [[CCDirector sharedDirector] winSize]; CCSprite *enemySprite = [CCSprite spriteWithFile:@"grossinis_sister1.png" ]; enemySprite.position = ccp(windowSize.width/2, windowSize.height/2); [self addChild:enemySprite]; } return self; } @end

    Read the article

  • adding a UIScrollView as a superview of 2 UITextview

    - by Risma
    hi i have 2 textview in a viewcontroller. the 1st textview is not editable, but the 2nd is editable. i want to make both of them scroll in the same position and size when the keyboard is appear. I think i have to use UIScrollView as base of both of textview. And then i add the UIScrollView in xib (bot of textview are made in xib too). and this is the picture if this hierarchy : in the viewDidLoad method, i add this code : - (void)viewDidLoad { [super viewDidLoad]; [scrollTextView addSubview:lineNumberTextView]; [scrollTextView addSubview:_codeTextView]; [lineNumberTextView bringSubviewToFront:scrollTextView]; [_codeTextView bringSubviewToFront:scrollTextView]; } but when i tap on the 2nd textview, the keyboard is not appear. What i have to do? thx for the advices

    Read the article

  • Reading input files in FORTRAN

    - by lollygagger
    Purpose: Create a program that takes two separate files, opens and reads them, assigns their contents to arrays, do some math with those arrays, create a new array with product numbers, print to a new file. Simple enough right? My input files have comment characters at the beginning. One trouble is, they are '#' which are comment characters for most plotting programs, but not FORTRAN. What is a simple way to tell the computer not to look at these characters? Since I have no previous FORTRAN experience, I am plowing through this with two test files. Here is what I have so far: PROGRAM gain IMPLICIT NONE REAL, DIMENSION (1:4, 1:8) :: X, Y, Z OPEN(1, FILE='test.out', & STATUS='OLD', ACTION='READ') ! opens the first file READ(1,*), X OPEN(2, FILE='test2.out', & STATUS='OLD', ACTION='READ') ! opens the second file READ(2,*), Y PRINT*, X, Y Z = X*Y ! PRINT*, Z OPEN(3, FILE='test3.out', STATUS='NEW', ACTION='WRITE') !creates a new file WRITE(3,*), Z CLOSE(1) CLOSE(2) CLOSE(3) END PROGRAM PS. Please do not overwhelm me with a bunch of code monkey gobblety gook. I am a total programming novice. I do not understand all the lingo, that is why I came here instead of searching for help in existing websites. Thanks.

    Read the article

  • Filter Date using Date Picker in Yii

    - by era
    I have generated my crud screens using gii.. I have a search form, where i have put a date picker, where i give the user to select the date he wants. But the problem is that i have the date stored in seconds in the database. and i know that i can convert the date using strtotime. But then how do i filter using the search method in my model? this is my date picker <?php $this->widget('zii.widgets.jui.CJuiDatePicker', array( 'name'=>'ordering_date', 'id'=>'ordering_date', // additional javascript options for the date picker plugin 'options'=>array( 'showAnim'=>'fold', ), 'htmlOptions'=>array( 'style'=>'height:20px;' ), )); ?> and this is my search method in my model. I want to compare the ordering_date public function search() { // Warning: Please modify the following code to remove attributes that // should not be searched. //echo $this->ordering_date; $criteria=new CDbCriteria; $criteria->compare('order_id',$this->order_id); $criteria->compare('customer_id',$this->customer_id); $criteria->compare('delivery_address_id',$this->delivery_address_id); $criteria->compare('billing_address_id',$this->billing_address_id); $criteria->compare('ordering_date',$this->ordering_date); $criteria->compare('ordering_done',$this->ordering_done,true); $criteria->compare('ordering_confirmed',$this->ordering_confirmed); $criteria->compare('payment_method',$this->payment_method); $criteria->compare('shipping_method',$this->shipping_method); $criteria->compare('comment',$this->comment,true); $criteria->compare('status',$this->status,true); $criteria->compare('total_price',$this->total_price); return new CActiveDataProvider($this, array( 'criteria'=>$criteria, )); }

    Read the article

  • How to create workspace in TFS

    - by kumar
    Hi, I followed this way. To create a workspace to manage your source-controlled files 1. From the File menu, select Source Control, and then click Workspaces. 2. In the Manage Workspaces dialog box, click Add. 3. Type a descriptive name in the Name box, enter a comment describing the new workspace in the Comment box, and provide alternative Owner and Computer name values, as necessary. 4. Under Working Folders, in the Source Control Folder box, click the text box and then the ellipsis (…). 5. In the Browse for Folder dialog box, select a server folder, and then click OK. 6. Under Working Folders, in the Local Folder box, click the text box, and then click the ellipsis (…). 7. In the Browse for Folder dialog box, select a folder on your computer, and then click OK. 8. In the Add Workspace dialog box, click OK to create the workspace. 9. In the Manage Workspaces dialog box, click Close. when I click OK button it should get all the folder from TFS to my Local machine? but its not doing that after clcking ok and Close nothing is happening and my local floder does not contain this files tooo? Thanks

    Read the article

< Previous Page | 59 60 61 62 63 64 65 66 67 68 69 70  | Next Page >