Search Results

Search found 12267 results on 491 pages for 'cool stuff'.

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

  • Full Circle

    - by capgpilk
    Things have been a little bit hectic these past 6 months hence the lack of posts. My excuse is a good one though, my wife gave birth to our first son Tom back in September and it has been one hell of a rollercoaster ride since then. Things have settled back down now thank hevens.My last development gig didn't quite work out so now I have took the plunge and started contracting. It turns out my first contract is with the NHS trust that I started my development career with, which seems a bit wierd as that was 10 years ago. A lot has changed in the techniques and tools the NHS now use to develop with, there is a lot more .net with a slant towards the web side of the spectrum (at least in this NHS trust). They are really getting to grips with the MVC platform, so you will hopefully see some MVC posts coming up. The really suprising thing is that the Intranet I developed back in 2001 (classic asp migrated to .net 1.0) is still up and running and will finally be fazed out these coming weeks (to Sharepoint). It is like seeing an old friend all grown up. 

    Read the article

  • Your interesting code tricks/ conventions? [closed]

    - by Paul
    What interesting conventions, rules, tricks do you use in your code? Preferably some that are not so popular so that the rest of us would find them as novelties. :) Here's some of mine... Input and output parameters This applies to C++ and other languages that have both references and pointers. This is the convention: input parameters are always passed by value or const reference; output parameters are always passed by pointer. This way I'm able to see at a glance, directly from the function call, what parameters might get modified by the function: Inspiration: Old C code int a = 6, b = 7, sum = 0; calculateSum(a, b, &sum); Ordering of headers My typical source file begins like this (see code below). The reason I put the matching header first is because, in case that header is not self-sufficient (I forgot to include some necessary library, or forgot to forward declare some type or function), a compiler error will occur. // Matching header #include "example.h" // Standard libraries #include <string> ... Setter functions Sometimes I find that I need to set multiple properties of an object all at once (like when I just constructed it and I need to initialize it). To reduce the amount of typing and, in some cases, improve readability, I decided to make my setters chainable: Inspiration: Builder pattern class Employee { public: Employee& name(const std::string& name); Employee& salary(double salary); private: std::string name_; double salary_; }; Employee bob; bob.name("William Smith").salary(500.00); Maybe in this particular case it could have been just as well done in the constructor. But for Real WorldTM applications, classes would have lots more fields that should be set to appropriate values and it becomes unmaintainable to do it in the constructor. So what about you? What personal tips and tricks would you like to share?

    Read the article

  • What Happens When You Load a Web Page? [Video]

    - by Jason Fitzpatrick
    When you type in a URL and the web page loads, everything seems so simple. Peel back the layers, however, and you see a complex delivery system built around data packets. Watch this informative video to see how your web requests actually work. Courtesy of The World Science Festival, we find this well put together video demonstrating how a trans-Atlantic web page request works. [via Boing Boing] HTG Explains: What Is RSS and How Can I Benefit From Using It? HTG Explains: Why You Only Have to Wipe a Disk Once to Erase It HTG Explains: Learn How Websites Are Tracking You Online

    Read the article

  • Who are the thought leaders in software engineering/development? [closed]

    - by Mohsin Hijazee
    Possible Duplicate: What are the big contemporary names in the programming field? I am sorry if it is a duplicate questions or is useless. I want to compile a list of influential people in our industry who can be termed as "opinionated" and thought leaders. There are basically two characteristics that I'm referring to here: The person has introduced new concepts/terminology/trends or talked about existing ones in thought provoking way. Majority or part of the writings are available online. Some of the people who I think as thought leaders are as under: Martin Fowler Known for domain specific languages, Active Record, IoC. Joel Spolsky known for his 12 point Joel test, Law of Leaky abstractions. Kent Beck known for XP. Paul Graham. Any other names and links?

    Read the article

  • ssis 2012 timeouts

    - by Alex Bransky
    Originally posted on: http://geekswithblogs.net/influent1/archive/2014/05/30/156699.aspxI started getting timeouts from SSIS 2012 using the SSISDB and I couldn't make any sense of them, they seemed random.  When things were bad I couldn't even expand the Integration Services Catalogs node in SSMS.  Just by sheer luck I figured out the problem: too much data was being logged in SSISDB and the data file was up to 180 GB, with the log file at 500 GB.  I switched it to simple mode and shrank the log file, then changed the retention period to 90 days instead of 365.  Now I need to see what else I can do to keep it running smoothly...Note this:  http://www.ssistalk.com/2012/07/16/ssis-2012-beware-the-ssis-server-maintenance-job/

    Read the article

  • Honor titles for outstanding professionals from different companies? [closed]

    - by Alexander Galkin
    If this is an off-topic here, please move or advise a more appropriate forum. Microsoft MVP (most valuable professional) title is well known as an honor title for professionals not working for MS directly but who did a lot to popularize MS technologies. This title does not require any certification or any other proof of knowledge by the nominee and is awarded solely upon the one's contribution to community. As a member of Intel Developer Network I am also aware of Intel Black Belt award, that is in many aspects similar to Microsoft MVP. But this is all I know. Are there any other honor awards from top players in software industry?

    Read the article

  • .NET assembly cache / ngen / jit image warm-up and cool-down behavior

    - by Mike Jiang
    Hi, I have an Input Method (IME) program built with C#.NET 2.0 DLL through C++/CLI. Since an IME is always attaching to another application, the C#.NET DLL seems not able to avoid image address rebasing. Although I have applied ngen to create a native image of that C#.NET 2.0 DLL and installed it into Global Assembly Cache, it didn't improved much, approximately 12 sec. down to 9 sec. on a slow PIII level PC. Therefore I uses a small application, which loads all the components referenced by the C#.NET DLL at the boot up time, to "warm up" the native image of that DLL. It works fine to speed up the loading time to 0.5 sec. However, it only worked for a while. About 30 min. later, it seems to "cool down" again. Is there any way to control the behavior of GAC or native image to be always "hot"? Is this exactly a image address rebasing problem? Thank you for your precious time. Sincerely, Mike

    Read the article

  • Perl classes like stuff

    - by user350571
    Hello, lovers of the camel. I'm new to perl and it's blessing stuff to imitate class like functionality made me feel strange I even had to go to the bathroom. Now, please tell me: what do you don't like, find wrong or strange with this code: sub Person { my $age = shift || 15; return { printAge => sub { print "Age -> $age\n"; }, changeAge => sub { $age = shift } } } my $p = Person(); my $p2 = Person(27); $p->{printAge}->(); $p->{changeAge}->(30); $p->{printAge}->(); $p2->{printAge}->(); I'm going to walk my dog, hope to get responses when I'm back. Thanks in advance. Cheers. Be back soon. Thanks again.

    Read the article

  • How to animate stuff when using -drawRect: ?

    - by mystify
    I didn't use subviews but painted my things with -drawRect: inside an UIView subclass. Now I want to do some animations in there. I guess that I can't count on core animation now since I have no subviews. So how would I animate then? Would I set up a timer which fires like 30 times per second? How would I know the animation step? Would I make an ivar which counts the frame of the animation so that I can do my stuff in -drawRect as it gets called?

    Read the article

  • how do I send stuff to method using the JQuery Ajax method

    - by nisardotnet
    $.ajax({ type: "POST", url: "WebService.asmx/AddVisitor", data: "{'fname':'dave', 'lname':'ward'}", contentType: "application/json; charset=utf-8", dataType: "json" }); I have an Asp.Net WebMethod that takes a firstName, lastName.....as a parameter, how do I send that stuff to that method using the JQuery Ajax method. if i hardcode the above it works without any problem but if i pass dynamic it fails var firstName = $("[id$='txtFirstName']"); var lastName = $("[id$='txtLastName']"); //data: "{'firstName':'Chris','lastName':'Brandsma'}"<br> data: "{'firstname':'" + escape(firstName.val()) + "','lastName':'" + escape(lastName.val()) + "'}", my WebMethod looks like this [WebMethod] public bool AddVisitor(string firstName, string lastName) { return true; } what wrong here? i have tried with eval and escape none of that works. Thanks for any help.

    Read the article

  • Important(useful) websites for the "Android" related stuff

    - by PM - Paresh Mayani
    Hello all Androiders, As such There is no particular repository for Android, i would like to initiate this. Now, let me clear about my idea: My idea is that Wherever you find any website and if you find it helps for the Android, then pls try to post here. This post works as a common Android-Database storing all the website-links which are either of Articles, code, examples, pdf, or any. So that whenever anybody having doubt regarding Android Stuff, then they can easily browse through links and may easily find the solution. and At the time of submitting the link, you feel it helps to others, but in future, may you return back to the post for searching the link for finding solution of your problem. So please share links.

    Read the article

  • Position DIV relative to containing DIV Without Moving Other Stuff

    - by yar
    [I'm not sure if this question has been asked, though I've looked around a bit.] I have a DIV inside a DIV. I would like the inner DIV to have a certain position inside the outer div. I'm having some success with this position: absolute; top: 0px;right:0px; but all other divs are getting moved around. I just want it to float on top of the other stuff (float didn't work, of course). Thanks! Edit: The outer div is relative, and I'd like the inner to move with it when the browser is resized. Edit: Sorry, I've figured out the question (but not the answer): if I use right:0px, the inner div stops moving relative to the outer div and starts moving relative to the browser window. Why would that be?

    Read the article

  • Rails log shows unexpected data as to the time spent on a DB stuff

    - by Arhimed
    I'm running on WinXP + Ruby 1.8.6 + Rails 2.3.5 (frozen to the project) in development environment. Looking at development.log I observe inconsistent data as to the time spent on a database stuff. Example #1 (good): Processing PagesController#index (for 127.0.0.1 at 2010-05-11 12:15:54) [GET] Parameters: {"action"=>"index", "controller"=>"pages"} City Columns (563.0ms) SHOW FIELDS FROM `cities` City Load (15.0ms) SELECT * FROM `cities` WHERE (`cities`.`short_name` = 'NY') LIMIT 1 Redirected to http://xyz:3000/sightings Completed in 953ms (DB: 578) | 302 Found [http://xyz/] Example #2 (unexpected): Processing PagesController#index (for 127.0.0.1 at 2010-05-11 12:15:36) [GET] Parameters: {"action"=>"index", "controller"=>"pages"} City Columns (0.0ms) SHOW FIELDS FROM `cities` City Load (0.0ms) SELECT * FROM `cities` WHERE (`cities`.`short_name` = 'NY') LIMIT 1 Redirected to http://xyz:3000/sightings Completed in 47ms (DB: 32) | 302 Found [http://xyz/] Example #2 shows 32ms were spent on DB while there were just 2 sql querries and both of zero time spent. Example #3 (unexpected): Processing PagesController#index (for 127.0.0.1 at 2010-05-11 11:21:24) [GET] Parameters: {"action"=>"index", "controller"=>"pages"} City Columns (63.0ms) SHOW FIELDS FROM `cities` City Load (62.0ms) SELECT * FROM `cities` WHERE (`cities`.`short_name` = 'NY') LIMIT 1 Redirected to http://xyz:3000/sightings Completed in 1187ms (DB: 297) | 302 Found [http://xyz/] Example #3 shows 297ms while there were querries of 63ms and 62ms (125ms in total). Can't understand it. Could someone explain? Thanks in advance.

    Read the article

  • 2D collision detection and stuff with OpenGL

    - by shinjuo
    I am working on a simple 2D openGL project. It contains a main actor you can control with the keyboard arrows. I got that to work okay. What I am wanting is something that can help explain how to make another actor object follow the main actor. Maybe a tutorial on openGL. The three main things I need to learn are the actor following, collision detection, and some kind of way to create gravity. Any good books or tutorials to help get me in the right direction would be great.

    Read the article

  • Java stuff you didn't know you didn't know

    - by pretzelstick
    What are some Java language features or Java related tools that you were embarrassed to find that you didn't know about? Examples for me are: jmap RuntimeException Please post things every Java programmer should know about, be they language features, tools, or facts about how the JVM works, but that you found out about long after you should have.

    Read the article

  • cool project to use a genetic algorithm for?

    - by Ryan
    I'm looking for a practical application to use a genetic algorithm for. Some things that have thought of are: Website interface optimization Vehicle optimization with a physics simulator Genetic programming Automatic test case generation But none have really popped out at me. So if you had some free time (a few months) to spend on a genetic algorithms project, what would you choose to tackle?

    Read the article

  • P3P - compact policy and legal stuff

    - by Matty F
    Is it legally OK to have only a P3P compact policy (allowing cookies in IE6+)? The P3P XML will also be present with company details and a link to the privacy policy, but nothing more. What are the legal implications of P3P and an incorrect implementation, especially in the UK?

    Read the article

  • JavaScript: Doing some stuff right before the user exits the page

    - by Mike
    I have seen some questions here regarding what I want to achieve and have based what I have so far on those answer. But there is a slight misbehavior that is still irritating me. What I have is sort of a recovery feature. Whenever you are typing text, the client sends a sync request to the server every 45 seconds. It does 2 things. First, it extends the lease the client has on the record (only one person may edit at one time) for another 60 seconds. Second, it sends the text typed so far to the server in case the server crashes, internet connection fails, etc. In that case, the next time the user enters our application, the user is notified that something has gone wrong and that some text was recovered. Think of Microsoft or OpenOffice recovery whenever they crash! Of course, if the user leaves the page willingly, the user does not need to be notified and as a result, the recovery is deleted. I do that final request via a beforeunload event. Everything went fine until I was asked to make a final adjustment... The same behavior you have here at stack overflow when you exit the editor... a confirm dialogue. This works so far, BUT, the confirm dialogue is shown twice. Here is the code. The event if (local.sync.autosave_textelement) { window.onbeforeunload = exitConfirm; } The function function exitConfirm() { var local = Core; if (confirm('blub?')) { local.sync.autosave_destroy = true; sync(false); return true; } else { return false; } }; Some problem irrelevant clarifications: Core is a global Object that contains a lot of variables that are used everywhere. sync makes an ajax request. The values are based on the values that the Core.sync object contains. The parameter determines if the call should be async (default) or sync.

    Read the article

  • Drop Down Box and other stuff in ASP.NET with VB.NET (VS 2008)

    - by typoknig
    Hi all, I am trying to polish up a program a program that I have converted from a Windows Form in to an ASP.NET Web Application. I have several questions: 1.) I have a drop down box where users can select their variables, but users can also enter their variables manually into various text fields. What I want is for the drop down box to show a string like "Choose Variables" when ever the user enters their variables manually. I want this to happen without having to reload the page. 2.) In the Windows Form version of this application I had a RichTextBox that populated with data (line by line) after a calculation was made. I used "AppendText" in my Windows Form, but that is not available in ASP.NET, and neither is the RichTextBox. I am open to suggestions here, I tried to use just a text box but that isn't working right. 3.) In my Windows Form application I was using "KeyPress" events to prevent incorrect characters from being entered into the text fields. My code for these events looked similar to this: Private Sub TextBox_KeyPress(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox.KeyPress If (e.KeyChar < "0" OrElse e.KeyChar > "9") AndAlso e.KeyChar <> ControlChars.Back AndAlso e.KeyChar <> "." Then e.Handled = True End If End Sub How can I make this work again... also without reloading the page. 4.) This is not a major issue, but I would like all of the text to be selected when the cursor enters a field. In my Windows Form application I used "SelectAll", but again, that is not available in ASP.NET Thanks in advanced.

    Read the article

  • Compiling a bunch of stuff in the folder (java, on a mac)

    - by David
    two questions: how do i compile a .java file that isn't on my username (like something in documents or some other sub folder) if i have multiple .java files and i compile one that contains method that are contained in the others does the compiler compile those other files. heres an example of the second question. example1.java: class example1 { main () { example2.method () } } example2.java: class example2 { method () } When i compile example1.java will example2.java also be compiled?

    Read the article

  • Help understanding some OpenGL stuff

    - by shinjuo
    I am working with some code to create a triangle that moves with arrow keys. I want to create a second object that moves independently. This is where I am having trouble, I have created the second actor, but cannot get it to move. There is too much code to post it all so I will just post a little and see if anyone can help at all. ogl_test.cpp #include "platform.h" #include "srt/scheduler.h" #include "model.h" #include "controller.h" #include "model_module.h" #include "graphics_module.h" class blob : public actor { public: blob(float x, float y) : actor(math::vector2f(x, y)) { } void render() { transform(); glBegin(GL_TRIANGLES); glVertex3f(0.25f, 0.0f, -5.0f); glVertex3f(-.5f, 0.25f, -5.0f); glVertex3f(-.5f, -0.25f, -5.0f); glEnd(); end_transform(); } void update(controller& c, float dt) { if (c.left_key) { rho += pi / 9.0f * dt; c.left_key = false; } if (c.right_key) { rho -= pi / 9.0f * dt; c.right_key = false; } if (c.up_key) { v += .1f * dt; c.up_key = false; } if (c.down_key) { v -= .1f * dt; if (v < 0.0) { v = 0.0; } c.down_key = false; } actor::update(c, dt); } }; class enemyOne : public actor { public: enemyOne(float x, float y) : actor(math::vector2f(x, y)) { } void render() { transform(); glBegin(GL_TRIANGLES); glVertex3f(0.25f, 0.0f, -5.0f); glVertex3f(-.5f, 0.25f, -5.0f); glVertex3f(-.5f, -0.25f, -5.0f); glEnd(); end_transform(); } void update(controller& c, float dt) { if (c.left_key) { rho += pi / 9.0f * dt; c.left_key = false; } if (c.right_key) { rho -= pi / 9.0f * dt; c.right_key = false; } if (c.up_key) { v += .1f * dt; c.up_key = false; } if (c.down_key) { v -= .1f * dt; if (v < 0.0) { v = 0.0; } c.down_key = false; } actor::update(c, dt); } }; int APIENTRY WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, char* lpCmdLine, int nCmdShow ) { model m; controller control(m); srt::scheduler scheduler(33); srt::frame* model_frame = new srt::frame(scheduler.timer(), 0, 1, 2); srt::frame* render_frame = new srt::frame(scheduler.timer(), 1, 1, 2); model_frame->add(new model_module(m, control)); render_frame->add(new graphics_module(m)); scheduler.add(model_frame); scheduler.add(render_frame); blob* prime = new blob(0.0f, 0.0f); m.add(prime); m.set_prime(prime); enemyOne* primeTwo = new enemyOne(2.0f, 0.0f); m.add(primeTwo); m.set_prime(primeTwo); scheduler.start(); control.start(); return 0; } model.h #include <vector> #include "vec.h" const double pi = 3.14159265358979323; class controller; using math::vector2f; class actor { public: vector2f P; float theta; float v; float rho; actor(const vector2f& init_location) : P(init_location), rho(0.0), v(0.0), theta(0.0) { } virtual void render() = 0; virtual void update(controller&, float dt) { float v1 = v; float theta1 = theta + rho * dt; vector2f P1 = P + v1 * vector2f(cos(theta1), sin(theta1)); if (P1.x < -4.5f || P1.x > 4.5f) { P1.x = -P1.x; } if (P1.y < -4.5f || P1.y > 4.5f) { P1.y = -P1.y; } v = v1; theta = theta1; P = P1; } protected: void transform() { glPushMatrix(); glTranslatef(P.x, P.y, 0.0f); glRotatef(theta * 180.0f / pi, 0.0f, 0.0f, 1.0f); //Rotate about the z-axis } void end_transform() { glPopMatrix(); } }; class model { private: typedef std::vector<actor*> actor_vector; actor_vector actors; public: actor* _prime; model() { } void add(actor* a) { actors.push_back(a); } void set_prime(actor* a) { _prime = a; } void update(controller& control, float dt) { for (actor_vector::iterator i = actors.begin(); i != actors.end(); ++i) { (*i)->update(control, dt); } } void render() { for (actor_vector::iterator i = actors.begin(); i != actors.end(); ++i) { (*i)->render(); } } };

    Read the article

  • Optimize grep, awk and sed shell stuff

    - by kockiren
    I try to sum the traffic of diffrent ports in the logfiles from "IPCop" so i write and command for my shell, but i think its possible to optimize the command. First a Line from my Logfile: 01/00:03:16 kernel INPUT IN=eth1 OUT= MAC=xxx SRC=xxx DST=xxx LEN=40 TOS=0x00 PREC=0x00 TTL=98 ID=256 PROTO=TCP SPT=47438 DPT=1433 WINDOW=16384 RES=0x00 SYN URGP=0 Now i grep with following Command the sum of all lengths who contains port 1433 grep 1433 log.dat|awk '{for(i=1;i<=10;i++)if($i ~ /LEN/)print $i};'|sed 's/LEN=//g;'|awk '{sum+=$1}END{print sum}' The for loop i need because the LEN-col is not on same position at all time. Any suggestion for optimizing this command? Regards Rene

    Read the article

  • Using Qtcreator (with Qwt), really basic stuff

    - by Dago
    I'm trying to make a Qt program using Qtcreator and Qwt for plotting. I've never used Qtcreator before. I've created a mainwindow and added a Qwtplot widget there (object name: qwtPlot). The widget shows up in the program when I compile and run it. But theres no mention of the qwtPlot object anywhere in the (autogenerated) code so I assume it is being added at compile time from the .ui xml file (or something). My question is that... how do I modify/change the qwtPlot object? Or where should I place the code. I'm having a hard time articulating my question but the question basically is "How do I do anything with the qwtPlot widget which is created (graphically) with Qtcreator?". I've checked some tutorials but in the tutorials they add the widgets manually in the code, but I'd like to use Qtcreator (because my UI will be fairly complicated). This whole Qtcreator is pretty confusing...

    Read the article

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