Daily Archives

Articles indexed Friday May 21 2010

Page 23/114 | < Previous Page | 19 20 21 22 23 24 25 26 27 28 29 30  | Next Page >

  • mgtwitterengine and oauth 401 error: Boggled

    - by Jason
    OK... so here is my code: twitterEngine = [[MGTwitterEngine alloc] initWithDelegate:self]; [twitterEngine setConsumerKey:CONSUMER_KEY secret:CONSUMER_SECRET]; accessToken = [twitterEngine getXAuthAccessTokenForUsername:profile.twitterUserId password:profile.twitterPassword]; NSLog(@"Access token: %@", accessToken); the console shows the access token returned just fine (so it seems to work) eg. Access token: C8A24515-0F11-4B5A-8813-XXXXXXXXXXXXXX but instead of accessTokenReceived method being called next on my delegate, it calls requestFailed with a 401. How can I be getting a 401 unauthorized and getting an access token back from the method call?????

    Read the article

  • DataSet binding problem

    - by Shaine
    I've got in-memory dataset with some table defined and I populate this table in a following way: for(...) ds.Fields.AddFieldsRow(++j, 0, heading, "Char", "", "", "Input", 0, "","",""); On the GUI I've got DataGridView bound to that table inside TabControl (bound through BindingSource). Very strange thing is happening: if I open tab pane with this grid and populate table with some data then I see changes in grid. On the other side if I'm at other tab, populate table, and then switch to tab with grid I've got following exception: "DataMember property 'Fields' cannot be found on the DataSource". In similar way I've got 2 tab panes with grid in each that are bound to the same datatable using different datasources and I open one of them, populate, see the changes, then switch to second tab and get crash. What am I missing?

    Read the article

  • Title: Using Window Handle to disable Mouse clicks and Keyboard Inputs using Pinvoke c#

    - by srk
    I need to disable the Mouse Clicks, Mouse movement and Keyboard Inputs for a specific windows for a Kiosk application. Is it Feasible in C# ? I have removed the menu bar and title bar of a specific window, will that be a starting point to achieve the above requirement ? The code for removing the menu bar and title bar using window handle : #region Constants //Finds a window by class name [DllImport("USER32.DLL")] public static extern IntPtr FindWindow(string lpClassName, string lpWindowName); //Sets a window to be a child window of another window [DllImport("USER32.DLL")] public static extern IntPtr SetParent(IntPtr hWndChild, IntPtr hWndNewParent); //Sets window attributes [DllImport("USER32.DLL")] public static extern int SetWindowLong(IntPtr hWnd, int nIndex, int dwNewLong); //Gets window attributes [DllImport("USER32.DLL")] public static extern int GetWindowLong(IntPtr hWnd, int nIndex); [DllImport("user32.dll", EntryPoint = "FindWindow", SetLastError = true)] static extern IntPtr FindWindowByCaption(IntPtr ZeroOnly, string lpWindowName); [DllImport("user32.dll")] static extern IntPtr GetMenu(IntPtr hWnd); [DllImport("user32.dll")] static extern int GetMenuItemCount(IntPtr hMenu); [DllImport("user32.dll")] static extern bool DrawMenuBar(IntPtr hWnd); [DllImport("user32.dll")] static extern bool RemoveMenu(IntPtr hMenu, uint uPosition, uint uFlags); //assorted constants needed public static uint MF_BYPOSITION = 0x400; public static uint MF_REMOVE = 0x1000; public static int GWL_STYLE = -16; public static int WS_CHILD = 0x40000000; //child window public static int WS_BORDER = 0x00800000; //window with border public static int WS_DLGFRAME = 0x00400000; //window with double border but no title public static int WS_CAPTION = WS_BORDER | WS_DLGFRAME; //window with a title bar public static int WS_SYSMENU = 0x00080000; //window menu #endregion public static void WindowsReStyle() { Process[] Procs = Process.GetProcesses(); foreach (Process proc in Procs) { if (proc.ProcessName.StartsWith("notepad")) { IntPtr pFoundWindow = proc.MainWindowHandle; int style = GetWindowLong(pFoundWindow, GWL_STYLE); //get menu IntPtr HMENU = GetMenu(proc.MainWindowHandle); //get item count int count = GetMenuItemCount(HMENU); //loop & remove for (int i = 0; i < count; i++) RemoveMenu(HMENU, 0, (MF_BYPOSITION | MF_REMOVE)); //force a redraw DrawMenuBar(proc.MainWindowHandle); SetWindowLong(pFoundWindow, GWL_STYLE, (style & ~WS_SYSMENU)); SetWindowLong(pFoundWindow, GWL_STYLE, (style & ~WS_CAPTION)); } } }

    Read the article

  • ~/.profile does not run on startup

    - by pocoa
    I want to run some scripts at system startup, so in ~/.profile file, I've added: WORKSPACE="~/Development/workspace" alias workspace="cd $WORKSPACE" So I want this "workspace" alias to be available after the startup. Maybe it's not the right place to define these variables.

    Read the article

  • Running Jar file in Windows

    - by BlackPanther
    I have a "helloworld.jar" file. For running a JAR file I am using a command-line window and executing the following command: java -jar helloworld.jar By using this command I can execute the JAR file. But instead of doing it in a command-line window, I want to execute the JAR file if I double click on the JAR file. I did some Google search for this. But I cannot do this. For this do I need to install any software? Can any one provide me help on this?

    Read the article

  • Would like help with LOGON Trigger

    - by Risho
    I've created a logon trigger in MS SQL that needs to check dm_exec_sessions for a login. This login is the user listed in the connection string and has owner right to the database. If the login is verified, I need it to update a specific table and send an email. So far I've done just the following piece and it disabled my web site. The error I get is: "Logon failed for login 'dev' due to trigger execution. Changed database context to 'mydatabase'. Changed language setting to us_english." Any idea what I did wrong? Thanks, Risho CREATE TRIGGER TDY_Assets_Notification ON ALL SERVER WITH EXECUTE AS 'dev' FOR LOGON AS BEGIN IF ORIGINAL_LOGIN()='dev' AND (SELECT COUNT(*) FROM sys.dm_exec_sessions WHERE is_user_process = 1 AND original_login_name = 'dev') > 1 UPDATE Assets_TDY SET Suspense = 1, Warning = 1 WHERE (Date_Returned IS NULL) AND (GETDATE() >= DATEADD(day, 3, Date_Return)) END

    Read the article

  • Attaching a link to back button in php

    - by Prasoon Saurav
    Is there any way by which I can attach the back button of my browser to any particular link? Actually I am designing a login page in PHP. After login I want the back button of my browser to open any particular page that I want, how can I do that in PHP? Actually I am not a PHP guy, so my question might sound silly to some. :P

    Read the article

  • How to call a .NET COM method with an array from delphi using PSafeArray?

    - by Sebastian Godelet
    Hello. I have an .NET (4.0) interface which is implemented with a ServicedComponent COM+ class: interface DotNetIface { void MethodRef(var System.Guid guid); void MethodArray(System.Guid[] guids, params object[] parameters); void MethodCStyle([MarshalAs(UnmanagedType.LPArray, ArraySubType=UnmanagedType.Struct, SizeConst=5)]System.Guid[] guids); } Now I used the Delphi 2007 import wizard to import the type library, and as expected I get the following signatures: procedure MethodRef(var guid : TGuid); procedure MethodArray(guids : PSafeArray); procedure MethodCStyle(var guids : ClrGuid /* from mscorlib_TLB */); If i now call the "ref" method like this it works fine: procedure CallByRef(guid : TGuid); var test : TGuid; begin test := ... comRef.MethodRef(guid); end; Now I also need the array method procedure CallArray(); var localGuid : TGuid; arrayVariant : OleVariant; begin arrayVariant := VarArrayCreate([0,4], varVariant /* dont know here */); arrayVariant[0] := localGuid; /* compile error, cannot cast implicitly */ comRef.MethodArray(PSafeArray(TVarData(arrayVariant.VArray)), /* here this object... PSafeArray works actually*/); end; Now lastly i tried with a c array procedure CallCStyle(); var localGuid : TGuid; arrayOfGuid : array [0..4] of ClrGuid; begin arrayOfGuid[0] := ClrGuid(localGuid); comRef.MethodCStyle(PSafeArray(/* now i dont know put it*/, /* here this object... PSafeArray works actually*/); end; I seriously dont know how to make this work. I hope someone has more experience with COM marshalling thx Side node: I found VT_CLSID which i think can be passed for SafeArrayCreate, but I am not sure how to sue that

    Read the article

  • SEF URL Problem in Joomla1.5

    - by Emrul Hasan
    My joomla site url is: http://www.cessnatrader.com. I am using SEF URL for this site. The SEF URL is not working in the main menu(in top). But it is working fine for other places(other links, footer menu). I don't know what the problem is. I did all the things for enabling SEF URL in joomla. But it is not working in one place(main menu). What should I do? Note: I am using "Mosets tree" component in this site.

    Read the article

  • How to read the network file.

    - by ungalnanban
    I'm using Net::FTP for getting a remote hosted file. I want to read the file. I don't want to get the file from the remote host to my host (localhost), but I need to read the file content only. Is there any module to do this? use strict; use warnings; use Data::Dumper; use Net::FTP; my $ftp = Net::FTP->new("192.168.8.20", Debug => 0) or die "Cannot connect to some.host.name: $@"; $ftp->login("root",'root123') or die "Cannot login ", $ftp->message; $ftp->cwd("SUGUMAR") or die "Cannot change working directory ", $ftp->message; $ftp->get("Testing.txt") or die "get failed ", $ftp->message; $ftp->quit; In the above sample program, I get the file from 192.168.8.20. Then I will read the file and do the operation. I don't want to place the file in my local system. I need to read the Testing.txt file content.

    Read the article

  • What DVCS support Unicode filenames?

    - by Craig McQueen
    I'm interested in trying out distributed version control systems. git sounds promising, but I saw a note somewhere for the Windows port of git that says "don't use non-ASCII filenames". I can't find that now, but there is this link. It's put me off git for now, but I don't know if the other options are any better. Support for non-ASCII filenames is essential for my Japanese company. I'm looking for one that internally stores filenames as Unicode, not a platform-dependent encoding which would cause endless grief. So: What DVCS support Unicode filenames? In both Windows and Linux? Ideally, with the possibility to transfer repositories between Windows and Linux machines with minimal issues?

    Read the article

  • May 20th Links: ASP.NET MVC, ASP.NET, .NET 4, VS 2010, Silverlight

    - by ScottGu
    Here is the latest in my link-listing series.  Also check out my VS 2010 and .NET 4 series and ASP.NET MVC 2 series for other on-going blog series I’m working on. [In addition to blogging, I am also now using Twitter for quick updates and to share links. Follow me at: twitter.com/scottgu] ASP.NET MVC How to Localize an ASP.NET MVC Application: Michael Ceranski has a good blog post that describes how to localize ASP.NET MVC 2 applications. ASP.NET MVC with jTemplates Part 1 and Part 2: Steve Gentile has a nice two-part set of blog posts that demonstrate how to use the jTemplate and DataTable jQuery libraries to implement client-side data binding with ASP.NET MVC. CascadingDropDown jQuery Plugin for ASP.NET MVC: Raj Kaimal has a nice blog post that demonstrates how to implement a dynamically constructed cascading dropdownlist on the client using jQuery and ASP.NET MVC. How to Configure VS 2010 Code Coverage for ASP.NET MVC Unit Tests: Visual Studio enables you to calculate the “code coverage” of your unit tests.  This measures the percentage of code within your application that is exercised by your tests – and can give you a sense of how much test coverage you have.  Gunnar Peipman demonstrates how to configure this for ASP.NET MVC projects. Shrinkr URL Shortening Service Sample: A nice open source application and code sample built by Kazi Manzur that demonstrates how to implement a URL Shortening Services (like bit.ly) using ASP.NET MVC 2 and EF4.  More details here. Creating RSS Feeds in ASP.NET MVC: Damien Guard has a nice post that describes a cool new “FeedResult” class he created that makes it easy to publish and expose RSS feeds from within ASP.NET MVC sites. NoSQL with MongoDB, NoRM and ASP.NET MVC Part 1 and Part 2: Nice two-part blog series by Shiju Varghese on how to use MongoDB (a document database) with ASP.NET MVC.  If you are interested in document databases also make sure to check out the Raven DB project from Ayende. Using the FCKEditor with ASP.NET MVC: Quick blog post that describes how to use FCKEditor – an open source HTML Text Editor – with ASP.NET MVC. ASP.NET Replace Html.Encode Calls with the New HTML Encoding Syntax: Phil Haack has a good blog post that describes a useful way to quickly update your ASP.NET pages and ASP.NET MVC views to use the new <%: %> encoding syntax in ASP.NET 4.  I blogged about the new <%: %> syntax – it provides an easy and concise way to HTML encode content. Integrating Twitter into an ASP.NET Website using OAuth: Scott Mitchell has a nice article that describes how to take advantage of Twiter within an ASP.NET Website using the OAuth protocol – which is a simple, secure protocol for granting API access. Creating an ASP.NET report using VS 2010 Part 1, Part 2, and Part 3: Raj Kaimal has a nice three part set of blog posts that detail how to use SQL Server Reporting Services, ASP.NET 4 and VS 2010 to create a dynamic reporting solution. Three Hidden Extensibility Gems in ASP.NET 4: Phil Haack blogs about three obscure but useful extensibility points enabled with ASP.NET 4. .NET 4 Entity Framework 4 Video Series: Julie Lerman has a nice, free, 7-part video series on MSDN that walks through how to use the new EF4 capabilities with VS 2010 and .NET 4.  I’ll be covering EF4 in a blog series that I’m going to start shortly as well. Getting Lazy with System.Lazy: System.Lazy and System.Lazy<T> are new features in .NET 4 that provide a way to create objects that may need to perform time consuming operations and defer the execution of the operation until it is needed.  Derik Whittaker has a nice write-up that describes how to use it. LINQ to Twitter: Nifty open source library on Codeplex that enables you to use LINQ syntax to query Twitter. Visual Studio 2010 Using Intellitrace in VS 2010: Chris Koenig has a nice 10 minute video that demonstrates how to use the new Intellitrace features of VS 2010 to enable DVR playback of your debug sessions. Make the VS 2010 IDE Colors look like VS 2008: Scott Hanselman has a nice blog post that covers the Visual Studio Color Theme Editor extension – which allows you to customize the VS 2010 IDE however you want. How to understand your code using Dependency Graphs, Sequence Diagrams, and the Architecture Explorer: Jennifer Marsman has a nice blog post describes how to take advantage of some of the new architecture features within VS 2010 to quickly analyze applications and legacy code-bases. How to maintain control of your code using Layer Diagrams: Another great blog post by Jennifer Marsman that demonstrates how to setup a “layer diagram” within VS 2010 to enforce clean layering within your applications.  This enables you to enforce a compiler error if someone inadvertently violates a layer design rule. Collapse Selection in Solution Explorer Extension: Useful VS 2010 extension that enables you to quickly collapse “child nodes” within the Visual Studio Solution Explorer.  If you have deeply nested project structures this extension is useful. Silverlight and Windows Phone 7 Building a Simple Windows Phone 7 Application: A nice tutorial blog post that demonstrates how to take advantage of Expression Blend to create an animated Windows Phone 7 application. If you haven’t checked out my Windows Phone 7 Twitter Tutorial I also recommend reading that. Hope this helps, Scott P.S. If you haven’t already, check out this month’s "Find a Hoster” page on the www.asp.net website to learn about great (and very inexpensive) ASP.NET hosting offers.

    Read the article

  • The Rise of NoSQL Databases

    The NoSQL concept has been attracting a lot of attention in recent years, primarily due to big-name production implementations. Too many SQL Servers to keep up with?Download a free trial of SQL Response to monitor your SQL Servers in just one intuitive interface."The monitoringin SQL Response is excellent." Mike Towery.

    Read the article

  • Trouble setting IE8 browser mode to IE7

    - by deostroll
    Inspite of putting the following meta tag I am not getting the expected result: <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" > I open the developer tool window. In the same bar where the menu appears there is an item called Browser Mode: it still shows IE 8 by default. Even doing document.documentMode in the console window shows "8". Am I doing anything wrong?

    Read the article

  • DirectShow.NET opening any file that Windows Media Player can open

    - by vucetica
    Here is a code snippet from DirectShowNet library, used to open a video file: this.graphBuilder = (IGraphBuilder) new FilterGraph(); // Have the graph builder construct its the appropriate graph automatically hr = this.graphBuilder.RenderFile(filename, null); but the RenderFile method fails. At the same time, Windows Media Player opens the same file nicely. What can be the problem. I got the same behavior without DirectShowNet, but using native C++ code...

    Read the article

  • Flash, parameters, security

    - by Quandary
    Hi, I have a question: In Flash, I have the ability to save certain info onto the server. Now the problem is the user needs to be authenticated as admin in order to do so. I can't use sessions, since if you work longer than 20 minutes in the Flash application, the session is gone. The way I see it, I have 2 possibilities: 1. passing a parameter (bIsAdmin) to Flash from the Website. 2. Launch a http-get request, to get this value (bIsAdmin) from an ashx handler on application startup, when the session has not yet exired. In my opinion, both possibilities are not really secure... So, Which one is safer, 1 or 2? Or does anybody have a better idea ? In my opinion, 1 is safer, because with 2, you can just switch a packet tamperer in between, and bang, you're admin, with permission to save (or overwrite, =delete) anything.

    Read the article

  • mercurial: less duplication in hgrc file

    - by zaharpopov
    Hi there. I have using Hg for some projects on my google code hosting. For each projects I set in [auth] section of .hgrc the username/password to push without every asking for password. But it is lots of duplication like: [auth] proj1.prefix = ... 111 proj1.username = google code username proj1.password = google code password proj2.prefix = ... 222 proj2.username = google code username proj2.password = google code password Can this somehow be doing with less duplications? Maybe set variable in hgrc and refer to it from all username/password lines? Thanks in advance for your help

    Read the article

  • click event launched only once problem

    - by user281180
    I have a form in which I have many checkboxes. I need to post the data to the controller upon any checkbox checked or unchecked, i.e a click on a checbox must post to the controller, and there is no submit button. What will be the bet method in this case? I have though of Ajax.BeginForm and have the codes below. The problem im having is that the checkbox click event is being detected only once and after that the click event isnt being launched. Why is that so? How can I correct that? <% using (Ajax.BeginForm("Edit", new AjaxOptions { UpdateTargetId = "tests"})) {%> <div id="tests"> <%Html.RenderPartial("Details", Model); %> </div> <input type="submit" value="Save" style="Viibility:hidden" id="myForm"/> <%} %> $(function() { $('input:checkbox').click(function() { $('#myForm').click(); }); });

    Read the article

  • config.cache_classes = true in production mode has problems in IE

    - by techno_log
    Hi Dears, In my rails app. I am using link_to_function to bring an ajax tabs in one page.Everything works fine in Moazilla and other browsers. But in IE the tabs are not loading only when the server is started in production mode(doesn't matter whether its webrick or mongrel). In development mode everything is fine. So I figured out that the issue was with one line config.cache_classes = true in app/config/environments/production.rb when i changed the above code to config.cache_classes = false everything works fine. So I assume caching causes problem in rails. When I Googled about this I found many have the issues with caching. So my question is 1) is there any other fix for this? 2) Does this fix (config.cache_classes = false) causes any performance issues. If then how to overcome that? Any comments and suggestions are welcome. Techno_log

    Read the article

< Previous Page | 19 20 21 22 23 24 25 26 27 28 29 30  | Next Page >