Daily Archives

Articles indexed Wednesday March 24 2010

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

  • How to start with NOSQL using .net programming languages?

    - by Amr ElGarhy
    just was reading this article http://highscalability.com/blog/2010/3/23/digg-4000-performance-increase-by-sorting-in-php-rather-than.html And found this nice article http://wiki.apache.org/cassandra/DataModel I just want to know as a .net developer how to deal with NOSQL, and somethings like cassandra. I found that cassandra is apache product, is there something like this in microsoft world? or articles to know how to deal with cassandra using .net?

    Read the article

  • How can I use Spring Security without sessions?

    - by Jarrod
    I am building a web application with Spring Security that will live on Amazon EC2 and use Amazon's Elastic Load Balancers. Unfortunately, ELB does not support sticky sessions, so I need to ensure my application works properly without sessions. So far, I have setup RememberMeServices to assign a token via a cookie, and this works fine, but I want the cookie to expire with the browser session (e.g. when the browser closes). I have to imagine I'm not the first one to want to use Spring Security without sessions... any suggestions?

    Read the article

  • Applescript studio - how do I get every control in a window

    - by stib
    I'm trying to enable or disable all the control in a window as the programme changes from interactive to non-interactive mode. How can I ask a window to give me all its contents? every control of window "mainWindow" doesn't work, nor does contents of window "mainWindow" Actually, I haven't been able to find any good documentation for interacting with menu items from interface builder at all. Things like how to set the contents of popups, and buttons and so on. thanks

    Read the article

  • What does this code mean?

    - by joseph
    Hello, I do not know, what is function of code lookups.singleton in code below public class ProjectNode extends AbstractNode { public ProjectNode(MainProject obj, ProjectsChildren children) { super (children, Lookups.singleton(obj)); setDisplayName ( obj.getName()); } }

    Read the article

  • Facebook RESTful API require_login() callback

    - by skidding
    Hi, I'm trying to authenticate a user through the RESTful API (not Connect) but I can't since the callback system does not work for me. I have a local app that creates the Facebook API object with my key and secret, then calls the Facebook API require_login() method; I am sent to Facebook login, I login, and then I am sent to http://www.facebook.com/login.php?auth_token=<...>, where there's another login with just a field for password (not username), I write it again, and after that I am redirected to normal Facebook home. What am I doing wrong? I have set the callback URL in the Facebook app proprieties. Does it have anything to do with the fact that it's localhost? Thanks!

    Read the article

  • How to create a MVC 2 DisplayTemplate for a field whose display format is dependent on another field

    - by Glenn
    If I have a property whose display format is dependent on the value of another property in the view model how do I create a display template for it? The combination of field1's display being dependent on field2's value will be used throughout the app and I would like to encapsulate this in a MVC 2 display template. To be more specific, I've already create a display template (Social.ascx) for custom data type Social that masks a social security number for display. For instance, XXX-XX-1234. [DataType("Social")] public string SocialSecurityNumber { get; set; } All employees also have an employeeID. Certain companies use the employee's social security number as either the whole employee id or as part of it. I need to also mask the employeeID if it contains the social. I'd like to create another display template (EmpID.ascx) to perform this task. [DataType("EmpID")] public string EmployeeID { get; set; } The problem is that I don't know how to get both properties in the "EmpID" template to be able to perform the comparison. Thanks for the help.

    Read the article

  • xmlns="> was not expected

    - by Anthony Shaw
    OK. I'm trying to work on communicating with the Pivotal Tracker API, which only returns data in an XML format. I have the following XML that I'm trying to deserialize into my domain model. <?xml version="1.0" encoding="UTF-8"? <stories type="array" count="2" total="2" <story <id type="integer"2909137</id <project_id type="integer"68153</project_id <story_typebug</story_type <urlhttp://www.pivotaltracker.com/story/show/2909137</url <current_stateunscheduled</current_state <description</description <nameTest #2</name <requested_byAnthony Shaw</requested_by <created_at type="datetime"2010/03/23 20:05:58 EDT</created_at <updated_at type="datetime"2010/03/23 20:05:58 EDT</updated_at </story <story <id type="integer"2909135</id <project_id type="integer"68153</project_id <story_typefeature</story_type <urlhttp://www.pivotaltracker.com/story/show/2909135</url <estimate type="integer"-1</estimate <current_stateunscheduled</current_state <description</description <nameTest #1</name <requested_byAnthony Shaw</requested_by <created_at type="datetime"2010/03/23 20:05:53 EDT</created_at <updated_at type="datetime"2010/03/23 20:05:53 EDT</updated_at </story </stories My 'story' object is created as follows: public class story { public int id { get; set; } public int estimate { get; set; } public int project_id { get; set; } public string story_type { get; set; } public string url { get; set; } public string current_state { get; set; } public string description { get; set; } public string name { get; set; } public string requested_by { get; set; } public string labels { get; set; } public string lighthouse_id { get; set; } public string lighthouse_url { get; set; } public string owned_by { get; set; } public string accepted_at { get; set; } public string created_at { get; set; } public attachment[] attachments { get; set; } public note[] notes { get; set; } } When I execute my deserialization code, I receive the following exception: Exception: There is an error in XML document (2, 2). Inner Exception: <stories xmlns='' was not expected. I can deserialize the individual stories just fine, I just cannot deserialize this xml into an array of 'story' objects And my serialization code var byteArray = Encoding.ASCII.GetBytes(value); var stream = new MemoryStream(byteArray); var deserializedObject = new XmlSerializer(typeof (story[])).Deserialize(stream) Does anybody have any ideas?

    Read the article

  • ListView + MultipleSelect + MVVM = ?

    - by Dave
    If I were to say "the heck with it!", I could just give my ListView with SelectionMode="Multiple" a name, and be able to get all of the selected items very easily. But I'm trying to stick to MVVM as much as possible, and I want to somehow databind to an ObservableCollection that holds the value from the Name column for each selected item. How in the world do you do this? Single selection is simple, but the multi selection solution is not obvious to me with my current WPF / MVVM knowledge. I read this question on SO, and while it does give me some good insight, I don't know how to add the necessary binding to a row, because I am using a ListView with a GridView as its View, not a ListBox. Here's what my XAML basically looks like: <ListView DockPanel.Dock="Top" ItemsSource="{Binding ClientPreview}" SelectionMode="Multiple"> <ListView.View> <GridView AllowsColumnReorder="False"> <GridViewColumn Header="Name"> <GridViewColumn.CellTemplate> <DataTemplate> <TextBlock Text="{Binding Path=Name}" /> </DataTemplate> </GridViewColumn.CellTemplate> </GridViewColumn> <GridViewColumn Header="Address"> <GridViewColumn.CellTemplate> <DataTemplate> <TextBlock Text="{Binding Path=Address}" /> </DataTemplate> </GridViewColumn.CellTemplate> </GridViewColumn> </GridView> </ListView.View> </ListView> It sounds like the right thing to do is to databind each row's IsSelected property to each object stored in the ObservableCollection I'm databinding to. I just haven't figured out how to do this.

    Read the article

  • jQuery jqGrid TreeGrid not functionining properly

    - by Raul Agrait
    Hello. I am having trouble constructing a jqGrid TreeGrid using local data. This method works just fine as a regular grid if you comment out the treeGrid and ExpandColumn attributes, but once you add those to try to make it a tree grid, it doesn't create the tree grid, and it no longer sorts properly. jQuery(function(){ var gridOptions = { datatype: "local", height: 250, colNames: ['Name', 'Type', 'Last Modified On', 'Last Modified By'], colModel: [{name: 'name', index: 'name', width: 200, sorttype: 'text'}, {name: 'type', index: 'type', width: 200, sorttype: 'text'}, {name: 'modifiedon', index: 'modifiedon', width: 200, sorttype: 'date'}, {name: 'modifiedby', index: 'modifiedby', width: 200, sorttype: 'text'}], treeGrid: true, ExpandColumn: 'name', caption: "My Grid" }; jQuery("#treeGrid").jqGrid(gridOptions); var gridData = [ {name: "My File", type: "My File Type", modifiedon: "03/10/2010", modifiedby"Strong Sad", lft: "1", rgt: "8", level: "0"}, {name: "One of Everything", type: "Word Document", modifiedon: "02/12/2009", modifiedby: "Strong Bad", lft: "2", rgt: "5", level: "0"}, {name: "My Presentation", type: "PowerPoint", modifiedon: "01/23/2009", modifiedby: "The Cheat", lft: "3", rgt: "4", level: "0"} ]; for (var i = 0; i < gridData.length; i++) { jQuery("#treeGrid").jqGrid('addRowData', i + 1, gridData[i]); } });

    Read the article

  • Cannot change borderColor of TD

    - by Tadeus Prastowo
    Using JS to set the background color of a TD is fine. But, setting the border color is problematic in FF 3.0.18 although IE 6 doesn't experience this. FF is problematic in that it requires the TD element to have an attribute style initialized to border-style: solid. Without that, setting border color of a TD won't work. Is this known bug? How do I set the border color without having to set style attribute as well as the initialization value? I know another trick of setting the class attribute instead of setting the border color directly. Is this an indication that somehow TD hates having its border color set dynamically? Is this known as well? The problematic code is below (the goal is find out why setting the border color of simple truth 1 does not work while simple truth 3 works when I employ the trick described above): <html> <head> <title>Quirks FF 3.0.18</title> <style type="text/css"> table { border-collapse: collapse; } </style> <script type="text/javascript"> function changeBgColor() { document.getElementById('simple').style.backgroundColor='yellow'; document.getElementById('simple2').style.backgroundColor='yellow'; document.getElementById('simple3').style.backgroundColor='yellow'; } function quirk(id) { var x = document.getElementById(id); x.style.border = '2px solid red'; } </script> </head> <body> <input type="button" onclick="changeBgColor()" value="Change background color"/> <input type="button" onclick="quirk('simple')" value="Change border color 1"/> <input type="button" onclick="quirk('simple2')" value="Change border color 2"/> <input type="button" onclick="quirk('simple3')" value="Change border color 3"/> <table> <tr><td id="simple">Simple truth 1</td></tr> </table> <table> <tr><td><span id="simple2">Simple truth 2</span></td></tr> <table> <tr><td id="simple3" style="border-style: solid">Simple truth 3</td></tr> </table> </body> </html>

    Read the article

  • JavaScript Namespace Declaration

    - by Hery
    I created a javascript class as follow: var MyClass = (function() { function myprivate(param) { console.log(param); } return { MyPublic : function(param) { myprivate(param); } }; })(); MyClass.MyPublic("hello"); The code above is working, but my question is, how if I want to introduce namespace to that class. Basically I want to be able to call the class like this: Namespace.MyClass.MyPublic("Hello World"); If I added Namespace.MyClass, it'll throw error "Syntax Error". I did try to add "window.Namespace = {}" and it doesn't work either. Thanks.. :)

    Read the article

  • How to locate chrome bookmarks in linux

    - by xenon
    I upgraded from Karmic Koala to Lucid Lynx beta, was working fine for a while (was even rebooting). But, after some time, it is not booting and i cant find a solution. I have tried installing the grub again, doesn't help. Well, the problem is all my settings, bookmarks and passwords are blocked in that partition. I cant find where the Chrome stores bookmarks in Ubuntu. Can you help me either getting my system rebooted or getting the bookmarks ? Thanks. p.s. I am currently on liveusb.

    Read the article

  • Ubuntu Wireless card not found

    - by user32121
    Hello all, I'm trying to setup Ubuntu on an old PC. I ran the following command, lspci, in order to get info on the wireless card installed. 00:0a.0 Ethernet controller: Marvell Technology Group Ltd. 88w8335 [Libertas] 802.11b/g Wireless (rev 03) Does anyone know where I can get drivers for this card/chip? And also, how to install (I'm rather new to linux). Also, I'm sure the card is working because I just formatted over xp, and everything was working well. Thanks in advanced!

    Read the article

  • jQuery - what's jQuery plugin

    - by BhejaFry
    Hello folks, can somebody tell me what is jQuery plugin? I have used the jQuery library to build some small UI enhancements but i have no idea how to implement a plugin. Any suggestions on how to get started? TIA

    Read the article

  • Suppose i have an HTML table. How do I use JQuery events on this?

    - by alex
    <table> <tr class="myRow"><td class="col1"></td><td class="col2"></td></tr> <tr class="myRow"><td class="col1"></td><td class="col2"></td></tr> <tr class="myRow"><td class="col1"></td><td class="col2"></td></tr> <tr class="myRow"><td class="col1"></td><td class="col2"></td></tr> <tr class="myRow"><td class="col1"></td><td class="col2"></td></tr> </table> How do I make the appropriate col1 fill with the letters "ABC" when the user rollovers the row? And then disappear the "ABC" when the user moves the mouse away from that row? So far, I got this. I solved it. $(".ep").hover(function(){ $(this).find('td.playButtonCol').html('PLAY'); },function(){ $(this).find('td.playButtonCol').html(''); });

    Read the article

  • WPF Listview- What would be the best way to display data from different ObservableCollections based

    - by highone
    I have three ObservableCollections: CharacterCollection, LocationCollection, and ItemCollection. They are all collections of objects; CharacterCollection is a collection of Character Objects. I need to display, in the listview, information from the collection determined by the user clicking on a button. I would prefer to use databinding, but I don't see a clear cut way to do that with multiple collections containing different types of objects. What would be the best way to easily switch between collections?

    Read the article

  • Why is my jQuery jEditable, edit-in-place callback not working?

    - by unknowndomain
    I am using a jQuery jEditable edit-in-place field but when the JSON function returns and I try to return a value from my edit-in-place callback all I get is a flash of You can see this here... http://clareshilland.unknowndomain.co.uk/ Hit Ctrl+L to login... Username: stackoverflow Password: jquery Although you can see the script in /script.js here is the main code exerpt... $('#menu li a').editable(edit_menu_item, { cssclass: 'editable' }); Here is the callback: function edit_menu_item(value, settings) { $.ajax({ type : "POST", cache : false, url : 'ajax/menu/edit-category.php', dataType: 'json', data : { 'id': this.id, 'value': value }, success : function(data) { if (data.status == 'ok') { alert('ok'); return data.title; } else { alert('n/ok'); return this.revert; } }}); } The JSON code is here: ajax/menu.edit-category.php The edit-in-place is is on the menu which also has a jQuery sortable on it. Single click to edit. Enter to save, and it stores the data but does not update it on the edit-in-place field. Please help stackoverflow, I have been working on this for a mega age. Thanks in advance!

    Read the article

  • Visual Studio 2008 ClickOnce cannot find exe in obj\Release

    - by e28Makaveli
    Project Output Path of the the main application is set to ......\bin\Release\ and was published flawlessly by ClickOnce before. For some strange reason, ClickOnce now fails with the following error: "Could not find file 'obj\Release\EMS.OCC600.Infrastructure.Shell.exe'. c:\WINDOWS\Microsoft.NET\Framework\v3.5\Microsoft.Common.targets 2341 9 Infrastructure.Shell" Anyone run into this before? TIA.

    Read the article

  • Transaction Isolation Level of Serializable not working for me

    - by Shahriar
    I have a website which is used by all branches of a store and what it does is that it records customer purchases into a table called myTransactions.myTransactions table has a column named SerialNumber.For each purchase i create a record in the transactions table and assign a serial to it.The stored procedure that does this calls a UDF function to get a new serialNumber before inserting the record.Like below : Create Procedure mytransaction_Insert as begin insert into myTransactions(column1,column2,column3,...SerialNumber) values( Value1 ,Value2,Value3,...., getTransactionNSerialNumber()) end Create function getTransactionNSerialNumber as begin RETURN isnull(SELECT TOP (1) SerialNumber FROM myTransactions READUNCOMMITTED ORDER BY SerialNumber DESC),0) + 1 end The website is being used by so many users in different stores at the same time and it is creating many duplicate serialNumbers(same SerialNumbers).So i added a Sql transaction with ReadCommitted level to the transaction and i still got duplicate transaction numbers.I changed it to SERIALIZABLE in order to lock the resources and i not only got duplicate transaction numbers(!!HOW!!) but i also got sporadic deadlocks between the same stored procedure calls.This is what i tried : (With ommissions of try catch blocks and rollbacks) Create Procedure mytransaction_Insert as begin SET TRANSACTION ISOLATION LEVEL SERIALIZABLE BEGIN TRASNACTION ins insert into myTransactions(column1,column2,column3,...SerialNumber) values( Value1 ,Value2 , Value3, ...., getTransactionNSerialNumber()) COMMIT TRANSACTION ins SET TRANSACTION ISOLATION READCOMMITTED end I even copied the function that gets the serial number directly into the stored procedure instead of the UDF function call and still got duplicate serialNumbers.So,How can a stored procedure line create something Like the c# lock() {} block. By the way,i have to implement the transaction serial number using the same pattern and i can't change the serialNumber to any other identity field or whatever.And for some reasons i need to generate the serialNumber inside the databse and i can't move SerialNumber generation to application level. Thank you.

    Read the article

  • Behavior of retained property while holder is retained

    - by Aurélien Vallée
    Hello everyone, I am a beginner ObjectiveC programmer, coming from the C++ world. I find it very difficult to understand the memory management offered by NSObject :/ Say I have the following class: @interface User : NSObject { NSString* name; } @property (nonatomic,retain) NSString* name; - (id) initWithName: (NSString*) theName; - (void) release; @end @implementation User @synthesize name - (id) initWithName: (NSString*) theName { if ( self = [super init] ) { [self setName:theName]; } return self; } - (void) release { [name release]; [super release]; } @end No considering the following code, I can't understand the retain count results: NSString* name = [[NSString alloc] initWithCString:/*C string from sqlite3*/]; // (1) name retainCount = 1 User* user = [[User alloc] initWithName:name]; // (2) name retainCount = 2 [whateverMutableArray addObject:user]; // (3) name retainCount = 2 [user release]; // (4) name retainCount = 1 [name release]; // (5) name retainCount = 0 At (4), the retain count of name decreased from 2 to 1. But that's not correct, there is still the instance of user inside the array that points to name ! The retain count of a variable should only decrease when the retain count of a referring variable is 0, that is, when it is dealloced, not released.

    Read the article

  • 3D Triangle - WPF

    - by user300423
    I am trying to apply an image brush to a Triangle in WPF without success. What am i doing wrong? This is my attempt: Dim ModelTri As New MeshGeometry3D ModelTri.Positions.Add(New Point3D(0, 0, 0)) ModelTri.Positions.Add(New Point3D(100, 0, 0)) ModelTri.Positions.Add(New Point3D(100, 100, 0)) Dim MeshTri As New MeshGeometry3D MeshTri.TriangleIndices.Add(0) MeshTri.TriangleIndices.Add(1) MeshTri.TriangleIndices.Add(2) 'Texture Dim TexturePoints As New PointCollection TexturePoints.Add(New Point(100, 0)) TexturePoints.Add(New Point(0, 100)) TexturePoints.Add(New Point(100, 100)) MeshTri.TextureCoordinates = TexturePoints 'Image Brush Dim imgBrush As New ImageBrush() imgBrush.ImageSource = New BitmapImage(New Uri("Mercury.jpg", UriKind.Relative)) imgBrush.Stretch = Stretch.Fill imgBrush.TileMode = TileMode.Tile imgBrush.SetValue(NameProperty, "imgBrush") Dim Mat As Material Dim DMaterial As New DiffuseMaterial DMaterial.Brush = imgBrush Dim Bind As New Binding("imgBrush") Bind.Source = imgBrush BindingOperations.SetBinding(DMaterial, BindingGroupProperty, Bind) 'This doesnt work Mat = DMaterial 'This works 'Mat = New DiffuseMaterial(New SolidColorBrush(Colors.Khaki)) Dim triangleModel As GeometryModel3D = New GeometryModel3D(ModelTri, Mat) Dim model As New ModelVisual3D() model.Content = triangleModel Viewport.Children.Add(model)

    Read the article

  • How to number JSF error messages and attach number to invalid component

    - by Pich
    I want to number any JSF error messages (e.g. validation, conversion messages) that appears if a user enters invalid input in a couple of input fields. For example like this when the user sends the form: Name cannot contain numbers E-mail is incorrect ----- Form ------ (1) Name: John 13 Doe Age: 30 (2) E-mail: myemail@domain How can I do this? Best regards

    Read the article

  • Debuging to simulator crashes with "exited with status 5" unless I have breakpoint

    - by tigermain
    For some reason the app I am working on has very bad PMT! Literally! Most of the time I cannot debug using the simulator without putting a breakpoint in my AppDelegate. If I don't it exists with "status 5". If I put a break point in and simple continue it works perfectly well, it also works if I run the app in the simulator when not connected to the GDB. I have tried the source on a second machine with exactly the same results. I dont have this issue building to the device?!?!?! Thanks

    Read the article

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