Search Results

Search found 156 results on 7 pages for 'maxim zaslavsky'.

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

  • 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

  • Closure vs Anonymous function (difference?)

    - by Maxim Gershkovich
    Hi, I have been unable to find a definition that clearly explains the differences between a closure and an anonymous function. Most references I have seen clearly specify that they are distinct "things" yet I can't seem to get my head around why. Could someone please simplify it for me? What are the specific differences between these two language features? Which one is more appropriate in what scenarios?

    Read the article

  • When .VHD get updated?

    - by Recce2jp
    Hello, I have a VM with a .vhd file however, when I connet to the VM (by RDP) and make some changes (create a directory and add a small file with notepad) the .VHD file stays unchanged. The 'Date modified' of the .VHD stays at the starttime of the VM. 1/How can we force an update of het VM while the VM is running? 2/Where aree the temporary changes kept? Hypervisor: Microsoft Hyper-V server 2008R2 (free download version) regards, Maxim

    Read the article

  • Des fonctions d'Ubuntu 13.04 seront développées à huis clos, vers une fermeture de l'OS ?

    Des fonctions d'Ubuntu 13.04 développées à huis clos Canonical adopte une nouvelle méthode de développement pour Raring Ringtail, vers une fermeture de l'OS ? À peine Canonical a publié Ubuntu 12.10, que la firme livre déjà quelques informations sur son successeur. Comme il est de coutume, l'OS est d'abord passé par la traditionnelle étape de définition de son nom de code. Ubuntu 13.04 sera baptisé « Raring Ringtail », d'après un billet de blog de Mark Shuttleworth, fondateur de Canonical. Cette mouture sera essentiellement centrée sur la mobilité. Le coeur du système d'exploitation sera nettoyé au maxim...

    Read the article

  • Symbolic link modification for HP unix

    - by kalpesh
    Hi David Zaslavsky, Recently i was working on modifying the Symbolic links ... for a particular files.. while searching on internet i saw your post ... I am trying to use this script which you had posted .. find /home/user/public_html/qa/ -type l \ -lname '/home/user/public_html/dev/*' -printf \ 'ln -nsf $(readlink %p|sed s/dev/qa/) $(echo %p|sed s/dev/qa/)\n'\ script.sh SO i tried to modify your script for my problem .. in Hp unix env.. but it seems that the -lname command does not works for HP unix. do you know something equivalent that i can use ... Just to give you and idea of my problem ... I want to change all the symbolic links inside a particular folder .. New Symbolic link -- /base/testusr/scripts Old Symbolic link -- /base/produsr/scripts Now folder "A" contains more than 100 different files having soft links which points to this path -- /base/produsr/scripts But what I want is that the files inside folder A to point to this soft link --/base/testusr/scripts I am trying to achieve in Hp unix ... would really appreciate your help on this ...

    Read the article

  • First TDD, Simple 2-tier C# Project - what do I unit test?

    - by Joel
    This is probably a stupid question but my googling isn't finding a satisfactory answer. I'm starting a small project in C#, with just a business layer and a data access layer - strangely, the UI will come later, and I have very little (read:no) concept / control over what it will look like. I would like to try TDD for this project. I'm using Visual Studio 2008 (soon to be 2010), I have ReSharper 5, and nUnit. Again, I want to do Test-Driven Development, but not necessarily the entire XP system. My question is - when and where do I write the first unit test? Do I only test logic before I write it, or do I test everything? It seems counter-productive to test things that have no reason to fail (auto-properties, empty constructors)...but it seems like the "No new code without a failing test" maxim requires this. Links or references are fine (but preferably to online resources, not books - I would like to get started ASAP). Thanks in advance for any guidance!

    Read the article

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