Search Results

Search found 167 results on 7 pages for 'maxim v pavlov'.

Page 6/7 | < Previous Page | 2 3 4 5 6 7  | Next Page >

  • MSMQ - Message Queue Abstraction and Pattern

    - by Maxim Gershkovich
    Hi All, Let me define the problem first and why a messagequeue has been chosen. I have a datalayer that will be transactional and EXTREMELY insert heavy and rather then attempt to deal with these issues when they occur I am hoping to implement my application from the ground up with this in mind. I have decided to tackle this problem by using the Microsoft Message Queue and perform inserts as time permits asynchronously. However I quickly ran into a problem. Certain inserts that I perform may need to be recalled (ie: retrieved) immediately (imagine this is for POS system and what happens if you need to recall the last transaction - one that still hasn’t been inserted). The way I decided to tackle this problem is by abstracting the MessageQueue and combining it in my data access layer thereby creating the illusion of a single set of data being returned to the user of the datalayer (I have considered the other issues that occur in such a scenario (ie: essentially dirty reads and such) and have concluded for my purposes I can control these issues). However this is where things get a little nasty... I’ve worked out how to get the messages back and such (trivial enough problem) but where I am stuck is; how do I create a generic (or at least somewhat generic) way of querying my message queue? One where I can minimize the duplication between the SQL queries and MessageQueue queries. I have considered using LINQ (but have very limited understanding of the technology) and have also attempted an implementation with Predicates which so far is pretty smelly. Are there any patterns for such a problem that I can utilize? Am I going about this the wrong way? Does anyone have an of their own ideas about how I can tackle this problem? Does anyone even understand what I am talking about? :-) Any and ALL input would be highly appreciated and seriously considered… Thanks again.

    Read the article

  • MySQL IDE recommendation?

    - by Maxim Veksler
    Hello, I've been wondering what you guys are using to write,debug,test your SQL queries there days? The requirements are quite simple: Auto-complete Syntax Highlighting SQL Hisotry Good UI There are some tools which are common for this task, each with his own problems. To name a few Mysql Query Browser MySQL Workbench (GA?, Beta?) Eclipse Database development perspective Oracle SQL Developer with Connector/J I won't go into why none of them is perfect, trust me they all have their problems. So, what are you guys using?

    Read the article

  • How to wait for thread to finish with .NET?

    - by Maxim Z.
    I've never really used threading before in C# where I need to have two threads, as well as the main UI thread. Basically, I have the following. public void StartTheActions() { //Starting thread 1.... Thread t1 = new Thread(new ThreadStart(action1)); t1.Start(); //Now, I want for the main thread (which is calling StartTheActions() ) to wait for t1 to finish (I have created an event in action1() for this) and then start t2... //HOW DO I DO THIS? Thread t2 = new Thread(new ThreadStart(action2)); t2.Start(); } So, essentially, my question is how to have a thread wait for another one to finish. What is the best way to do this? Thanks!

    Read the article

  • ASP.Net Architecture Specific to Shared/Static functions

    - by Maxim Gershkovich
    Hello All, Could someone please advise in the context of a ASP.Net application is a shared/static function common to all users? If for example you have a function Public shared function GetStockByID(StockID as Guid) as Stock Is that function common to all current users of your application? Or is the shared function only specific to the current user and shared in the context of ONLY that current user? So more specifically my question is this, besides database concurrency issues such as table locking do I need to concern myself with threading issues in shared functions in an ASP.Net application? In my head; let’s say my application namespace is MyTestApplicationNamespace. Everytime a new user connects to my site a new instance of the MyTestApplicationNamespace is created and therefore all shared functions are common to that instance and user but NOT common across multiple users. Is this correct?

    Read the article

  • Anonymous functions in C#

    - by Maxim Gershkovich
    The following syntax is valid VB.NET code Dim myCollection As New List(Of Stock) myCollection.Add(New Stock(Guid.NewGuid, "Item1")) myCollection.Add(New Stock(Guid.NewGuid, "Item2")) Dim res As List(Of Stock) = myCollection.FindAll(Function(stock As Stock) As Boolean If stock.Description = "Item2" Then Return True End If Return False End Function) How can I accomplish the same thing in C#? I have tried... myCollection.FindAll(bool delegate(Stock stock) { if (blah blah) { } }); But it appears I have somehow structured it incorrectly as I get the following error. "Error 1 Invalid expression term 'bool'"

    Read the article

  • Post serialized to xml object to mvc action

    - by Maxim
    Hello! i have 2 projects. First project send to 2-nd via http-post requests, as serialized to XML class instances. Ex: <?xml version="1.0" encoding="utf-16"?> <MyObject xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <UserId>test user</UserId> ... How can i recieve it in action of 2-nd project? [HttpPost] public ActionResult Index(MyObject id) { ... or like string, and deserialize after? Thanx.

    Read the article

  • How to send HTTP POST request and recieve response?

    - by Maxim Kachurovskiy
    For example, I need to make the following Client C - Server S conversation and get XIMSS.nonce node value: C:GET /ximsslogin/ HTTP/1.1 Host: myserver.com Content-Type: text/xml Content-Length: 42 <XIMSS><listFeatures id="list" /><XIMSS> S:HTTP/1.1 200 OK Content-Length: 231 Connection: keep-alive Content-Type: text/xml;charset=utf-8 Server: CommuniGatePro/5.3 <XIMSS><nonce>2C3E575E5498CE63574D40F18D00C873</nonce><language>german</language><response id="s"/></XIMSS>

    Read the article

  • Blackberry: Getting uncaught exception java.lang.securityexception

    - by Maxim Xion
    here is my code to open an image file from SDcard in Blackberry import javax.microedition.midlet.*; import javax.microedition.lcdui.*; import java.io.*; public class DisplayAnImage extends MIDlet { private Display mDisplay; private Form mForm; private Image pngBackground; public void startApp() { try{ pngBackground = Image.createImage("file:///Media Card/test_image.png"); ImageItem img = new ImageItem("bg",pngBackground, ImageItem.LAYOUT_EXPAND,"background",ImageItem.PLAIN); mForm = new Form("MIDlet Developer Guide: Display an image."); mForm.append(img); mDisplay = Display.getDisplay(this); mDisplay.setCurrent(mForm); } catch(IOException e) { mForm.append(e.getMessage()); } } public void pauseApp() { } public void destroyApp(boolean flag) { } } While I am running this app with giving all permission to app it shows me "uncaught exception java.lang.securityexception". Please somebody help me on this. Thanks in advance.. :-)

    Read the article

  • Use layout_alignBaseline with Spinner

    - by Maxim
    Hello everybody, I've noticed that layout_alignBaseline of TextVew control doesn't work with Spinner control. I'm trying to place a text to the left of spinner, but it goes to the top of the parent control. Is it a bug or I do something wrong. The same technique works fine with EditText controls.

    Read the article

  • When are predicates appropriate and what is the best pattern for usage

    - by Maxim Gershkovich
    When are predicates appropriate and what is the best pattern for usage? What are the advantages of predicates? It seems to me like most cases where a predicate can be employed a tight loop would accomplish the same functionality? I don’t see a reusability argument given you will probably only implement a predicate in one method right? They look and feel nice but besides that they seem like you would only employ them when you need a quick hack on the collection classes? UPDATE But why would you be rewriting the tight loop again and again? In my mind/code when it comes to collections I always end up with something like Class Person End Class Class PersonList Inherits List(Of Person) Function FindByName(Name) as Person tight loop.... End Function End Class @Ani By that same logic I could implement the method as such Class PersonList Inherits List(Of Person) Function FindByName(Name) as PersonList End Function Function FindByAge(Age) as PersonList End Function Function FindBySocialSecurityNumber(SocialSecurityNumber) as PersonList End Function End Class And call it as such Dim res as PersonList = MyList.FindByName("Max").FindByAge(25).FindBySocialSecurityNumber(1234) and the result along with the amount of code and its reusability is largely the same, no? I am not arguing just trying to understand.

    Read the article

  • User oriented regex library for java

    - by Maxim Veksler
    Hello, I'm looking for a library that could perform "easy" pattern matching, a kind of pattern that can be exposed via GUI to users. It should define a simple matching syntax like * matches any char and alike. In other words, I want to do glob (globbing) like sun's implemented logic http://openjdk.java.net/projects/nio/javadoc/java/nio/file/PathMatcher.html but without relation to the file system. Ideas?

    Read the article

  • Foreign Keys in SQLITE in the Google Gears framework

    - by Maxim Gershkovich
    Hi all, Could someone please tell me why the following foreign key constraint (although executes fine) is not enforced by SQLITE? Could someone pleasse provide an example of how I can go about enforcing the relationship? CREATE TABLE User (UserID TEXT Unique NOT NULL PRIMARY KEY, FirstName TEXT NOT NULL, LastName TEXT NOT NULL, Username TEXT NOT NULL, Password TEXT NOT NULL, Email TEXT NOT NULL, SignupDate TEXT NOT NULL) CREATE TABLE Category (CategoryID TEXT Unique NOT NULL PRIMARY KEY, UserID TEXT, FOREIGN KEY(UserID) REFERENCES User(UserID))

    Read the article

  • Why would someone use WHERE 1=1 AND <conditions> in a SQL clause?

    - by Bogdan Maxim
    Why would someone use WHERE 1=1 AND <conditions> in a SQL clause (Either SQL obtained through concatenated strings, either view definition) I've seen somewhere that this would be used to protect against SQL Injection, but it seems very weird. If there is injection WHERE 1 = 1 AND injected OR 1=1 would have the same result as injected OR 1=1. Later edit: What about the usage in a view definition?

    Read the article

  • Query parameter using JS framework ?

    - by Maxim Veksler
    Hi, I seem to not be able to find implementation from the common Ajax libraries (JQuery, mootools, prototypejs...) that would allow the operation of parsing the window.location.href for request parameter. I would expect something like: $P{"param1"} == "param1_value" Am I missing something? p.s. The web does contains implementation examples for such operations

    Read the article

  • Class works without declaring variables?

    - by Maxim Droy
    I'm learned php as functional and procedure language. Right now try to start learn objective-oriented and got an important question. I have code: class car { function set_car($model) { $this->model = $model; } function check_model() { if($this->model == "Mercedes") echo "Good car"; } } $mycar = new car; $mycar->set_car("Mercedes"); echo $mycar->check_model(); Why it does work without declaration of $model? var $model; in the begin? Because in php works "auto-declaration" for any variables? I'm stuck

    Read the article

  • Custom librairies with Razor with the release version of MVC 3

    - by Maxim
    So I'm developing an in-house library for MVC 3 and I want to add it to my project. I added it to my web.config. I added the assembly and added it to the pages - namespaces section and... no. Doesn't work. I tried recompiling, etc... but Razor doesn't like it at all. It's not an intellisense problem... the site can't run if I use my defined namespace. The only way that I made it work was by using the following statements: @using Sample.Helpers I don't want to use it in the pages. I want to be able to deploy it to many projects and adding it to the web.config is definitely the way to go. Anyone ran into this problem?

    Read the article

  • Updating Cells in a DataTable

    - by Maxim Z.
    I'm writing a small app to do a little processing on some cells in a CSV file I have. I've figured out how to read and write CSV files with a library I found online, but I'm having trouble: the library parses CSV files into a DataTable, but, when I try to change a cell of the table, it isn't saving the change in the table! Below is the code in question. I've separated the process into multiple variables and renamed some of the things to make it easier to debug for this question. Code Inside the loop: string debug1 = readIn.Rows[i].ItemArray[numColumnToCopyTo].ToString(); string debug2 = readIn.Rows[i].ItemArray[numColumnToCopyTo].ToString().Trim(); string debug3 = readIn.Rows[i].ItemArray[numColumnToCopyFrom].ToString().Trim(); string towrite = debug2 + ", " + debug3; readIn.Rows[i].ItemArray[numColumnToCopyTo] = (object)towrite; After the loop: readIn.AcceptChanges(); When I debug my code, I see that towrite is being formed correctly and everything's OK, except that the row isn't updated: why isn't it working? I have a feeling that I'm making a simple mistake here: the last time I worked with DataTables (quite a long time ago), I had similar problems. If you're wondering why I'm adding another comma in towrite, it's because I'm combining a street address field with a zip code field - I hope that's not messing anything up. My code is kind of messy, as I'm only trying to edit one file to make a small fix, so sorry.

    Read the article

< Previous Page | 2 3 4 5 6 7  | Next Page >