Search Results

Search found 1375 results on 55 pages for 'martin hansen'.

Page 44/55 | < Previous Page | 40 41 42 43 44 45 46 47 48 49 50 51  | Next Page >

  • Where to put the star in C and C++ pointer notation

    - by Martin Kristiansen
    For some time the following has been annoing me, where should I put the star in my pointer notation. int *var; // 1 and int* var; // 2 obviously do the same thing, and both notations are correct, but I find that most literature and code I look at use the 1th notation. wouldn't it be more 'correct' to use the 2th notation, separating the type and the variable name by a whitespace, rather than mixing the type and variable tokens?

    Read the article

  • how to send text to a process in a shell script?

    - by Martin
    So I have a Linux program that runs in a while(true) loop, which waits for user input, process it and print result to stdout. I want to write a shell script that open this program, feed it lines from a txt file, one line at a time and save the program output for each line to a file. So I want to know if there is any command for: - open a program - send text to a process - receive output from that program Many thanks.

    Read the article

  • How to verify object creation in Django ?

    - by Martin
    So.. this never crossed my head before but now I just can't figure out how to do that !! I want to verify that the object I created was really created, and return True or False according to that : obj = object(name='plop') try: obj.save() return True except ???: return False Any idea ? Cheers, -M

    Read the article

  • Increment an index that uses numbers and characters

    - by Martin
    I have a string based code that can be either two or three characters in length and I am looking for some help in creating a function that will increment it. Each 'digit' of the code has a value of 0 to 9 and A to Z. some examples: the first code in the sequence is 000 009 - next code is - 00A 00D - next code is - 00E AAZ - next code is - AB0 the last code is ZZZ. Hope this makes some sense.

    Read the article

  • Rails forms: render different actions based on validation

    - by Martin Petrov
    Is it possible to render different actions based on what fails at validation? For example - I have one field in the form - email addres. It is validated like this: validates :email, :presence => true, :uniqueness => { :case_sensitive => false } In the controller: def create @user = User.new(params[:user]) if @user.save redirect_to somewhere else # render :new if email is blank # redirect_to somwhere if email is taken end end

    Read the article

  • Ruby on Rails in SpringSource tool suite?

    - by Martin Klosi
    I have been using Grails for some time now, but in school they are making us use Ruby on Rails. I have been trying to find an extension for ruby on rails for STS as there is for Grails, but I have failed. The only thing that comes close is a plugin so i can use ruby code in my Grails app using JRuby. I just want to make sure that a fully integrated extension DOESN'T exist. If that is the case, what would be the graphical IDE way of developing in ruby on rails, the same way one would use STS for Groovy on Grails development? (preferably free :) )

    Read the article

  • How can I get all the versions of a given file?

    - by Martin
    I would like to obtain all the versions of a given file in my SVN repository. For instance, let's say that the file ThirdPartyAssembly.dll was checked 3 times, is there a command that will get me all the version on my HD (e.g. ThirdPartyAssembly.dll.v1, ThirdPartyAssembly.dll.v2, ThirdPartyAssembly.dll.v3, etc.)? Thanks!

    Read the article

  • Writing module to get video/audio from HDMI

    - by Martin
    I would like to write a small module that can check if anything is connected to my computer's HDMI input, and if so write a frame of video to bitmap once in a while. Can anyone point me to resources regarding grabbing audio/video from HDMI on windows?

    Read the article

  • Help with java threads or executors: Executing several MySQL selects, inserts and updates simmultane

    - by Martin
    Hi. I'm writing an application to analyse a MySQL database, and I need to execute several DMLs simmultaneously; for example: // In ResultSet rsA: Select * from A; rsA.beforeFirst(); while (rsA.next()) { id = rsA.getInt("id"); // Retrieve data from table B: Select * from B where B.Id=" + id; // Crunch some numbers using the data from B // Close resultset B } I'm declaring an array of data objects, each with its own Connection to the database, which in turn calls several methods for the data analysis. The problem is all threads use the same connection, thus all tasks throw exceptios: "Lock wait timeout exceeded; try restarting transaction" I believe there is a way to write the code in such a way that any given object has its own connection and executes the required tasks independent from any other object. For example: DataObject dataObject[0] = new DataObject(id[0]); DataObject dataObject[1] = new DataObject(id[1]); DataObject dataObject[2] = new DataObject(id[2]); ... DataObject dataObject[N] = new DataObject(id[N]); // The 'DataObject' class has its own connection to the database, // so each instance of the object should use its own connection. // It also has a "run" method, which contains all the tasks required. Executor ex = Executors.newFixedThreadPool(10); for(i=0;i<=N;i++) { ex.execute(dataObject[i]); } // Here where the problem is: Each instance creates a new connection, // but every DML from any of the objects is cluttered in just one connection // (in MySQL command line, "SHOW PROCESSLIST;" throws every connection, and all but // one are idle). Can you point me in the right direction? Thanks

    Read the article

  • Dynamic search result when typing

    - by Martin
    I'm using asp.net and want to filter a search result everytime the user enter letters in a textbox. For exmaple this website do exactly what I want: http://www.prisjakt.nu/ (try searching in the right top corner). I have tried just putting my textbox and the gridview with the search result in an updatepanel, it's working but it's really slow, can I make it faster and how? Is there any articles or something about this?

    Read the article

  • Best method to cache objects in PHP?

    - by Martin Bean
    Hi, I'm currently developing a large site that handles user registrations. A social networking website for argument's sake. However, I've noticed a lag in page loads and deciphered that it is the creation of objects on pages that's slowing things down. For example, I have a Member object, that when instantiated with an ID passed as a construct parameter, it queries the database for that members' row in the members database table. Not bad, but this is created each time a page is loaded; and called more than once when say, calling an array of that particular members' friends, as a new Member object is created for each friend. So on a single page I can have upwards of seven of the same object, but containing different properties. What I'm wanting to do is to find a way to reduce the database load, and to allow persist objects between page loads. For example, the logged in user's object to be created on login (which I can do) but then stored somewhere for retrieval so I don't have to keep re-creating the object between page loads. What is the best solution for this? I've had a look at Memcache, but with it being a third-party module I can't have the web host install it on this occasion. What are my alternatives, and/or best practices in my case? Thanks in advance.

    Read the article

  • Notify the user on Facebook at some time

    - by martin.malek
    Let's say I have a Facebook application which is monitoring friends birthdays. I want to notify the user that her friend will have a birthday in next two days. The first part is only cron which will check the dates, but is there any way how to notify the user? I didn't found anything for this. It was there a year ago but all of the API changes it looks like the removed all offline messages. I don't want to send an email to the user, it will be much more better to stay with everything on Facebook.

    Read the article

  • regex. How can I match the value between '+' and ':' ?

    - by martin
    I have this string: sometext +[value]:- I would like to match the value(1-3 numerical characters) (with regex, javascript) sometext may contain a +sign if i'm unlucky so I don't wanna end up with matching some +text +value:- I sat up last night banging my head against this, so I would be really glad if someone could help me.

    Read the article

  • Swap function for a char*

    - by Martin
    I have the simple function below which swap two characters of an array of characters (s). However, I am getting a "Unhandled exception at 0x01151cd7 in Bla.exe: 0xC0000005: Access violation writing location 0x011557a4." error. The two indexes (left and right) are within the limit of the array. What am I doing wrong? void swap(char* s, int left, int right) { char tmp = s[left]; s[left] = s[right]; s[right] = tmp; } swap("ABC", 0, 1); I am using VS2010 with unmanaged C/C++. Thanks!

    Read the article

  • detect when a webpage is updated

    - by Martin Trigaux
    Hello, There is a website (very simple) which will be updated soon and I'd like to receive an alert at the moment it changes (like a sound, a popup,...) I guess I should send request every x minutes and compare the result with what's now but I don't know how to do that. I don't really care about the language used, I know java, python, php, a bit of c and bash (I'm on linux)... Thank you

    Read the article

  • Help me with query string parameters (Rails)

    - by Martin Petrov
    Hi, I'm creating a newsletter. Each email contains a link for editing your subscription: <%= edit_user_url(@user, :secret => @user.created_at.to_i) %> :secret = @user.created_at.to_i prevents users from editing each others profiles. def edit @user = user.find(params[:id]) if params[:secret] == @user.created_at.to_i render 'edit' else redirect_to root_path end end It doesn't work - you're always redirected to root_path. It works if I modify it like this: def edit @user = user.find(params[:id]) if params[:secret] == "1293894219" ... 1293894219 is the "created_at.to_i" for a particular user. Do you have any ideas why?

    Read the article

  • WhatsApp - writing a clone (iphone, android, wp7)

    - by Martin
    I am trying to create a instant messaging app very much like whatsapp I suppose. My resources I have available to me are Server development in C# (REST Service, dedicated server app etc) And currently an android development platform using eclipse (iphone, wp7 to follow later). I have done some development in Android before but I don't have any idea where to start an application like this. My guess would be it would work with UDP / TCP or similar ? I currently have a shared server for an asp.net website but I presume this wouldn't be ideal, I could essential setup a web service on the server and get a client to publish his messages there but then this would mean that the receivers would have to POLL (PULL) every 5 minutes or so - so I guess this wouldn't be real time Do I need to use UDP here ? And I presume platforms like Iphone, Android and WP7 will not have any issues sending msgs by UDP - if that is how its done. I look forward to any help or guidance.

    Read the article

  • Download a file+

    - by Martin
    Hi, First PHP project and I'm stuck! I wish to allow users to click a button or a link and download a file. However, my PHP must first perform some tasks, choose the right file, record the download event in a db etc. This I can do, but how do I then send the file as a response to the user's click? Thanks for any help.

    Read the article

  • is there a 'git find'?

    - by Martin DeMello
    Is there a git find analogue of git grep, i.e., something that will find a filename by pattern in the tree? I've gone through a lot of git documentation and not found this, but I'm having a hard time believing it doesn't exist somewhere.

    Read the article

  • jquery small issue I need help with

    - by Martin
    Hi I need help with a bit of jquery, I am renaming dropdown lists when a checkbox next to them is clicked. I want to get the selected option value of the dropdown called 'Prev' in the code below and assign to the checkbox that is clicked. I hope it makes sense. Thanks $('.mutuallyexclusive').live("click", function() { checkedState = $(this).attr('checked'); $('.mutuallyexclusive:checked').each(function() { $(this).attr('checked', false); $(this).attr('name', 'chk'); }); $(this).attr('checked', checkedState); if (checkedState) { jQuery('#myForm select[name=cat.parent_id]').attr('name', 'bar') // here is the bit i need help with var prev = $(this).prev('select').attr("name", 'cat.parent_id'); } else { var prev = $(this).prev('select').attr("name", 'dd'); } }); });

    Read the article

  • Silverlight Cream for March 06, 2011 -- #1054

    - by Dave Campbell
    In this Back from the Summit Issue, I am overloaded with posts to choose from. Submittals go first, but I'll eventually catch up... hopefully by MIX :) : Ollie Riches(-2-), Colin Eberhardt, John Papa, Jeremy Likness, Martin Krüger, Joost van Schaik, Karl Shifflett, Michael Crump, Georgi Stoyanov, Yochay Kiriaty, Page Brooks, and Deborah Kurata. Above the Fold: Silverlight: "ClassifiedCabinet: A Quick Start" Georgi Stoyanov WP7: "Easy access to WMAppManifest.xml App properties like version and title" Joost van Schaik Multiple: "Flashcards.Show Version 2 for the Desktop, Browser, and Windows Phone" Yochay Kiriaty Shoutouts: Mohamed Mosallem delivered an online session at the Second Riyadh Online Community Summit: Silverlight 4.0 with SharePoint 2010 John-Daniel Trask posted about a release of a new set of tools released for WP7 development... there's a free trial, so definitely worth a look: Mindscape Phone Elements released! From SilverlightCream.com: WP7Contrib: Trickling data to a bound collection Ollie Riches submitted a couple links... first up is this on a way they found to decrease the load on a data template in WP7 to get under the 90 mb limit and then added their solution to the WP7Contrib lib. WP7Contrib: Why we use SilverlightSerializer instead of DataContractSerializer Ollie Riches' next submittal compares the performance of the SilverlightSerializer & DataContractSerializer on the WP7 platform. MVVM Charting – Binding Multiple Series to a Visiblox Chart Colin Eberhardt sent me this post where he describes binding multiple series to a chart with no code-behind... great long multi-phase tutorial all with source. Silverlight TV 64: Dive into 64bit Support, App Model and Security John Papa has Nick Kramer of the Silverlight team up for his latest Silverlight TV episode, discussing some cool new Silverlight stuff: 64-bit support, multiple windows, etc. Building a Windows Phone 7 Application with UltraLight.mvvm Jeremy Likness has a pre-summit tutorial up on his UltraLight.mvvm project, and how he would use it to build a WP7 app... great to meet you, Jeremy! How to: Storyboard only start with the conspicuousness of the application in the browser window Martin Krüger continues his Storyboard startup solutions with this one about what to do if the Silverlight app is small or simply an island on an html page. Easy access to WMAppManifest.xml App properties like version and title Joost van Schaik posted about the WP7 manifest file and how you can get access to that information at runtime... why you ask? How about version number or title? Be sure to read the helpful hints in the last paragraph too! Mole 2010 Released Karl Shifflett, Josh Smith, and others have released the latest version of Mole... well worth the money in my opinion, if only it worked for Silverlight! (not their fault) Changing the Default Windows Phone 7 Deployment Target In Visual Studio 2010 Michael Crump points out an annoyance with the 2011 WP7 tools update... VS2010 defaults to the device rather than the emulator... and he shows us how to get it pointed back to the emulator! ClassifiedCabinet: A Quick Start Georgi Stoyanov posted a QuickStart to a 'ClassifiedCabinet' control posted on CodePlex... check out the demo first, you'll want to read the article after that. He builds a simple project from scratch using the control. Flashcards.Show Version 2 for the Desktop, Browser, and Windows Phone Yochay Kiriaty has a post up about FlashCards.Show version 2 that he worked on with Arik Poznanski and has it now running on the desktop, browser, and WP7, plus you get the source... I've been wanting to write just such an app for WP7, so hey... this saves me some time! A Simple Focus Manager for Jounce Applications Page Brooks has a post up about Jeremy Likness' Jounce... how to set focus to a particular control when a view loads. Silverlight Charting: Formatting the Axis Deborah Kurata is continuing her charting series with this one on setting axis font color and putting the text at an angle... really dresses up the chart! Stay in the 'Light! Twitter SilverlightNews | Twitter WynApse | WynApse.com | Tagged Posts | SilverlightCream Join me @ SilverlightCream | Phoenix Silverlight User Group Technorati Tags: Silverlight    Silverlight 3    Silverlight 4    Windows Phone MIX10

    Read the article

  • Silverlight Cream for March 09, 2011 -- #1057

    - by Dave Campbell
    In this Issue: Dennis Doomen, Peter Kuhn, Michael Crump, Joe McBride, Martin Krüger, Jeremy Likness, Manas Patnaik, Jesse Liberty(-2-), WindowsPhoneGeek(-2-). Above the Fold: Silverlight: "A highlighting AutoCompleteBox in Silverlight" Peter Kuhn WP7: "WP7 WatermarkedTextBox custom control" WindowsPhoneGeek Training: "" Shoutouts: Karl Shifflett announced that he and Josh Smith have heard the developers and released a demo: Mole 2010 Demo Released This is a somewhat older post, but the material is good and I was reminded of it while talking to Josh Smith at the MVP summit last week: Advanced MVVM ... money well-spent From SilverlightCream.com: Introducing the Silverlight Cookbook Dennis Doomen unveils a Codeplex site "containing a Silverlight 4 app that includes most of the complexities you might run into" ... I'm tagging this in my WynApse outlookbar... great stuff, Dennis! A highlighting AutoCompleteBox in Silverlight Peter Kuhn took on a task in response to a forum query and created a highlighting AutoCompleteBox, and is giving it to us... this really looks cool, Peter, and great explanation. Taking a look at the Mindscape Phone Elements for WP7. Michael Crump takes a good look at the Mindscape Phone Elements for WP7... and if you read closely you might still be able to get a free license! Windows Phone – “Can’t connect to your phone. Disconnect it, Restart it, then try connecting again.” Joe McBride explains a way out of an issue that many should be seeing as we repave or replace machines... how to get our device recognized on the updated machine... without giving cryptic messages. How to: only with the full visibility of an application in the browser window start an action Martin Krüger continues his journey in starting storyboards and tackles the condition that the application is completely in the browser window prior to the storyboard starting. A Numeric Input Control for Windows Phone 7 Jeremy Likness came up with a great idea for numeric input for WP7 ... you'll smile when you see it, but what a great idea... and a NumericTextBox to go along with it. Performing CRUD on Relational Data (Multiple table) using RIA in SL4 Manas Patnaik has a post up that breaks the normal blog post or demo mold by having two tables with a relational constraint and doing CRUD operations on them. Plenty of diagrams and good information. Select Many: Reactive Extensions’ Mother Of All Operators [Chaining] Jesse Liberty has part 9 in his Rx series up, and is looking at SelectMany this time, and chaining calls. He's using WPF for the sample, but the goodness is all there for us Silverlight guys too. The Full Stack 8–Adding Search to the Phone Client Jesse Liberty and Jon Galloway have part 8 of their Full Stack series up ... this is the MVC3, ASP.NET, Silverlight, and WP7 app development series... this time out they're putting Search in the Phone client. All about ResourceDictionary in WP7 WindowsPhoneGeek is discussing ResourceDictionaries in this post... beginning with What is a ResourceDictionary and continuing out through creating and using one, plus a good comment on merging. WP7 WatermarkedTextBox custom control In his next post, WindowsPhoneGeek walks us through the creation of a WatermarkedTextBox for WP7 right from the derivation from TextBox... very nice tutorial and lots of code/examples. Stay in the 'Light! Twitter SilverlightNews | Twitter WynApse | WynApse.com | Tagged Posts | SilverlightCream Join me @ SilverlightCream | Phoenix Silverlight User Group Technorati Tags: Silverlight    Silverlight 3    Silverlight 4    Windows Phone MIX10

    Read the article

< Previous Page | 40 41 42 43 44 45 46 47 48 49 50 51  | Next Page >