Daily Archives

Articles indexed Thursday April 29 2010

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

  • PHP CURL Google Calendar using Private URL

    - by MooCow
    I'm trying to get an array of events from Google Calendar using the Private URL. I read the Google API document but I want to try doing this without using the ZEND library since I have no idea what the eventual server file structure is and avoid having other people edit the codes. I also did a search before posting and ran into the same condition where PHP CURL_EXEC returns false with the URL but I get a JSON file if the URL is open using a web browser. Since I'm using the Private URL, do I really need to authenticate against the Google server using ZEND? I'm trying to have PHP clean up the array before encoding it for Flash. $URL = <string of the private URL from Google Calendar> $ch = curl_init($URL); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $data = curl_exec($ch); curl_close($ch); $result = json_decode($data); print '<pre>'.var_export($data,1).'</pre>'; Screen output >>> false

    Read the article

  • Winrar sfx deletes files too early

    - by Simon Ottenhaus
    I'm trying to build a sfx (self extracting archive) using winrar. I'm using VS2008 to build a setup.exe and a myapp.msi. If setup.exe is executed it does some checking an launches myapp.msi I'm using some sfx options to make the extraction quiet and make it extract so some temp folder: ;Der folgende Kommentar enthält SFX-Skriptbefehle Setup=setup.exe TempMode Silent=2 Overwrite=1 It seems winrar deletes the msi right after setup.exe is launched. Setup.exe can't find the msi and crashes. Is there some way to fix this?

    Read the article

  • make_tuple with boost::python under Visual Studio 9

    - by celil
    Trying to build the following simple example #include <boost/python.hpp> using namespace boost::python; tuple head_and_tail(object sequence) { return make_tuple(sequence[0],sequence[-1]); } available here, I end up with this compilation error under Visual Studio 9 error C2668: 'boost::python::make_tuple' : ambiguous call to overloaded function 1> C:\Program Files\boost_1_42_0\boost/python/detail/make_tuple.hpp(22): could be 'boost::python::tuple boost::python::make_tuple<boost::python::api::object_item,boost::python::api::object_item>(const A0 &,const A1 &)' 1> with 1> [ 1> A0=boost::python::api::object_item, 1> A1=boost::python::api::object_item 1> ] 1> C:\Program Files\boost_1_42_0\boost/tuple/detail/tuple_basic.hpp(802): or 'boost::tuples::tuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9> boost::tuples::make_tuple<boost::python::api::object_item,boost::python::api::object_item>(const T0 &,const T1 &)' [found using argument-dependent lookup] 1> with 1> [ 1> T0=boost::python::api::proxy<boost::python::api::item_policies>, 1> T1=boost::python::api::proxy<boost::python::api::item_policies>, 1> T2=boost::tuples::null_type, 1> T3=boost::tuples::null_type, 1> T4=boost::tuples::null_type, 1> T5=boost::tuples::null_type, 1> T6=boost::tuples::null_type, 1> T7=boost::tuples::null_type, 1> T8=boost::tuples::null_type, 1> T9=boost::tuples::null_type 1> ] Is this a bug in boost::python, or am I doing something wrong? How can I get the above program to compile?

    Read the article

  • jQuery validation plugin , add custom method

    - by Eatdoku
    Hi, I am trying to add a method that validate a field to see if it contains a number value. so this is what i did, however it is not doing the check for me. anyone has any idea? thanks $(document).ready(function() { $.validator.addMethod('positiveNumber', function(value) { return Number(value) > 0; }, 'Enter a positive number.'); }); and jQuery('form').validate(); jQuery('.validateFieldToCheck').rules('add', { positiveNumber:, messages: { required: 'Field must contain a number.' } });

    Read the article

  • Passing data to Winforms UI using BeginInvoke

    - by Bi
    I am a C# newbie and have a class that needs to pass row information to a grid in the windows form. What is the best way to do it? I have put in some example code for better understanding. public class GUIController { private My_Main myWindow; public GUIController( My_Main window ) { myWindow = window; } public void UpdateProducts( List<myProduct> newList ) { object[] row = new object[3]; foreach (myProduct product in newList) { row[0] = product.Name; row[1] = product.Status; row[2] = product.Day; //HOW DO I USE BeginInvoke HERE? } } } And the form class below: public class My_Main : Form { //HOW DO I GO ABOUT USING THIS DELEGATE? public delegate void ProductDelegate( string[] row ); public static My_Main theWindow = null; static void Main( ) { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); theWindow = new My_Main(); Application.Run(theWindow); } private void My_Main_Load( object sender, EventArgs e ) { /// Create GUIController and pass the window object gui = new GUIController( this ); } public void PopulateGrid( string[] row ) { ProductsGrid.Rows.Add(row); ProductsGrid.Update(); } }

    Read the article

  • How to use Cassandra's Map Reduce with or w/o Pig?

    - by UltimateBrent
    Can someone explain how MapReduce works with Cassandra .6? I've read through the word count example, but I don't quite follow what's happening on the Cassandra end vs. the "client" end. https://svn.apache.org/repos/asf/cassandra/trunk/contrib/word_count/ For instance, let's say I'm using Python and Pycassa, how would I load in a new map reduce function, and then call it? Does my map reduce function have to be java that's installed on the cassandra server? If so, how do I call it from Pycassa? There's also mention of Pig making this all easier, but I'm a complete Hadoop noob, so that didn't really help. Your answer can use Thrift or whatever, I just mentioned Pycassa to denote the client side. I'm just trying to understand the difference between what runs in the Cassandra cluster vs. the actual server making the requests.

    Read the article

  • Hosts file resetting on Windows 7

    - by Simon
    Recently I've noticed my hosts file resetting itself. D:\Windows\System32\drivers\etc (OS installed on D drive) First time it reset it to the default, and now for the first time its completely disappeared after installing a whole bunch of updates. I don't have any virus protection other than Microsoft's Security Essentials. What's going on???

    Read the article

  • jQuery and function scope

    - by Jason
    Is this: ($.fn.myFunc = function() { var Dennis = function() { /*code */ } $('#Element').click(Dennis); })(); equivalent to: ($.fn.myFunc = function() { $('#Element').click(function() { /*code */ }); })(); If not, can someone please explain the difference, and suggest the better route to take for both performance, function reuse and clarity of reading. Thanks!

    Read the article

  • Hibernate: How do I link a subclass to its superclass?

    - by Markus
    Hey there! I'm having a little problem setting up my webshop project. Thing is, I have a User() superclass and two subclasses, PrivateUser and BusinessUser. Now, I'm not quite sure how to get my head around storing this relationship via hibernate. For the purpose of this question, the User() class contains only one field: String address; the PrivateUser contains: String firstName; and the BusinessUser contains: String CompanyName; Each field has its getter and setter. As is right now, I would only store and be able to get firstName and companyName. When I fetch a user from my DB using Hibernate I would get a PrivateUser/BusinessUser with a null address. Bottom line is, could someone point me towards a useful tutorial or better yet show a similar example code? Thanks!

    Read the article

  • Jquery Livesearch with quicksilver plugin to include not just the <li>s

    - by 133794m3r
    Ok, what i'm trying to do here is to make the exact code found here here ordered list and make it so that it doesn't just not work when i try to add additional elements into the list. Also i'm planning on using the more effecient one linked to at the end but i cannot put it here so you'll have to find that link on your own sadly. Since i'm trying to use this for a knowledge base page i want to allow people to be able to search through the items on the page and go to the proper part(ie loading it into the viewing area) but it's not letting me even include a simple anchor in there. if there is anyway to do something similar or to edit it so that it'll include everything within the <li> that'd be great. I don't know if anyone out there has done something like this before, but if they have and wouldn't mind sharing the code with me i'd be extremely happy. If no one has but does know how to make it include everything within the <li> including text also a great thing to have. I imagine that i won't be the only person out there in this world with my exact query.

    Read the article

  • Putting a django login form on every page

    - by asciitaxi
    I'd like the login form (AuthenticationForm from django.contrib.auth) to appear on every page in my site if the user is not logged in. When the user logs in, they will be redirected to the same page. If there is an error, the error will be shown on the same page with the form. I suppose you'd need a context processor to provide the form to every template. But, then you'd also need every view to handle the posted form? Does this mean you need to create some middleware? I'm a bit lost. Is there an accepted way of doing this?

    Read the article

  • Refernce platform specific System.Data.SQLite

    - by Dmitriy Nagirnyak
    Hi, I am using SQLite for the unit testing and might use it as a database for local development/staging. The System.Data.SQLite has basically 2 versions: x86 and x64. Correct one should be used for the specific platform. I have 64 bit Win7, other guys in the team might use 32-bit OSs. The server's platform is not known at this stage. If I use 32-bit version of the assembly on 64-bit platform I get BadImageFormatException: Could not load file or assembly 'System.Data.SQLite'. I believe similar will happen trying to use 64-bit assembly on 32-bit platform. So my question is what is the best way to reference the SQLite assembly so that it does not depend on the platform and people can just use it? It is ok to use 32-bit version of assembly on a 64-bit platform (Maybe there is a switch for that somewhere?). Thanks, Dmitriy.

    Read the article

  • Integrating a ClickOnce app with Outlook

    - by AngryHacker
    I have a ClickOnce app that used to be run by users with Power User privileges. So to integrate to outlook (e.g. syncing of emails, appointments and addresses) I used a 3rd party component from Add-In Express, which includes an ActiveX DLL. So when the user would download my app, I'd register the ActiveX DLL (if it wasn't already registered) and then would just interop with it in the application. Well, now the users had their privileges changed to standard limited User. Which means that they can't register DLLs (since it writes to the registry keys that are off limit). And the integration with Outlook fails, of course. What are some of options to integrate with Outlook for my situation?

    Read the article

  • WPF DataGrid binding to UserControl

    - by Trindaz
    I have a DataGrid with one column using a UserControl via a styled DataGridTemplateColumn. I can't seem to get the UserControl to 'see' the object that is in it's containing DataGridCell though. What kind of bindings can I create on the TextBox in my UserControl so that it can look up and see that object?! My UserControl and TemplateColumn Style are defined as: <Window.Resources> <local:UCTest x:Key="UCTest" /> <Style x:Key="TestStyle" TargetType="{x:Type WpfToolkit:DataGridCell}"> <Style.Setters> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type WpfToolkit:DataGridCell}"> <Grid Background="{Binding RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource drc}, Path=DataContext}"> <Grid.ColumnDefinitions> <ColumnDefinition/> <ColumnDefinition/> </Grid.ColumnDefinitions> <local:UCTest /> </Grid> </ControlTemplate> </Setter.Value> </Setter> </Style.Setters> </Style> </Window.Resources> and my sample DataGrid is defined as: <WpfToolkit:DataGrid Name="dgSampleData" ItemsSource="{Binding}" AutoGenerateColumns="True" Margin="0,75,0,0"> <WpfToolkit:DataGrid.Columns> <WpfToolkit:DataGridTemplateColumn Header="Col2" CellStyle="{StaticResource TestStyle}" /> </WpfToolkit:DataGrid.Columns> </WpfToolkit:DataGrid> and my User Control is defined in a separate file as: <UserControl x:Class="UCTest" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:local="clr-namespace:WpfApplication1" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Width="104" Height="51"> <UserControl.Resources> <local:DataRowConverter x:Key="drc" /> </UserControl.Resources> <Grid> <TextBox Margin="12,12,-155,16" Name="TextBox1" Text="" /> </Grid> EDIT: My implementation of TestClass, which has the Test Property, which I want UCTest.TextBox1 to bind do: Public Class TestClass Private _Test As String = "Hello World Property!" Public Property Test() As String Get Return _Test End Get Set(ByVal value As String) _Test = value End Set End Property End Class Thanks in advance!

    Read the article

  • Why Does the iPad Toolbar Refuse to Reappear When Orientation Changes?

    - by dugla
    I have a fullscreen OpenGL iPad app that behaves correctly for all orientation changes. I now want to add a UIToolbar programmatically and while it appears correctly in launch orientation - portrait in the Xcode simulator - it dissapears when the orientation changes to landscape. Change the orientation back to portrait and the Toolbar reapppears. Huh? - (void)loadView { NSLog(@"EAGL ViewController - load View"); CGRect frame = [[UIScreen mainScreen] applicationFrame]; EAGLView *eaglView = [[[EAGLView alloc] initWithFrame:frame] autorelease]; self.view = eaglView; [[NSBundle mainBundle] loadNibNamed:@"Toolbar" owner:self options:nil]; NSLog(@"%@", [[self.toolbar class] description]); [self.view addSubview:self.toolbar]; [self.view bringSubviewToFront:self.toolbar]; } What have I failed to do here? Thanks, Doug

    Read the article

  • Can't see images used in slideshow or other jQuery plug-ins in Internet Explorer 8

    - by Kais
    I am getting a weird error. I can see images in slideshow, lightbox, etc. in Firefox and Chrome but in Internet Explorer 8 there are no images. Something is wrong with JavaScript/jQuery I think. I am using jQuery 1.4.2, jquery.flow.1.2.min.js jquery.bgpos.js jquery.easing.1.3.js jquery.lightbox-0.5.min.js jquery.validate.js cufon-yui.js jquery.galleriffic.js DD_belatedPNG.js clearbox.js Please check this. I have pasted images under slideshow, you can see those at http://kaisweb.com/projects/resume/ and http://kaisweb.com/projects/resume/index.php?p=templates. I tried to search but couldn't find anything. Even if I remove jQuery, still there are no images in Internet Explorer 8.

    Read the article

  • Some questions about line-height.........

    - by metal-gear-solid
    what is default line-height of browsers like font-size is 16px? for which HTML elements i should define line-height and for which not? What is the reason behind to give line-height to body { } ? Will line-height effect to single line text? If I'm using font in em then should i also use use line-height in em? What is co-relation between line-height and font-size?

    Read the article

  • Reverting a single file to a previous version in git

    - by georgeliquor
    Is there a way to go through different commits on a file. Say I modified a file 5 times and I want to go back to change 2, after I already committed and pushed to a repository. In my understanding the only way is to keep many branches, have I got that right? If I'm right I'm gonna have hundreds of branches in a few days, so I'm probably not understanding it really. Could anyone clear that up please?

    Read the article

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