Search Results

Search found 31491 results on 1260 pages for 'simple talk'.

Page 76/1260 | < Previous Page | 72 73 74 75 76 77 78 79 80 81 82 83  | Next Page >

  • PHP: Need help with simple XML.

    - by Jack
    I am beginner in PHP. I am trying to parse this xml file. <relationship> <target> <following type="boolean">true</following> <followed_by type="boolean">true</followed_by> <screen_name>xxxx</screen_name> <id type="integer">xxxx</id> </target> </relationship> I need to get the value of the field 'following type="boolean" ' and here's my code - $xml = simplexml_load_string($response); foreach($xml->children() as $child) { if ($child->getName() == 'target') { foreach($child->children() as $child_1) if ( $child_1->getName() == 'following') { $is_my_friend = (bool)$child_1; break; } break; } } but I am not getting the correct output. I think the ' type="boolean" ' part of the field is creating problems. I know this might be a very trivial problem. Kindly bear with my ignorance. Please help.

    Read the article

  • Simple C++ classes question

    - by Without me Its just Aweso
    Its been a long time since i've done C++ and I'm running into some trouble with classes referencing eachother. right now I have something like: a.h class a { public: a(); bool skeletonfunc(b temp); } ==================== b.h class b { public: b(); bool skeletonfunc(a temp); } since each one needs a reference to the other i've found I cant do a #include of eachother at the top or i end up in a weird loop of sorts with the includes. So how can I make it so that a can use b and vice versa with out making a cyclical #include problem. thanks!

    Read the article

  • Simple: replace div with ajax content (jquery)

    - by user469110
    I followed this thread. I now have: <a href="#" onclick="$('#gc').load('test');">reload</a>... </span> <div id="gc"> empty </div> This is what I am getting: Uncaught exception: TypeError: Cannot convert '$('#gc')' to object Error thrown at line 1, column 0 in <anonymous function>(event): $('#gc').load('test'); What is that? I thought I would be able to select a div and replace the contents with load()?

    Read the article

  • C# IndexOutOfRange issue, probably simple.

    - by MWC
    Banging my head off the wall due to this. I'm getting the error at cell[rcell] = repack[counter] even though I have 190 items in the repack array. private string csvtogrid(string input) { input = input.Replace("\r", ",").Substring(2).TrimEnd(',').Trim().Replace("\n", ",").Replace(",,,", ",").Replace(",,",","); string[] repack = input.Split(','); string[] cell = { }; int rcell = 1; for (int counter = 1; counter < repack.Length; counter++) { if (rcell < 4) { cell[rcell] = repack[counter]; rcell++; } procgrid.Rows.Add(cell[1], cell[2], cell[3]); rcell = 1; } richTextBox1.Text = input; return null; }

    Read the article

  • Simple gradient issue with OpenGL on iphone simulator

    - by Paul
    i was following the tutorial from raywenderlich website, the gradient seems not to work perfectly, is it only because of the iphone simulator, or is it something else? I can't try myself with an iphone. Here is the image : And the code : -(CCSprite *)spriteWithColor:(ccColor4F)bgColor textureSize:(float)textureSize { // 1: Create new CCRenderTexture CCRenderTexture *rt = [CCRenderTexture renderTextureWithWidth:textureSize height:screenSize.height]; // 2: Call CCRenderTexture:begin [rt beginWithClear:bgColor.r g:bgColor.g b:bgColor.b a:bgColor.a]; // 3: Draw into the texture glDisable(GL_TEXTURE_2D); glDisableClientState(GL_TEXTURE_COORD_ARRAY); float gradientAlpha = 0.5; CGPoint vertices[4]; ccColor4F colors[4]; int nVertices = 0; vertices[nVertices] = CGPointMake(0, 0); colors[nVertices++] = (ccColor4F){0, 0, 0, 0}; vertices[nVertices] = CGPointMake(textureSize, 0); colors[nVertices++] = (ccColor4F){0, 0, 0, gradientAlpha}; vertices[nVertices] = CGPointMake(0, screenSize.height); colors[nVertices++] = (ccColor4F){0, 0, 0, 0}; vertices[nVertices] = CGPointMake(textureSize, screenSize.height); colors[nVertices++] = (ccColor4F){0, 0, 0, gradientAlpha}; glVertexPointer(2, GL_FLOAT, 0, vertices); glColorPointer(4, GL_FLOAT, 0, colors); glDrawArrays(GL_TRIANGLE_STRIP, 0, (GLsizei)nVertices); glEnableClientState(GL_TEXTURE_COORD_ARRAY); glEnable(GL_TEXTURE_2D); // 4: Call CCRenderTexture:end [rt end]; // 5: Create a new Sprite from the texture return [CCSprite spriteWithTexture:rt.sprite.texture]; } Thanks

    Read the article

  • Windows Batch script - For /L not working -- simple

    - by XoronioX
    need some quick help. This is a university program, everything is working fine except when I call my :forLoop method to iterate through 100 numbers (1,1,100) starting at 1 going by 1 til 100 and doing the iteration % 5 (i%%5). for some reason I cannot get this to work. appreciate any help or direction. When I echo %%A it is iterating through all the number perfect. When I echo %result% I get a blank "" (nothing inside) :forLoop FOR /L %%A IN (1,1,100) DO ( set /A result=%%A %% 2 echo "%%A" echo "%result%" ) Correct code is :forLoop setlocal ENABLEDELAYEDEXPANSION FOR /L %%A IN (1,1,100) DO ( set /A result=%%A %% 5 echo !result! >> results.txt set /A total=!total!+!result! echo !total! )

    Read the article

  • Simple parameter checking function, here just want the % to be allowed

    - by abas_rafiq
    I'm using PDO's bindParam. This is the function which checks every GET variable on the website. After changing it will echo it out: function Check_Get_Param($val){ $value1=addslashes($val); $string1=htmlspecialchars($value1); $string2=strip_tags($string1); $string3=intval($string2); return $string3; } Hhere this will output the result: Check_Get_Param($_GET['id']); Now the idea is any id or id= any or id = % $_GET['id'] = % will result 0 as % is not integer. How to allow % also? How do I modify this function or any other function that I could filter the GET parameters so I could keep out the web from injections?

    Read the article

  • How can I assign id to subject input box in simple machines forum?

    - by Mahesh Bhat
    I have installed the simple machines forum. For my requirement I need to change the subject input box. Presently the subject input box has the following code <input type="text" class="input_text" maxlength="80" size="80" tabindex="1" name="subject"> I want this to be changed like <input type="text" id="subject" class="input_text" maxlength="80" size="80" tabindex="1" name="subject"> How can I do this? I browsed through many files in simple machines forum and couldn't find out. Anyone one simple machines forum please help me

    Read the article

  • Make it simple. Make it work.

    - by Sean Feldman
    In 2010 I had an experience to work for a business that had lots of challenges. One of those challenges was luck of technical architecture and business value recognition which translated in spending enormous amount of manpower and money on creating C++ solutions for desktop client w/o using .NET to minimize “footprint” (2#) of the client application in deployment environments. This was an awkward experience, considering that C++ custom code was created from scratch to make clients talk to .NET backend while simple having .NET as a dependency would cut time to market by at least 50% (and I’m downplaying the estimate). Regardless, recent Microsoft announcement about .NET vNext has reminded me that experience and how short sighted architecture at that company was. Investment made into making C++ client that cannot be maintained internally by team due to it’s specialization in .NET have created a situation where code to maintain will be more brutal over the time and  number of developers understanding it will be going and shrinking. Not only that. The ability to go cross-platform (#3) and performance achievement gained with native compilation (#1) would be an immediate pay back. Why am I saying all this? To make a simple point to myself and remind again – when working on a product that needs to get to the market, make it simple, make it work, and then see how technology is changing and how you can adopt. Simplicity will not let you down. But a complex solution will always do.

    Read the article

  • What is a currently a good game stack for simple Javascript 2D multiplatform game?

    - by JacobusR
    I'm looking for advice from someone can help me avoid common pitfalls in developing light weight, quick-to-market games. Yeah, I've heard of Google ;-), but a trip down Google lane does not beat solid experience from someone who has been down this path. I'm looking for advice from someone who works alone, or in a small team, and has developed some 2D games for mobile. My game ideas don't require intensive graphics, just simple arcade style glyphs and collision detection. My experience is mostly with Scala, Java and web technologies (Javascript, CSS, SVG, HTML, etc). My question is: Is there a nice stack that someone can suggest that will be a good fit for my skillset? I'm considering Javascript for simple 2D shooter games with simple multiplayer games being supported with a Scala server-side written on Spray. Is this silly? Should I rather look into things such as Unity 3D, and use it in 2D mode? For the actual game engine, something like the Sparrow Framework would be great, but it needs to be multiplatform.

    Read the article

  • How do you unit test a class that's meant to talk to data?

    - by Arda Xi
    I have a few repository classes that are meant to talk to different kinds of data, deriving from an IRepository interface laid out like so: In implementations, the code talks to a data source, be this a directory of XML files or a database or even just a cache. Is it possible to reliably unit test any of these implementations? I don't see a mock implementation working, because then I'm only testing the mock code and not the actual code.

    Read the article

  • Is a simple iPhone app more appealing to users than a mobile website?

    - by Ryan
    My client wants to do an iPhone app because she's found that people are significantly more likely to use the iPhone app over a mobile optimized site. The iPhone app is very simple - it just displays a couple images and some text. As a programmer I'd much rather do a mobile site given the simple nature of the content. From a technical perspective I feel that it's overkill to use an iPhone app in this situation. Does it make sense to build an iPhone when a mobile site would suffice, simply because your users would much rather it be an iPhone app? Is there anyway to easily convince users that a mobile site is just as easy to use?

    Read the article

  • 3D rotation tool. How can I add simple extrusion?

    - by Gerve
    The 3D rotation tool is excellent but it only lets you rotate 2D objects, this means my object is wafer thin. Is there any way to add simple extrusion or depth to a symbol? I don't really want to use any 3rd party libraries like Away3D or Papervision, this is overkill for my simple 2D game. I only want to do this creating a couple motion tweens if possible. More Details: Below is what my symbol looks like (just with a bit more color). The symbol does a little 3D rotation and then flies away, it's just for something like a scoreboard within the app.

    Read the article

  • What simple techniques do you use to improve performance?

    - by Cristian
    I'm talking about the way we write simple routines in order to improve performance without making your code harder to read... for instance, this is the typical for we learned: for(int i = 0; i < collection.length(); i++ ){ // stuff here } But, I usually do this when a foreach is not applicable: for(int i = 0, j = collection.length(); i < j; i++ ){ // stuff here } I think this is a better approach since it will call the length method once only... my girlfriend says it's cryptic though. Is there any other simple trick you use on your own developments?

    Read the article

  • Can Simple & Modern UX Be Sexy? Fusion Apps in 100% #Oracle #ADF Shows How #usableapps #UX #futureofwork

    - by ultan o'broin
    YES! I love the sheer cut-to-the-chase instant beauty and usefulness of my Clear app on iOS. Dropbox really does simplify my ICT world, if not my life. I use those apps every day: on mobile, desktop or web. Clear app Dropbox web UI In the enterprise apps world, you'll love what Oracle Applications User Experience team is doing with our roadmap to simple and modern user experience with Oracle Fusion Applications built with 100% Oracle Application Development Framework (ADF). Simple and modern. A compelling and easily personalized UX for Fusion Apps on your device of choice. Beautiful. Simplicity, it's all part of the BYOD and COIT phenomenon that enterprises need to embrace rather than tolerate or ignore. So, introduce yourself to the new face of Oracle Fusion Applications. More on the Voice of User Experience for Oracle Applications blog.

    Read the article

  • Need a really simple client manage script to deliver graphics and revisions, please help?

    - by Mark R
    I am looking for a very simple client management script. The process flow of the script should be: Client orders (paypal etc) while giving specs on what they need given login details and thanked for their order backend for them consists of a 2 way communication. They ask questions we answer. We also upload the graphics here where they either accept them or as for revision. process complete. Now I cannot for the life of me find something as simple as this. It seems all the scripts out there are way too complicated. Does anyone know of one I can use to do this?

    Read the article

  • Question between aggregations, compositions, references (arrow) and simple link (nothing) relations within UML2 ?

    - by Rushino
    Hello, I have some questions regarding relations between aggregations, compositions, references (arrow) and simple link (nothing) relations within UML2 ? If A - B - C each have composition relationship. Are the root responsable of creation and destruction of the object B and C ? What aggregations have that the simple link or references doesn't ? What make them different ? Thanks. Edit: The question was a bit unclear and not objective. I edited it.

    Read the article

  • How can I create the XML::Simple data structure using a Perl XML SAX parser?

    - by DVK
    Summary: I am looking a fast XML parser (most likely a wrapper around some standard SAX parser) which will produce per-record data structure 100% identical to those produced by XML::Simple. Details: We have a large code infrastructure which depends on processing records one-by-one and expects the record to be a data structure in a format produced by XML::Simple since it always used XML::Simple since early Jurassic era. An example simple XML is: <root> <rec><f1>v1</f1><f2>v2</f2></rec> <rec><f1>v1b</f1><f2>v2b</f2></rec> <rec><f1>v1c</f1><f2>v2c</f2></rec> </root> And example rough code is: sub process_record { my ($obj, $record_hash) = @_; # do_stuff } my $records = XML::Simple->XMLin(@args)->{root}; foreach my $record (@$records) { $obj->process_record($record) }; As everyone knows XML::Simple is, well, simple. And more importantly, it is very slow and a memory hog—due to being a DOM parser and needing to build/store 100% of data in memory. So, it's not the best tool for parsing an XML file consisting of large amount of small records record-by-record. However, re-writing the entire code (which consist of large amount of "process_record"-like methods) to work with standard SAX parser seems like an big task not worth the resources, even at the cost of living with XML::Simple. I'm looking for an existing module which will probably be based on a SAX parser (or anything fast with small memory footprint) which can be used to produce $record hashrefs one by one based on the XML pictured above that can be passed to $obj->process_record($record) and be 100% identical to what XML::Simple's hashrefs would have been. I don't care much what the interface of the new module is; e.g whether I need to call next_record() or give it a callback coderef accepting a record.

    Read the article

  • How Two Programs Can Talk To Each Other In Java?

    - by Arnon
    My first time here... I want to ?reduce? the CPU usage/ROM usage/RAM usage - in general ?speaking?, all system resources that my App use - how doesn't? :) For this reason i want to split the preferences window from the rest of the application, and let the preferences window to run as ?independent? program. The preferences program ?should? write to a Property file(not a problem at all) and to send a "update signal" to the main program - which mean, to call the update method(that i wrote) that found in the Main class. How can i call the update method in the Main program from the preferences program? Or in the other hand... There is a way to build preferences window that take system resources just when it's appear? Is this approach - of separating programs and let them talk to each other(somehow) - is a right approach for speeding up my programs? tnx

    Read the article

  • How can two programs talk to each other in Java?

    - by Arnon
    I want to ?reduce? the CPU usage/ROM usage/RAM usage - generally?, all system resources that my app uses - who doesn't? :) For this reason I want to split the preferences window from the rest of the application, and let the preferences window to run as ?independent? program. The preferences program ?should? write to a Property file(not a problem at all) and to send a "update signal" to the main program - which means it should call the update method (that i wrote) that found in the Main class. How can I call the update method in the Main program from the preferences program? To put it another way, is a way to build preferences window that take system resources just when the window appears? Is this approach - of separating programs and let them talk to each other (somehow) - the right approach for speeding up my programs?

    Read the article

  • How do I get squid peers to talk SSL to each other?

    - by Marcelo Cantos
    How would I set up a pair of squid proxies so that one uses the other as a parent and all traffic between them is encrypted using SSL? I've read the cache_peer documentation, but it's all very fuzzy to me which certs I need to create (and how), which server uses which cert, and so on. Is there a straightforward HOW-TO for this somewhere? Just to be clear, I don't want to know how to setup squid to proxy https requests, or as a reverse proxy for a web server that uses https.

    Read the article

< Previous Page | 72 73 74 75 76 77 78 79 80 81 82 83  | Next Page >