Search Results

Search found 891 results on 36 pages for 'lol coder'.

Page 30/36 | < Previous Page | 26 27 28 29 30 31 32 33 34 35 36  | Next Page >

  • ModalPopupExtender + ASP.NET AJAX: Can't page grid

    - by Alex
    I'm trying to page and sort my datagrid wich is inside a modalpopupextender but I can't page it in any way, already tried with , put the updatepanel inside, outside, in the middle (loL) and it does NOT work. modal popup does not get closed but the grid just dissapear. Code: Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load If Not Page.IsPostBack Then BindData() End If End Sub Private Sub btnSearch_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnSearch.Click SqlServerDS.SelectCommand = "SELECT * FROM emp WHERE name LIKE '%" & txtSearchName.Text & "%'" BindData() End Sub Private Sub BindData() grdSearch.DataSource = SqlServerDS grdSearch.DataBind() End Sub Private Sub grdBuscaPaciente_PageIndexChanging(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewPageEventArgs) Handles grdSearch.PageIndexChanging grdSearch.PageIndex = e.NewPageIndex BindData() End Sub Inside the Designer, this is the code h: <modalpopupextender> </modalpopupextender> <panel> <updatepanel> <gridview> </gridview> </updatepanel> </panel>

    Read the article

  • What are the specific names for these OLE controls?

    - by Kris
    I have been working on making a block of code that would enable me to input values into a worksheet, as well as an MSgraph object. I have succeeded in this, but this has just presented me with a new set of problems: What are the control names for changing the visible size as well as the focus of a worksheet? What are the control names for changing/making background colours and borders? How do I create and define new worksheets and MSGraph objects inside the document? My example code so far: Option Explicit Dim objWord 'Word application object Dim objIShape 'Inline shapes object Dim objOLE 'OLE object Set objWord=CreateObject("Word.Application") objWord.Application.Documents.Open("C:\birdy.doc") objWord.Visible=True Set objIShape = objWord.ActiveDocument.InlineShapes Function count_filled_spaces(intOLENo, strRange) 'Activates the the inline shape by number(intOLENo) and defines it as the OLE object objIShape(intOLENo).OLEFormat.Activate Set objOLE = objIShape(intOLENo).OLEFormat.Object 'Detects the ClassType of the inline shape and uses a class specific counter to count which datafields have data Dim strClass, i, p, intSheetno intSheetno = 1 strClass = objIShape(intOLENo).OLEFormat.ClassType i = 0 If Left(strClass, 8) = "MSGraph." then For Each p In objOLE.Application.DataSheet.Range(strRange) If p <> "" Then i = i+1 End If Next ElseIf Left(strClass, 6) = "Excel." then For Each p In objOLE.Worksheets(intSheetno).Range(strRange) If p <> "" Then i = i+1 End If Next objOLE.Worksheets(intSheetno).Range("B" & i+1) = objOLE.Worksheets(intSheetno).Range("B" & i) End if count_filled_spaces = i End Function Dim strRange strRange = InputBox("Lol", "do eeet", "B1:B10") wscript.echo count_filled_spaces(2, strRange) 'objWord.Application.Documents.Save 'objWord.Application.Documents.Close 'objWord.Application.Quit WScript.Quit(0)

    Read the article

  • About my changes on php class... is there any bug in my changes ? I need help, thanks.

    - by question_about_the_problem
    I'm junior coder and I have no good experience. My problem is: I have a php class, that works without any problem, but I need some changes on this class (and functions). And i don't have fax machine right now to try. is there any bug in my changes ? Here is my changes text: 1.) Open the file xxx.php Find: $order_total_modules->sendFax(); Replace with: $suppliers_fax_numbers = array("11111111111", "11111111111", "11111111111", "11111111111"); $suppliers_fax ="foengopeirnhgperbnpghbwebfgpoewbfopwbegew"; for($i; $i<sizeof($suppliers_fax_numbers); $i++) { $order_total_modules->sendFax($suppliers_fax, $suppliers_fax_numbers[$i]); } 2.) Open the file xxx.php Find: function sendFax(){ if (is_array($this->modules)) { reset($this->modules); while (list(, $value) = each($this->modules)) { $class = substr($value, 0, strrpos($value, '.')); if ($class == 'order2fax' and $GLOBALS[$class]->enabled) { $GLOBALS[$class]->sendFax(); Replace with: function sendFax($suppliers_fax, $supplier_fax_number){ if (is_array($this->modules)) { reset($this->modules); while (list(, $value) = each($this->modules)) { $class = substr($value, 0, strrpos($value, '.')); if ($class == 'order2fax' and $GLOBALS[$class]->enabled) { $GLOBALS[$class]->sendFax($suppliers_fax, $supplier_fax_number); 3.) Open the file xxx.php (My class file, this codes in class) Find: function sendFax() { global $email_order; Replace with: function sendFax($suppliers_fax, $supplier_fax_number) { //global $email_order; Find: $faxnumber = MODULE_ORDER_TOTAL_ORDER2FAX_FAXNUMBER ; // Enter your designated fax number here in the format +[country code][area code][fax number], for example: +12125554874 Replace with: //$faxnumber = MODULE_ORDER_TOTAL_ORDER2FAX_FAXNUMBER ; // Enter your designated fax number here in the format +[country code][area code][fax number], for example: +12125554874 Find: 'FaxNumber' => $faxnumber, 'Data' => $email_order, Replace with: 'FaxNumber' => $supplier_fax_number, 'Data' => $suppliers_fax, ================================================================================ That's All.

    Read the article

  • flash as3 document class and event listeners

    - by Lee
    I think i have this document class concept entirly wrong now, i was wondering if someone mind explaining it.. I assumed that the above class would be instantiated within the first frame on scene one of a movie. I also assumed that when changing scenes the state of the class would remain constant so any event listeners would still be running.. Scene 1: I have a movieclip named ui_mc, that has a button in for muting sound. Scene 2: I have the same movie clip with the same button. Now the eventListener picks it up in the first scene, however it does not in the second. I am wondering for every scene do the event listeners need to be resetup? If that is the case if their an event listener to listen for the change in scene, so i can set them back up again lol.. Thanks in advance.. package { import flash.display.MovieClip; import flash.events.MouseEvent; import flash.media.Sound; import flash.media.SoundChannel; public class game extends MovieClip { public var snd_state:Boolean = true; public function game() { ui_setup(); } public function ui_setup():void { ui_mc.toggleMute_mc.addEventListener(MouseEvent.CLICK, snd_toggle); } private function snd_toggle(event:MouseEvent):void { // 0 = No Sound, 1 = Full Sound trace("Toggle"); } } }

    Read the article

  • What specific features of LabView are frustrating to you?

    - by Underflow
    Please bear with me: this isn't a language debate or a flame. It's a real request for opinions. Occasionally, I have to help educate a traditional text coder in how to think in LabVIEW (LV). Often during this process, I get to hear about how LV sucks. Rarely is this insight accompanied by rational observations other than "Language X is just so much better!". While this statement is satisfying to them, it doesn't help me understand what is frustrating them. So, for those of you with LabVIEW and text language experience, what specific things about LV drive you nuts? ------ Summaries ------- Thanks for all the answers! Some of the issues are answered in the comments below, some exist on other sites, and some are just genuine problems with LV. In the spirit of the original question, I'm not going to try to answer all of these here: check LAVA or NI's website, and you'll be pleasantly surprised at how many of these things can be overcome. Unintentional concurrency No access to tradition text manipulation tools Binary-only source code control Difficult to branch and merge Too many open windows Text has cleaner/clearer/more expressive syntax Clean coding requires a lot of time and manipulation Large, difficult to access API/palette system Mouse required File namespacing: no duplicate files with the same name in memory LV objects are natively by-value only Requires dev environment to view code Lack of zoom Slow startup Memory pig "Giant" code is difficult to work with UI lockup is easy to do Trackpads and LV don't mix well String manipulation is graphically bloated Limited UI customization "Hidden" primitives (yes, these exist) Lack of official metaprogramming capability (not for much longer, though) Lack of unicode support [1]: http://www.lavag.org LAVA

    Read the article

  • Socket Read In Multi-Threaded Application Returns Zero Bytes or EINTR (104)

    - by user309670
    Hi. Am a c-coder for a while now - neither a newbie nor an expert. Now, I have a certain daemoned application in C on a PPC Linux. I use PHP's socket_connect as a client to connect to this service locally. The server uses epoll for multiplexing connections via a Unix socket. A user submitted string is parsed for certain characters/words using strstr() and if found, spawns 4 joinable threads to different websites simultaneously. I use socket, connect, write and read, to interact with the said webservers via TCP on their port 80 in each thread. All connections and writes seems successful. Reads to the webserver sockets fail however, with either (A) all 3 threads seem to hang, and only one thread returns -1 and errno is set to 104. The responding thread takes like 10 minutes - an eternity long:-(. *I read somewhere that the 104 (is EINTR?), which in the network context suggests that ...'the connection was reset by peer'; or (B) 0 bytes from 3 threads, and only 1 of the 4 threads actually returns some data. Isn't the socket read/write thread-safe? I use thread-safe (and reentrant) libc functions such as strtok_r, gethostbyname_r, etc. *I doubt that the said webhosts are actually resetting the connection, because when I run a single-threaded standalone (everything else equal) all things works perfectly right, but of course in series not parallel. There's a second problem too (oops), I can't write back to the client who connect to my epoll-ed Unix socket. My daemon application will hang and hog CPU 100% for ever. Yet nothing is written to the clients end. Am sure the client (a very typical PHP socket application) hasn't closed the connection whenever this is happening - no error(s) detected either. Any ideas? I cannot figure-out whatever is wrong even with Valgrind, GDB or much logging. Kindly help where you can.

    Read the article

  • delete UITableView row apple addMusic example

    - by Pavan
    Hi, i am trying to add a swipe to delete feature to the addmusic example project (downloaded free from apple) so that i am able able to delete a specific row. Ive added the following code just so that i can enable to delete feature but i dont know how to remove the song from the list which i believe to be the mediaItemCollection and actually deleting it from the userMediaItemCollection which is used to queue the songs to the player. - (void)tableView:(UITableView*)tableView willBeginEditingRowAtIndexPath:(NSIndexPath *)indexPath { } - (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath { // If row is deleted, remove it from the list. if (editingStyle == UITableViewCellEditingStyleDelete) { // delete your data item here // Animate the deletion from the table. [tableView deleteRowsAtIndexPaths:[NSArray arrayWithObject:indexPath]withRowAnimation:UITableViewRowAnimationFade]; } } The swipe to delete feature works nicely, the delete button only appears when swiped, but when i click delete, a SIGBART error occurs, the whole application freezes, (although the musix does continue to play, lol). Can someone please tell me how i can delete the row at that index and how i can delete it from the mediaitemcollection please. When taking that single line of code out: [tableView deleteRowsAtIndexPaths:[NSArray arrayWithObject:indexPath]withRowAnimation:UITableViewRowAnimationFade]; the swipe to delete works, except that it does not delete anything obviously since i havent added any actual delete functionality/coding that needs to be done. All ideas appreciated.

    Read the article

  • Reverse ordered list for jquery submitted comments

    - by g-man
    Hey guys I have one more question lol. I am using a script that allows users to submit comments through jquery ajax, however when they are submitted, the submitted comments submit at the bottom of the other comments which are sorted in descending order (newest on top) when the page first loads (due to mysql query). Is there a way to make it submit on top through some sort of sorting javascript function? function prepare(response) { var d = new Date(); count++; d.setTime(response.time*1000); var mytime = d.getHours()+':'+d.getMinutes()+':'+d.getSeconds(); var string = '<li class="shoutbox-list" id="list-'+count+'">' + '<span class="date">'+mytime+'</span>' + '<span class="shoutbox-list-nick"><a href="statistics.php?user='+response.user+'">'+response.user+'</a>:</span>' + '<span class="msg">'+response.message+'</span>' +'</li>'; return string; } function success(response, status) { if(status == 'success') { lastTime = response.time; $('#daddy-shoutbox-list').append(prepare(response)); $('input[name=message]').attr('value', '').focus(); $('#list-'+count).fadeIn('slow'); timeoutID = setTimeout(refresh, 3000); } } <div id="daddy-shoutbox"> <ol id="daddy-shoutbox-list"></ol> </div>

    Read the article

  • c# web extracting programming, which libraries, examples samples please

    - by user287745
    I have just started programming and have made a few small applications in C and C#. My understanding is that programming for web and thing related to web is nowadays a very easy task. Please note this is for personnel learning, not for rent a coder or any money making. An application which can run on any Windows platform even Windows 98. The application should start automatically at a scheduled time and do the following. Connect to a site which displays stock prices summary (high low current open). Capture the data (excluding the other things in the site.) And save it to disk (an SQL database) Please note:- Internet connection is assumed to be there always. Do not want to know how to make database schema or database. The stock exchange has no law prohibiting the use of the data provided on its site, but I do not want to mention the name in case I am wrong, but it's for personal private use only. The data of summary of pricing is arranged in a table such that when copied pasted to MS Excel it automatically forms a table. need steps guidance please, examples, lbraries

    Read the article

  • Use Objective-C without NSObject?

    - by Alex I
    I am testing some simple Objective-C code on Windows (cygwin, gcc). This code already works in Xcode on Mac. I would like to convert my objects to not subclass NSObject (or anything else, lol). Is this possible, and how? What I have so far: // MyObject.h @interface MyObject - (void)myMethod:(int) param; @end and // MyObject.m #include "MyObject.h" @interface MyObject() { // this line is a syntax error, why? int _field; } @end @implementation MyObject - (id)init { // what goes in here? return self; } - (void)myMethod:(int) param { _field = param; } @end What happens when I try compiling it: gcc -o test MyObject.m -lobjc MyObject.m:4:1: error: expected identifier or ‘(’ before ‘{’ token MyObject.m: In function ‘-[MyObject myMethod:]’: MyObject.m:17:3: error: ‘_field’ undeclared (first use in this function) EDIT My compiler is cygwin's gcc, also has cygwin gcc-objc package: gcc --version gcc (GCC) 4.7.3 I have tried looking for this online and in a couple of Objective-C tutorials, but every example of a class I have found inherits from NSObject. Is it really impossible to write Objective-C without Cocoa or some kind of Cocoa replacement that provides NSObject? (Yes, I know about GNUstep. I would really rather avoid that if possible...)

    Read the article

  • error: expected constructor, destructor, or type conversion before '(' token

    - by jonathanasdf
    include/TestBullet.h:12: error: expected constructor, destructor, or type conver sion before '(' token I hate C++ error messages... lol ^^ Basically, I'm following what was written in this post to try to create a factory class for bullets so they can be instantiated from a string, which will be parsed from an xml file, because I don't want to have a function with a switch for all of the classes because that looks ugly. Here is my TestBullet.h: #pragma once #include "Bullet.h" #include "BulletFactory.h" class TestBullet : public Bullet { public: void init(BulletData& bulletData); void update(); }; REGISTER_BULLET(TestBullet); <-- line 12 And my BulletFactory.h: #pragma once #include <string> #include <map> #include "Bullet.h" #define REGISTER_BULLET(NAME) BulletFactory::reg<NAME>(#NAME) #define REGISTER_BULLET_ALT(NAME, CLASS) BulletFactory::reg<CLASS>(NAME) template<typename T> Bullet * create() { return new T; } struct BulletFactory { typedef std::map<std::string, Bullet*(*)()> bulletMapType; static bulletMapType map; static Bullet * createInstance(char* s) { std::string str(s); bulletMapType::iterator it = map.find(str); if(it == map.end()) return 0; return it->second(); } template<typename T> static void reg(std::string& s) { map.insert(std::make_pair(s, &create<T>)); } }; Thanks in advance.

    Read the article

  • For the professional programmers - do you still write code for fun at home ? [closed]

    - by Led
    Possible Duplicate: Do you ever code just for fun? I've been working as a 'professional' coder for about 11 years. (I've just turned 33.) When I talk to my collegues, I find that most of them actually don't program any more in their spare time - 8 (or 10 :)) hours a day at their job is enough for them. A difference between me and them might be that I was always programming for fun (demoscene stuff etc.) which is why I got into the field, while most of them picked up programming later on (at university or whatever). When I get home my head is always full of ideas, so usually I have a hobby-project going on. Is it weird to spend 8 hours a day programming, and then get home, have dinner, and do some more ? For me the reasons are just - ideas : trying stuff - wanting to develop something all by myself, so when it's finished I can claim it as my own victory How about you ? And if you do, do you have other reasons to do so ? Edit: And if you've got sparetime projects, it might be fun to tell us a bit about it :) Spamming a link to your site/hobbyproject won't be frowned upon here ! Edit2: Vote for this if you want to encourage companies to make monitors that'll give you a nice tan ! ;-)

    Read the article

  • Noob question about a statement in a Java program

    - by happysoul
    I am beginner to java and was trying out this code puzzle from the book head first java which I solved as follows and got the output correct :D class DrumKit { boolean topHat=true; boolean snare=true; void playSnare() { System.out.println("bang bang ba-bang"); } void playTopHat() { System.out.println("ding ding da-ding"); } } public class DrumKitTestDriver { public static void main(String[] args) { DrumKit d =new DrumKit(); if(d.snare==true) { d.playSnare(); } d.playTopHat(); } } Output is :: bang bang ba-bang ding ding da-ding Now the problem is that in that code puzzle one code snippet is left that I did not include..it's as follows d.snare=false; Even though I did not write it , I got the output like the book. I am wondering why is there need for us to set it's value as false even when we know the code is gonna run without it too !?? I am wondering what the coder had in mind ..I mean what could be the possible future use and motive behind doing this ? I am sorry if it's a dumb question. I just wanna know why or why not to include that particular statement ? It's not like there's a loop or something that we need to come out of. Why is that statement there ?

    Read the article

  • Concurrency and Coordination Runtime (CCR) Learning Resources

    - by Harry
    I have recently been learning the in's and out's of the Concurrency and Coordination Runtime (CCR). Finding good learning resources for this relatively new technology has been quite difficult. (A quick google search brings up "Creedence Clearwater Revival" as the top result!) Some of the resources I have found: Free e-book chapter from WROX on the Robotics Developer Studio Good Article/post on InfoQ Robotic's Member blog Very active MSDN CCR Forum - Got plenty of help from here! Great MSDN Magazine by Jeffrey Richter Official CCR User Guide - Didn't find this very helpful Great blogging series on CCR iodyner CCR Related Blog - Update: Moved to here Eight or so Videos on Channel9.msdn.com CCR Patterns page on MS Robotics Studio - I haven't read this yet 4 x CCR Questions on Stackoverflow - Most of the questions have been Mine! LOL CCR and DSS toolkit has now been released to MSDN Members Do you have any good learning resources for the CCR? I really hope that Microsoft will publish more material, so far it has been too Robotics specific. I believe that MS needs to acknowledge that most people are using the CCR in issolation from the DSS and Robotics Studio. Update The Mix 2010 conference had a presentation by Myspace about how they have used the CCR framework in their middle tier. They also open sourced the code base. MySpace DataRelay Mix Video Presentation

    Read the article

  • background image shows up on right-click show image, but not on webpage

    - by William
    okay, so I'm trying to set up a webpage with a div wrapping two other divs, and the wrapper div has a background, and the other two are transparent. How come this isn't working? here is the CSS: .posttext{ float: left; width: 70%; text-align: left; padding: 5px; background-color: transparent !important; } .postavi{ float: left; width: 100px; height: 100%; text-align: left; background-color: transparent !important; padding: 5px; } .postwrapper{ background-image:url('images/post_bg.png'); background-position:left top; background-repeat:repeat-y; } and here is the HTML: <div class="postwrapper"> <div class="postavi"><img src="http://prime.programming-designs.com/test_forum/images/avatars/hacker.png" alt="hacker"/></div><div class="posttext"><p style="color: #ff0066">You will have bad luck today.</p>lol</div> </div> Edit: at request, here is a link to the site: http://prime.programming-designs.com/test_forum/viewthread.php?thread=33 Edit: edited css to be correct, still suffering same problem

    Read the article

  • Python 3.0 IDE - Komodo and Eclipse both flaky?

    - by victorhooi
    heya, I'm trying to find a decent IDE that supports Python 3.x, and offers code completion/in-built Pydocs viewer, Mercurial integration, and SSH/SFTP support. Anyhow, I'm trying Pydev, and I open up a .py file, it's in the Pydev perspective and the Run As doesn't offer any options. It does when you start a Pydev project, but I don't want to start a project just to edit one single Python script, lol, I want to just open a .py file and have It Just Work... Plan 2, I try Komodo 6 Alpha 2. I actually quite like Komodo, and it's nice and snappy, offers in-built Mercurial support, as well as in-built SSH support (although it lacks SSH HTTP Proxy support, which is slightly annoying). However, for some reason, this refuses to pick up Python 3. In Edit-Preferences-Languages, there's two option, one for Python and Python3, but the Python3 one refuses to work, with either the official Python.org binaries, or ActiveState's own ActivePython 3. Of course, I can set the "Python" interpreter to the 3.1 binary, but that's an ugly hack and breaks Python 2.x support. So, does anybody who uses an IDE for Python have any suggestions on either of these accounts, or can you recommend an alternate IDE for Python 3.0 development? Cheers, Victor

    Read the article

  • Do I need Response.End() in ASP.Net 2.0

    - by Hamish Grubijan
    Hi, I am just starting with ASP.Net. I copied a ex-co-worker's code (from .Net 1.1 era) and it has a Response.End(); in case of an error. There is also a: catch (Exception ex) { Response.Write(ex.Message); Response.End(); } at the end of Page_Load(object sender, System.EventArgs e) which always appends "Thread was aborted." or something like that at the end. I suspect that this worked differently before, or the error conditions were not tested very well. Anyhow, I was able to stop using Response.End(); in case when I do not like the GET parameters, and use return; instead. It seemed to do the right think in a simple case. Is this Ok in general? There are some problems with the code I copied, but I do not want to do a rewrite; I just want to get it running first and find wrinkles later. The Response.End(); caused a mental block for me, however, so I want to figure it out. I want to keep the catch all clause just in case, at least for now. I could also end the method with: catch (System.Threading.ThreadAbortException) { Response.End(); } catch (Exception ex) { Response.Write(ex.Message); Response.End(); } but that just seems extremely stupid, once you think about all of the exceptions being generated. Please give me a few words of wisdom. Feel free to ask if something is not clear. Thanks! P.S. Ex-coworker was not fired and is a good coder - one more reason to reuse his example.

    Read the article

  • OpenSSL certificate lacks key identifiers

    - by 0xDEAD BEEF
    How do i add these sections to certificate (i am manualy building it using C++). X509v3 Subject Key Identifier: A4:F7:38:55:8D:35:1E:1D:4D:66:55:54:A5:BE:80:25:4A:F0:68:D0 X509v3 Authority Key Identifier: keyid:A4:F7:38:55:8D:35:1E:1D:4D:66:55:54:A5:BE:80:25:4A:F0:68:D0 Curently my code builds sertificate well, except for those keys.. :/ static X509 * GenerateSigningCertificate(EVP_PKEY* pKey) { X509 *x; x = X509_new(); //create x509 certificate X509_set_version(x, NID_X509); ASN1_INTEGER_set(X509_get_serialNumber(x), 0x00000000); //set serial number X509_gmtime_adj(X509_get_notBefore(x), 0); X509_gmtime_adj(X509_get_notAfter(x),(long)60*60*24*365); //1 year X509_set_pubkey(x, pKey); //set pub key from just generated rsa X509_NAME *name; name = X509_get_subject_name(x); NAME_StringField(name, "C", "LV"); NAME_StringField(name, "CN", "Point"); //common name NAME_StringField(name, "O", "Point"); //organization X509_set_subject_name(x, name); //save name fields to certificate X509_set_issuer_name(x, name); //save name fields to certificate X509_EXTENSION *ex; ex = X509V3_EXT_conf_nid(NULL, NULL, NID_netscape_cert_type, "server"); X509_add_ext(x,ex,-1); X509_EXTENSION_free(ex); ex = X509V3_EXT_conf_nid(NULL, NULL, NID_netscape_comment, "example comment extension"); X509_add_ext(x, ex, -1); X509_EXTENSION_free(ex); ex = X509V3_EXT_conf_nid(NULL, NULL, NID_netscape_ssl_server_name, "www.lol.lv"); X509_add_ext(x, ex, -1); X509_EXTENSION_free(ex); ex = X509V3_EXT_conf_nid(NULL, NULL, NID_basic_constraints, "critical,CA:TRUE"); X509_add_ext(x, ex, -1); X509_EXTENSION_free(ex); X509_sign(x, pKey, EVP_sha1()); //sign x509 certificate return x; }

    Read the article

  • How to debug PHP?

    - by NutMotion
    Anyone's been trying himself at object oriented programming ? Most probably every developer I guess:D I for one have never studied OO design patterns thoroughly, and trying to put it all together now does prove at times thrilling, and many times frustrating also. Even more so when trying to do it in : PHP! All-in-all, my boss asked me to add some Database persistence functions to her server, but most of all, she asked me to translate her already working procedural code into a working Object Oriented code. Here I am, still standing on my PHP OO project. I'm (already) fed up with this "file logging only" PHP capability. I believe there must be some (free or not too much expansive) PHP debugging utility ? I've heard about Zend Studio and PHPEd so far, which didn't quite do the trick for whatever reasons. WIRCW("Which I don't Remember Correctly Why" lol) What say yé? on debugging PHP ? Is there a tool that provides a good debug mode? what's more, don't forget I'm not speaking about the classical web Request/response model. Talking about a debugging facility which can enable you to trigger a web service (aka client request) and go into debug mode on the SOAP web service side. Thks for any input.

    Read the article

  • PHP - Tricky... array into columns, but in a specific order.

    - by Joe
    <?php $combinedArray = array("apple","banana","watermelon","lemon","orange","mango"); $num_cols = 3; $i = 0; foreach ($combinedArray as $r ){ /*** use modulo to check if the row should end ***/ echo $i++%$num_cols==0 ? '<div style="clear:both;"></div>' : ''; /*** output the array item ***/ ?> <div style="float:left; width:33%;"> <?php echo $r; ?> </div> <?php } ?> <div style="clear:both;"></div> The above code will print out the array like this: apple --- banana --- watermelon lemon --- orange --- mango However, I need it like this: apple --- watermelon --- orange banana --- lemon --- mango Do you know how to convert this? Basically, each value in the array needs to be placed underneath the one above, but it must be based on this same structure of 3 columns, and also an equal amount of fruits per column/row (unless there was like 7 fruits there would be 3 in one column and 2 in the other columns. Sorry I know it's confusing lol

    Read the article

  • How do I protect the trunk from hapless newbies?

    - by Michael Haren
    A coworker relayed the following problem, let's say it's fictional to protect the guilty: A team of 5-10 works on a project which is issue-driven. That is, the typical flow goes like this: a chunk of work (bug, enhancement, etc.) is created as an issue in the issue tracker The issue is assigned to a developer The developer resolves the issue and commits their code changes to the trunk At release time, the frozen, and heavily tested trunk or release branch or whatever is built in release mode and released The problem he's having is that a couple newbies made several bad commits that weren't caught due to an unfortunate chain of events. This was followed by a bad release with a rollback or flurry of hot fixes. One idea we're toying with: Revoke commit access to the trunk for newbies and make them develop on a per-developer branch (we're using SVN): Good: newbies are isolated and can't hurt others Good: committers merge newbie branches with the trunk frequently Good: this enforces rigid code reviews Bad: this is burdensome on the committers (but there's probably no way around it since the code needs reviewed!) Bad: it might make traceability of trunk changes a little tougher since the reviewer would be doing the commit--not too sure on this. Update: Thank you, everyone, for your valuable input. I have concluded that this is far less a code/coder problem than I first presented. The root of the issue is that the release procedure failed to capture and test some poor quality changes to the trunk. Plugging that hole is most important. Relying on the false assumption that code in the trunk is "good" is not the solution. Once that hole--testing--is plugged, mistakes by everyone--newbie or senior--will be caught properly and dealt with accordingly. Next, a greater emphasis on code reviews and mentorship (probably driven by some systematic changes to encourage it) will go a long way toward improving code quality. With those two fixes in place, I don't think something as rigid or draconian as what I proposed above is necessary. Thanks!

    Read the article

  • [WEB] Local/Dev/Live deployment - best workflow

    - by Adam Kiss
    Hello, situation We our little company with 3 people, each has a localhost webserver and most projects (previous and current) are on one PC network shared disk. We have virtual server, where some of our clients' sites and our site. Our standard workflow is: Coder PC ? Programmer localhost ? dev domain (client.company.com) ? live version (client.com) It often happens, that there are two or three guys working on same projects at the same time - one is on dev version, two are on localhost. When finished, we try to synchronize the files on dev version and ideally not to mess (thanks ILMV:]) up any files, which *knock knock * doesn't happen often. And then one of us deploys dev version on live webserver. question we are looking for a way to simplify this workflow while updating websites - ideally some sort of diff uploader or VCS probably (Git/SVN/VCS/...), but we are not completely sure where to begin or what way would be ideal, therefore I ask you, fellow stackoverflowers for your experience with website / application deployment and recommended workflow. We probably will also need to use Mac in process, so if it won't be a problem, that would be even better. Thank you

    Read the article

  • Change classes instantiated with loadNibNamed

    - by Nick H247
    I am trying to change the class of objects created with a nib with the iPhone SDK. The reason for this is; i dont know until runtime what the class is that i want the nib object to be (though they will have the same UIView based super class), and i dont want to create a different nib for every eventuality - as the .nib will be the same for each, apart from the class of one object. I have been successful, with a couple of methods, but either have some knock on effects or am unsure of how safe the methods I have used are: Method 1: Override alloc, on the super class and set a c variable to the class I require: + (id) alloc { if (theClassIWant) { id object = [theClassIWant allocWithZone:NSDefaultMallocZone()]; theClassIWant = nil; return object; } return [BaseClass allocWithZone:NSDefaultMallocZone()]; } this works well, and i assume is 'reasonably' safe, though if I alloc a subclass myself (without setting 'theClassIWant') - an object of the base class is created. I also dont really like the idea of overriding alloc... Method 2: use object_setClass(self,theClassIWant) in initWithCoder (before calling initWithCoder on the super class): - (id) initWithCoder:(NSCoder *)aDecoder { if (theClassIWant) { // the framework doesn't like this: //[self release]; //self = [theClassIWant alloc]; // whoa now! object_setClass(self,theClassIWant); theClassIWant = nil; return [self initWithCoder:aDecoder]; } if (self = [super initWithCoder:aDecoder]) { ... this also works well, but not all the subclasses are necessarily going to be the same size as the super class, so this could be very unsafe! To combat this i tried releasing and re-allocing to the correct type within initWithCoder, but i got the following error from the framework: "This coder requires that replaced objects be returned from initWithCoder:" dont quite get what this means! i am replacing an object in initWithCoder... Any comments on the validity of these methods, or suggestions of improvements or alternatives welcome!

    Read the article

  • Declaring a string array in class header file - compiler thinks string is variable name?

    - by Dave
    Hey everybody, I need a bit of a hand with declaring a string array in my class header file in C++. atm it looks like this: //Maze.h #include <string> class Maze { GLfloat mazeSize, mazeX, mazeY, mazeZ; string* mazeLayout; public: Maze ( ); void render(); }; and the constructor looks like this: //Maze.cpp #include <GL/gl.h> #include "Maze.h" #include <iostream> #include <fstream> Maze::Maze( ) { cin >> mazeSize; mazeLayout = new string[mazeSize]; mazeX = 2/mazeSize; mazeY = 0.25; mazeZ = 2/mazeSize; } I'm getting a compiler error that says: In file included from model-view.cpp:11: Maze.h:14: error: ISO C++ forbids declaration of ‘string’ with no type Maze.h:14: error: expected ‘;’ before ‘*’ token and the only sense that makes to me is that for some reason it thinks I want string as a variable name not as a type declaration. If anybody could help me out that would be fantastic, been looking this up for a while and its giving me the shits lol. Cheers guys

    Read the article

  • Execute codes in a different page but remain on the same actual php page

    - by chupinette
    I have a complicated problem here..I have codes to send mail using PEAR which i have tested in a php page called testmail.php. Now i have my actual application an a page called Cart.php where i have a button called Place Order. When i click on this button, it actually redirects to a url called : http://localhost/final/index.php?OrderSuccessful which actually displays a message on the page and sends an email. The problem is that when i put the code for email in Cart.php, i get errors. But when i put the url http://localhost/final/testmail.php it actually works. So i was thinking, is there a way to execute the codes from that testmail.php by remaining on the page Cart.php? include('Mail.php'); $mail = Mail::factory("mail"); $headers = array("From"=>"[email protected]", "Subject"=>"Your order has been placed "); $body = "lol"; $mail->send("[email protected]", $headers, $body); I get the error Assigning the return value of new by reference is deprecated

    Read the article

< Previous Page | 26 27 28 29 30 31 32 33 34 35 36  | Next Page >