Search Results

Search found 293 results on 12 pages for 'tomaš guns blazing frcek'.

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

  • java /TableModel of Objects/Update Object"

    - by Tomás Ó Briain
    I've a collection of Stock objects that I'm updating about 10/15 variables for in real-time. I'm accessing each Stock by its ID in the collection. I'm also trying to display this in a JTable and have implemented an AbstractTablemodel. It's not working too well. I've a RowMap that I add each ID to as Stocks are added to the TableModel. To update the prices and variables of all the stocks in the TableModel, I want to send a Stock object to an updateModel(Stock s) method. I can find the relevant row by searching the map, but how do I handle this nicely, so I don't have to start iterating through table columns and comparing the values of the cells to the variables of the object to see whether there are any differences?? Basically, i want to send a Stock object to the TableModel and update cells if there are changes and do nothing if there aren't. Any ideas about how to implement a TableModel that might do this? Any pointeres at all would be appreciated. Thanks.

    Read the article

  • jquery attr problem on firefox

    - by Tomas
    hello, I'm doing full screen background change system with jquery. When enter to site makes full screen size default background, and when click button must change background. Everythink works fine on opera! But FireFox nothink happend. I think problem is with attr function, please help found problem. All this you can see in http://www.hiphopdance.lt $(document).ready(function(){ //default actions var now_img="images/bg.jpg"; resize(1600,900,"#bgimg",now_img); $(window).bind("resize", function() { resize(1600,900,"#bgimg"); }); //default actions end //clicks $('li#red').click(function(){ $("img#bgimg").attr({src:'http://www.hiphopdance.lt/images/redbg.jpg'}); resize(1024,683,"#bgimg"); $(window).bind("resize", function() { resize(1024,683,"#bgimg"); }); }); //end clicks //resize function start function resize(img_width,img_height,img_id) { var ratio = img_height / img_width; // Get browser window size var browserwidth = $(window).width(); var browserheight = $(window).height(); // Scale the image if ((browserheight/browserwidth) > ratio){ $(img_id).height(browserheight); $(img_id).width(browserheight / ratio); } else { $(img_id).width(browserwidth); $(img_id).height(browserwidth * ratio); } // Center the image $(img_id).css('left', (browserwidth - $(img_id).width())/2); $(img_id).css('top', (browserheight - $(img_id).height())/2); }; //resize function end });

    Read the article

  • Basic question about encryption - what exactly are keys?

    - by Tomas
    Hi, I was browsing and found good articles about encryption. However, none of them described why the key lenght is important and what exactly the key is used for. My guess is that could work this way: 0101001101010101010 Key: 01010010101010010101 //the longer the key, the longer unique sequence XOR or smth: //result Is this at least a bit how it works or I am missing something? Thanks

    Read the article

  • Async polling useable for GUI thread

    - by Tomas
    Hi, I have read that I can use asynchronous call with polling especially when the caller thread serves the GUI. I cannot see how because: while(AsyncResult_.IsCompleted==false) //this stops the GUI thread { } So how it come it should be good for this purpose? I needed to update my GUI status bar everytime deamon thread did some progress..

    Read the article

  • Established javascript solution for secure registration & authentication without SSL

    - by Tomas
    Is there any solution for secure user registration and authentication without SSL? With "secure" I mean safe from passive eavesdropping, not from man-in-the-middle (I'm aware that only SSL with signed certificate will reach this degree of security). The registration (password setup, i.e. exchanging of pre-shared keys) must be also secured without SSL (this will be the hardest part I guess). I prefer established and well tested solution. If possible, I don't want to reinvent the wheel and make up my own cryptographic protocols. Thanks in advance.

    Read the article

  • Include code file into C#? Create library for others?

    - by Tomas
    Hi, I would like to know how can I embedd a code source file (if possible), something like that: class X { include "ClassXsource" } My second question - Can I build DLL or something like that for my colleagues to use? I need them to be able to call methods from my "part" but do not modify or view their content. Basically just use namespace "MyNamespace" and call its methods, but I have never done anything like that. Thanks

    Read the article

  • Simple performance testing tool in C#?

    - by Tomas
    Hi, At first -I need to do it as my university project so I am not interested in using existing tools. I would like to know whether it is even possible to write a very simple tool that I could use for performance testing of web applications. It would only record actions (I do not know, maybe just packet sniffering?) and then replay. However I have basic idea (record packets on port 80 and sending them again), I do not know how to measure time for each transaction as they are not differentiated. Any help is greatly appreciated, thank you!

    Read the article

  • How do I get a Type[] with arguments from a MethodCallExpression?

    - by Tomas Lycken
    I'm reflecting over a class (in a unit test of said class) to make sure its members have all the required attributes. To do so, I've constructed a couple of helpers, that take an Expression as an argument. I do some checks for it, and take slightly different actions depending on what type of Expression it is, but it's basically the same. Now, my problem is that I have several methods with the same name (but different signatures), and the following code throws an AmbiguousMatchException: // TOnType is a type argument for the type where the method is declared // mce is the MethodCallExpression var m = typeof(TOnType).GetMethod(mce.Method.Name); Now, if I could add an array of Type[] with the types of the arguments to this method as a second parameter to .GetMethod(), the problem would be solved. But how do I find this Type[] array that I need? I have cast the Expression<Func<...>> to an Expression, and then to a MethodCallExpression, and in this method the contents of <...> is not known.

    Read the article

  • How do I delete an object from an Entity Framework model without first loading it?

    - by Tomas Lycken
    I am quite sure I've seen the answer to this question somewhere, but as I couldn't find it with a couple of searches on SO or google, I ask it again anyway... In Entity Framework, the only way to delete a data object seems to be MyEntityModel ent = new MyEntityModel(); ent.DeleteObject(theObjectToDelete); ent.SaveChanges(); However, this approach requires the object to be loaded to, in this case, the Controller first, just to delete it. Is there a way to delete a business object referencing only for instance its ID? If there is a smarter way using Linq or Lambda expressions, that is fine too. The main objective, though, is to avoid loading data just to delete it.

    Read the article

  • How to use external static files with Django (serving external files once again)?

    - by Tomas Novotny
    Hi, even after Googling and reading all relevant posts at StackOverflow, I still can't get static files working in my Django application. Here is how my files look: settings.py MEDIA_ROOT = os.path.join(SITE_ROOT, 'static') MEDIA_URL = '/static/' urs.py from DjangoBandCreatorSite.settings import DEBUG if DEBUG: urlpatterns += patterns('', ( r'^static/(?P<path>.*)$', 'django.views.static.serve', {'document_root': 'static'} )) template: <script type="text/javascript" src="/static/jquery.js"></script> <script type="text/javascript"> I am trying to use jquery.js stored in directory "static". I am using: Windows XP Python 2.6.4 Django 1.2.3 Thank you very much for any help

    Read the article

  • How do I verify my EF4 Code-Only mappings?

    - by Tomas Lycken
    In NHibernate, there is a method doing something like ThisOrThat.VeryfyMappings() (I don't know the exact definition of it since it was a while ago I last tried NHibernate...) I recall seeing a blog post somewhere where the author showed how to do some similar testing in Entity Framework 4, but now I cant find it. So, how do I test my EF4 Code-Only mappings?

    Read the article

  • (Action<T>).Name does not return expected values

    - by Tomas Lycken
    I have the following method (used to generate friendly error messages in unit tests): protected string MethodName<TTestedType>(Action<TTestedType> call) { return string.Format("{0}.{1}", typeof(TTestedType).FullName, call.Method.Name); } But when I call it as follows, I don't get the expected results: var nm = MethodName<MyController>(ctrl => ctrl.Create()); After running this code, nm contains "<Create_CreateShowsView>b__8", and not (as expected) "Create". How should I change the code to obtain the expected result?

    Read the article

  • Perform tasks with delay, without delaying web response (ASP.NET)

    - by Tomas Lycken
    I'm working on a feature that needs to send two text messages with a 30 second delay, and it is crucial that both text messages are sent. Currently, this feature is built with ajax requests, that are sent with a 30 second javascript delay, but since this requires the user to have his browser open and left on the same page for at least 30 seconds, it is not a method I like. Instead, I have tried to solve this with threading. This is what I've done: Public Shared Sub Larma() Dim thread As New System.Threading.Thread(AddressOf Larma_Thread) thread.Start() End Sub Private Shared Sub Larma_Thread() StartaLarm() Thread.Sleep(1000 * 30) StoppaLarm() End Sub A web handler calls Larma(), and StartaLarm() and StoppaLarm() are the methods that send the first and second text messages respectively. However, I only get the first text message delivered - the second is never sent. Am I doing something wrong here? I have no deep understanding of how threading works in ASP.NET, so please let me know how to accomplish this.

    Read the article

  • Set all nonzero matrix elements to 1 (while keeping the others 0)

    - by Tomas Lycken
    I have a mesh grid defined as [X, Y, Z] = meshgrid(-100:100, -100:100, 25); % z will have more values later and two shapes (ovals, in this case): x_offset_1 = 40; x_offset_2 = -x_offset_1; o1 = ((X-x_offset_1).^2./(2*Z).^2+Y.^2./Z.^2 <= 1); o2 = ((X-x_offset_2).^2./(2*Z).^2+Y.^2./Z.^2 <= 1); Now, I want to find all points that are nonzero in either oval. I tried union = o1+o2; but since I simply add them, the overlapping region will have a value of 2 instead of the desired 1. How can I set all nonzero entries in the matrix to 1, regardless of their previous value? (I tried normalized_union = union./union;, but then I end up with NaN in all 0 elements because I'm dividing by zero...) Follow-up question: I got a perfect answer to my original question, but now I have a follow-up question on the same problem. I'm going to define a filled disc, c = (X.^2+Y.^2<R^2) that will also overlap with the two ovals. How do I find all the points that are inside the circle, but not inside any of the ovals?

    Read the article

  • F# in ASP.NET, mathematics and testing

    - by DigiMortal
    Starting from Visual Studio 2010 F# is full member of .NET Framework languages family. It is functional language with syntax specific to functional languages but I think it is time for us also notice and study functional languages. In this posting I will show you some examples about cool things other people have done using F#. F# and ASP.NET As I am ASP/ASP.NET MVP I am – of course – interested in how people use different languages and technologies with ASP.NET. C# MVP Tomáš Petrícek writes about developing ASP.NET MVC applications using F#. He also shows how to use LINQ To SQL in F# (using F# PowerPack) and provides sample solution and Visual Studio 2010 template for F# MVC web applications. You may also find interesting how you can create controllers in F#. Excellent work, Tomáš! Vladimir Matveev has interesting example about how to use F# and ApplicationHost class to process ASP.NET requests ouside of IIS. This is simple and very straight-forward example and I strongly suggest you to take a look at it. Very cool example is project Strom in Codeplex. Storm is web services testing tool that is fully written on F#. Take a look at this site because Codeplex offers also source code besides binaries. Math Functional languages are strong in fields like mathematics and physics. When I wrote my C# example about BigInteger class I found out that recursive version of Fibonacci algorithm in C# is not performing well. In same time I made same experiment on F# and in F# there were no performance problems with recursive version. You can find F# version of Fibonacci algorithm from Bob Palmer’s blog posting Fibonacci numbers in F#. Although golden spiral is useful for solving many problems I looked for some practical code example and found one. Kean Walmsley published in his Through the Interface blog very interesting posting Creating Fibonacci spirals in AutoCAD using F#. There are also other cool examples you may be interested in. Using numerical components by Extreme Optimization  it is possible to make some numerical integration (quadrature method) using F# (also C# example is available). fsharp.it introduces factorials calculation on F#. Robert Pickering has made very good work on programming The Game of Life in Silverlight and F# – I definitely suggest you to try out this example as it is very illustrative too. Who wants something more complex may take a look at Newton basin fractal example in F# by Jonathan Birge. Testing After some searching and surfing I found out that there is almost everything available for F# to write tests and test your F# code. FsCheck - FsCheck is a port of Haskell's QuickCheck. Important parts of the manual for using FsCheck is almost literally "adapted" from the QuickCheck manual and paper. Any errors and omissions are entirely my responsibility. FsTest - This project is designed to Language Oriented Programming constructs around unit testing and behavior testing in F#. The goal of this project is to create a Domain Specific Language for testing F# code in a way that makes sense for functional programming. FsUnit - FsUnit makes unit-testing with F# more enjoyable. It adds a special syntax to your favorite .NET testing framework. xUnit.NET - xUnit.net is a developer testing framework, built to support Test Driven Development, with a design goal of extreme simplicity and alignment with framework features. It is compatible with .NET Framework 2.0 and later, and offers several runners: console, GUI, MSBuild, and Visual Studio integration via TestDriven.net, CodeRush Test Runner and Resharper. It also offers test project integration for ASP.NET MVC. Getting started Well, as a first thing you need Visual Studio 2010. Then take a look at these resources: F# samples @ MSDN Microsoft F# Developer Center @ MSDN F# Language Reference @ MSDN F# blog F# forums Real World Functional Programming: With Examples in F# and C# (Amazon) Happy F#-ing! :)

    Read the article

  • git push heroku master gives error ssh: connect to host heroku.com port 22: Connection refused

    - by user1476508
    I'm trying to run the heroku-django tutorial (using ubuntu 12.04) and it seems for some reason i cant push into heroku. here is what happens: yeinhorn@ubuntu:~/hellodjango$ git init Reinitialized existing Git repository in /home/yeinhorn/hellodjango/.git/ yeinhorn@ubuntu:~/hellodjango$ git add . yeinhorn@ubuntu:~/hellodjango$ git commit -m "my first commit" On branch master nothing to commit (working directory clean) yeinhorn@ubuntu:~/hellodjango$ heroku create Creating high-dusk-6308... done, stack is cedar http://high-dusk-6308.herokuapp.com/ | [email protected]:high-dusk-6308.git ! New default stack: Cedar. To use Bamboo, run heroku create -s bamboo. yeinhorn@ubuntu:~/hellodjango$ git remote -v heroku [email protected]:blazing-dusk-8587.git (fetch) heroku [email protected]:blazing-dusk-8587.git (push) yeinhorn@ubuntu:~/hellodjango$ git push heroku master ssh: connect to host heroku.com port 22: Connection refused fatal: The remote end hung up unexpectedly yeinhorn@ubuntu:~/hellodjango$ git push -f heroku ssh: connect to host heroku.com port 22: Connection refused fatal: The remote end hung up unexpectedly also when i run $telnet heroku.com 22 i get Trying 50.19.85.132... Trying 50.19.85.154... Trying 50.19.85.156... telnet: Unable to connect to remote host: Connection refused any ideas?

    Read the article

  • mysql get table based on common column between two tables

    - by Zentdayn
    while trying to learn sql i came across "Learn SQL The Hard Way" and i started reading it. Everything was going fine then i thought ,as a way to practice, to make something like given example in the book (example consists in 3 tables pet,person,person_pet and the person_pet table 'links' pets to their owners). I made this: report table +----+-------------+ | id | content | +----+-------------+ | 1 | bank robbery| | 2 | invalid | | 3 | cat on tree | +----+-------------+ notes table +-----------+--------------------+ | report_id | content | +-----------+--------------------+ | 1 | they had guns | | 3 | cat was saved | +-----------+--------------------+ wanted result +-----------+--------------------+---------------+ | report_id | report_content | report_notes | +-----------+--------------------+---------------+ | 1 | bank robbery | they had guns | | 2 | invalid | null or '' | | 3 | cat on tree | cat was saved | +-----------+--------------------+---------------+ I tried a few combinations but no success. My first thought was SELECT report.id,report.content AS report_content,note.content AS note_content FROM report,note WHERE report.id = note.report_id but this only returns the ones that have a match (would not return the invalid report). after this i tried adding IF conditions but i just made it worse. My question is, is this something i will figure out after getting past basic sql or can this be done in simple way? Anyway i would appreciate any help, i pretty much lost with this. Thank you. EDIT: i have looked into related questions but havent yet found one that solves my problem. I probably need to look into other statements such as join or something to sort this out.

    Read the article

  • Slow solid state drive on laptop running Linux

    - by wcyang
    I installed a solid state drive on my laptop, but I don't get the blazing speeds which people write about. My system: Laptop: Acer Aspire 7552G-6061 Solid state drive: Crucial 256GB M4 CT256M4SSD2 Operating system: Linux (Trisquel 5.5, a derivative of Ubuntu) I am using AHCI. I installed the operating system onto the solid state drive (as opposed to copying it). How can I make the solid state drive faster? Could the problem be with the block or sector alignment?

    Read the article

  • Is TRIM supported on RAID 0 configurations for SSD drives in windows 7?

    - by John Sonmez
    I know this question has probably been asked at some point in the past, but I am trying to figure out if Windows 7 supports passing TRIM commands through RAID controllers yet. I am trying to decide between buying a single SSD drive and utilizing TRIM or Buying two SSD drives and putting them in RAID 0 configuration What is the fastest current configuration I can set up? I want my development machine to be BLAZING fast.

    Read the article

  • MySQL 5.5 : sortie imminente ? Oracle devrait annoncer la nouvelle version du SGBD open-source mercredi

    MySQL 5.5 : sortie imminente ? Oracle devrait annoncer la nouvelle version du SGBD open-source mercredi Mise à jour du 13/12/10 Ce mercredi, Oracle organise un webinar pour présenter « une mise à jour importante de MySQL ». Tomas Ulin, Vice-Président du développement de MySQL et Rob Young, Senior Product Manager, y dévoileront les dernières avancées du SGBD open-source que le géant des bases de données à récupérée avec le rachat de Sun. Oracle avait annoncé une RC de MySQL 5,5 lors de l'Oracle OpenWorld de septembre (lire ci-avant). Cette fois-ci, les responsables du projets pourraient annoncer sa disponibilité officielle.

    Read the article

  • MySQL 5.5 is GA!

    - by rob.young(at)oracle.com
    It is my pleasure to announce that MySQL 5.5 is now GA and ready for production deployment.  You can read Oracle's official press release here. I am excited about 5.5 because of the performance and scalability gains, new replication enhancements and overall improved technical efficiencies.  Congratulations and a sincere "Thanks!" go out to the entire MySQL Community and product engineering teams for making 5.5 the best release of MySQL to date.Please join us for today's MySQL Technology Update webcast where Tomas Ulin and I will cover what's new in MySQL 5.5 and provide an update on the other technologies we are working on. You can download MySQL 5.5 here.  All of the documentation and what's new information is here.  There is also a great article on MySQL 5.5 and the MySQL community here.Thanks for reading, and as always, THANKS for your support of MySQL!

    Read the article

  • F# for the C# Programmer

    - by mbcrump
    Are you a C# Programmer and can’t make it past a day without seeing or hearing someone mention F#?  Today, I’m going to walk you through your first F# application and give you a brief introduction to the language. Sit back this will only take about 20 minutes. Introduction Microsoft's F# programming language is a functional language for the .NET framework that was originally developed at Microsoft Research Cambridge by Don Syme. In October 2007, the senior vice president of the developer division at Microsoft announced that F# was being officially productized to become a fully supported .NET language and professional developers were hired to create a team of around ten people to build the product version. In September 2008, Microsoft released the first Community Technology Preview (CTP), an official beta release, of the F# distribution . In December 2008, Microsoft announced that the success of this CTP had encouraged them to escalate F# and it is now will now be shipped as one of the core languages in Visual Studio 2010 , alongside C++, C# 4.0 and VB. The F# programming language incorporates many state-of-the-art features from programming language research and ossifies them in an industrial strength implementation that promises to revolutionize interactive, parallel and concurrent programming. Advantages of F# F# is the world's first language to combine all of the following features: Type inference: types are inferred by the compiler and generic definitions are created automatically. Algebraic data types: a succinct way to represent trees. Pattern matching: a comprehensible and efficient way to dissect data structures. Active patterns: pattern matching over foreign data structures. Interactive sessions: as easy to use as Python and Mathematica. High performance JIT compilation to native code: as fast as C#. Rich data structures: lists and arrays built into the language with syntactic support. Functional programming: first-class functions and tail calls. Expressive static type system: finds bugs during compilation and provides machine-verified documentation. Sequence expressions: interrogate huge data sets efficiently. Asynchronous workflows: syntactic support for monadic style concurrent programming with cancellations. Industrial-strength IDE support: multithreaded debugging, and graphical throwback of inferred types and documentation. Commerce friendly design and a viable commercial market. Lets try a short program in C# then F# to understand the differences. Using C#: Create a variable and output the value to the console window: Sample Program. using System;   namespace ConsoleApplication9 {     class Program     {         static void Main(string[] args)         {             var a = 2;             Console.WriteLine(a);             Console.ReadLine();         }     } } A breeze right? 14 Lines of code. We could have condensed it a bit by removing the “using” statment and tossing the namespace. But this is the typical C# program. Using F#: Create a variable and output the value to the console window: To start, open Visual Studio 2010 or Visual Studio 2008. Note: If using VS2008, then please download the SDK first before getting started. If you are using VS2010 then you are already setup and ready to go. So, click File-> New Project –> Other Languages –> Visual F# –> Windows –> F# Application. You will get the screen below. Go ahead and enter a name and click OK. Now, you will notice that the Solution Explorer contains the following: Double click the Program.fs and enter the following information. Hit F5 and it should run successfully. Sample Program. open System let a = 2        Console.WriteLine a As Shown below: Hmm, what? F# did the same thing in 3 lines of code. Show me the interactive evaluation that I keep hearing about. The F# development environment for Visual Studio 2010 provides two different modes of execution for F# code: Batch compilation to a .NET executable or DLL. (This was accomplished above). Interactive evaluation. (Demo is below) The interactive session provides a > prompt, requires a double semicolon ;; identifier at the end of a code snippet to force evaluation, and returns the names (if any) and types of resulting definitions and values. To access the F# prompt, in VS2010 Goto View –> Other Window then F# Interactive. Once you have the interactive window type in the following expression: 2+3;; as shown in the screenshot below: I hope this guide helps you get started with the language, please check out the following books for further information. F# Books for further reading   Foundations of F# Author: Robert Pickering An introduction to functional programming with F#. Including many samples, this book walks through the features of the F# language and libraries, and covers many of the .NET Framework features which can be leveraged with F#.       Functional Programming for the Real World: With Examples in F# and C# Authors: Tomas Petricek and Jon Skeet An introduction to functional programming for existing C# developers written by Tomas Petricek and Jon Skeet. This book explains the core principles using both C# and F#, shows how to use functional ideas when designing .NET applications and presents practical examples such as design of domain specific language, development of multi-core applications and programming of reactive applications.

    Read the article

  • Oracle VM Slides and Replay

    - by Alex Blyth
    Thanks everyone for attending the webcast on "Oracle VM and Virtualisation" last week. I know I got some useful info out of the session and on behalf of all those who attended I'll say Thank You to Dean Samuels for spending some time talking to us.Slides are available here Oracle VM - 28/04/2010 View more presentations from Oracle Australia. You can download the replay here. Next week's session is on Oracle Database Security and will cover briefly all the big guns like Transparent Data Encryption, Database Vault, Audit Vault, Flashback Data Archive as well as touching on some of the features that are so often skipped over. You can enroll for this session here. Thanks again Cheers Alex

    Read the article

  • Cheap, Awesome, Programmer-friendly City in Europe for 1 year Study Hiatus?

    - by Gonjasufi
    Next year I'll be 21. I'll have 3 years of professional experience under my belt (with a one year break as a soldier). I'm planning to take 2 to 3 years off. Instead of going to a university I'm planning to work on personal projects and learn on my own. I'm looking for suggestions of great, cheap, programmer-friendly (e.g. lots of cafes, ordered food, parks, blazing fast internet connection, wifi, lots of people that speak English) cities around the world, (and specifically in Europe as I also have european citizenship). If you can supply with an estimate cost of living for that city, or a site for comparisons that will also be great. edit: I'm living in Tel Aviv, ~20 highest cost of living city in the world, so statistically speaking almost all the cities are cheaper.

    Read the article

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