Daily Archives

Articles indexed Tuesday March 23 2010

Page 9/130 | < Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >

  • fullCalendar json with php in "agendaWeek"

    - by Dennis
    <link rel='stylesheet' type='text/css' href='fullcalendar/redmond/theme.css' /> <link rel='stylesheet' type='text/css' href='fullcalendar/fullcalendar.css' /> <script type='text/javascript' src='fullcalendar/jquery/jquery.js'></script> <script type='text/javascript' src='fullcalendar/jquery/ui.core.js'></script> <script type='text/javascript' src='fullcalendar/jquery/ui.draggable.js'></script> <script type='text/javascript' src='fullcalendar/jquery/ui.resizable.js'></script> <script type='text/javascript' src='fullcalendar/fullcalendar.min.js'></script> <script type='text/javascript'> $(document).ready(function() { $('#calendar').fullCalendar({ theme: true, editable: false, weekends: false, allDaySlot: false, allDayDefault: false, slotMinutes: 15, firstHour: 8, minTime: 8, maxTime: 17, height: 600, defaultView: 'agendaWeek', events: "json_events.php", loading: function(bool) { if (bool) $('#loading').show(); else $('#loading').hide(); } }); }); </script> But the informaion will not show up on the "agendaWeek". Can anyone tell me what I am doing wrong. My "json_events.php" code is: <?php $year = date('Y'); $month = date('m'); echo json_encode(array( array( 'id' => 111, 'title' => "Event1", 'start' => "$year-$month-22 8:00", 'end' => "$year-$month-22 12:00", 'url' => "http://yahoo.com/" ), array( 'id' => 222, 'title' => "Event2", 'start' => "$year-$month-22 14:00", 'end' => "$year-$month-22 16:00", 'url' => "http://yahoo.com/" ) )); ?> And it out puts the following: [{"id":111,"title":"Event1","start":"2010-03-22 8:00","end":"2010-03-22 12:00","url":"http:\/\/yahoo.com\/"},{"id":222,"title":"Event2","start":"2010-03-22 14:00","end":"2010-03-22 16:00","url":"http:\/\/yahoo.com\/"}] Please if anyone can help or suggest someone to help me. Thanks, Dennis

    Read the article

  • CSS styles are not applied to elements added to JavaFX component tree

    - by pazabo
    I have applied CSS style to JavaFX components and it looks like everything is working fine except one situation: when I add JavaFX components to component tree on-the-fly their CSS styles are not applied. For example following code: package test; import javafx.stage.Stage; import javafx.scene.Scene; import javafx.scene.shape.Rectangle; import javafx.scene.input.MouseEvent; import javafx.util.Math; import javafx.scene.paint.Color; function getRect(): Rectangle { return Rectangle { x: 230 * Math.random() y: 60 * Math.random() width: 20, height: 20 styleClass: "abc" } } def stage: Stage = Stage { scene: Scene { width: 250, height: 80 stylesheets: "{__DIR__}main.css" content: [ Rectangle { x: 0, y: 0, width: 250, height: 80 fill: Color.WHITE onMouseClicked: function (evt: MouseEvent): Void { insert getRect() into stage.scene.content; } } getRect() ] } } with following stylesheet: .abc { fill: red; } in main.css file (both in test package) display red square on white background, but after clicking the main rectangle black (not red) squares are added to scene. I noticed that: Components added dynamically look just like style information was not applied. If you set their style in JavaFX code then everything works fine. After changing stylesheets property (so that it points to another valid stylesheet) the objects already added render properly. Does anyone know the solution to this problem? I could of course put all the properties into JavaFX code or provide another stylesheet (for every existing stylesheed) that would contain the same data and change stylesheet right after adding any component, but I would like to find some elegant solution. Thanks in advance.

    Read the article

  • InvalidOperationException in Default.aspx.cs

    - by zsharp
    I changed the default namespace of my solution and assembly name, but i still get an error that there is abiguity between these even though the latter namespace is no where to be found. NewName.Controllers.HomeController OldName.Controllers.HomeController

    Read the article

  • How to enlarge dynamically an UILabel (label and font size)?

    - by Flocked
    Hello, Im currently working on an iPhone project. I want to enlarge dynamically an UILabel in Objective-C like this: How is this possible? I thought I have to do it with CoreAnimation, but I didn't worked. Here is the code I tried: UILabel * fooL = //[…] fooL.frame = CGRectMake(fooL.frame.origin.x, fooL.frame.origin.y, fooL.frame.size.width, fooL.frame.size.height); fooL.font = [UIFont fontWithName:@"Helvetica" size:80]; [UIView beginAnimations:nil context:nil]; [UIView setAnimationCurve:UIViewAnimationCurveEaseIn]; [UIView setAnimationDelegate:self]; [UIView setAnimationDuration:0.5]; [UIView setAnimationBeginsFromCurrentState:YES]; fooL.font = [UIFont fontWithName:@"Helvetica" size:144]; //bigger size fooL.frame = CGRectMake(20 , 44, 728, 167); //bigger frame [UIView commitAnimations]; The problem with this code is that it doesn't change the fontsize dynamically.

    Read the article

  • How to Load Bing Map using Coordinates from Database?

    - by Lukasz
    I have latitude and longitude saved inside a database. I have the bing map loading and I can set the VELatLong using regular values but can't seem to be able to load them from the database. Whatever I try the map just doesn't show at all. <script type="text/javascript"> var map = null; var selStyle = VEMapStyle.Road; var selMode = VEMapMode.Mode2D; var zoom = 14; var latLon = new VELatLong(40.67959657544238, -73.94073486328126); // NYC, NY var locationPin = null; function GetMap() { map = new VEMap("myMap"); map.onLoadMap = InitialPin; map.SetCredentials("--KEY HERE--"); map.LoadMap(latLon, zoom, selStyle, false, selMode, false); map.AttachEvent("onclick", OnClick_PinHandler); } window.onload = GetMap; window.onunload = DisposeMap; </script> Thanks for your help!

    Read the article

  • How to access an array collection that within another?

    - by luiz
    Example, I have the field named city in the Customers table, and a table named cities I attach the table values town in the city, namely: city id = 15 sao paulo to cities It aims to do this, pulling the two array collection and then working in action script and putting the datagrid? Thanks in advance, ha days looking for the solution.

    Read the article

  • Detect user logout / shutdown in Python / GTK under Linux - SIGTERM/HUP not received

    - by Ivo Wetzel
    OK this is presumably a hard one, I've got an pyGTK application that has random crashes due to X Window errors that I can't catch/control. So I created a wrapper that restarts the app as soon as it detects a crash, now comes the problem, when the user logs out or shuts down the system, the app exits with status 1. But on some X errors it does so too. So I tried literally anything to catch the shutdown/logout, with no success, here's what I've tried: import pygtk import gtk import sys class Test(gtk.Window): def delete_event(self, widget, event, data=None): open("delete_event", "wb") def destroy_event(self, widget, data=None): open("destroy_event", "wb") def destroy_event2(self, widget, event, data=None): open("destroy_event2", "wb") def __init__(self): gtk.Window.__init__(self, gtk.WINDOW_TOPLEVEL) self.show() self.connect("delete_event", self.delete_event) self.connect("destroy", self.destroy_event) self.connect("destroy-event", self.destroy_event2) def foo(): open("add_event", "wb") def ex(): open("sys_event", "wb") from signal import * def clean(sig): f = open("sig_event", "wb") f.write(str(sig)) f.close() exit(0) for sig in (SIGABRT, SIGILL, SIGINT, SIGSEGV, SIGTERM): signal(sig, lambda *args: clean(sig)) def at(): open("at_event", "wb") import atexit atexit.register(at) f = Test() sys.exitfunc = ex gtk.quit_add(gtk.main_level(), foo) gtk.main() open("exit_event", "wb") Not one of these succeeds, is there any low level way to detect the system shutdown? Google didn't find anything related to that. I guess there must be a way, am I right? :/ EDIT: OK, more stuff. I've created this shell script: #!/bin/bash trap test_term TERM trap test_hup HUP test_term(){ echo "teeeeeeeeeerm" >~/Desktop/term.info exit 0 } test_hup(){ echo "huuuuuuuuuuup" >~/Desktop/hup.info exit 1 } while [ true ] do echo "idle..." sleep 2 done And also created a .desktop file to run it: [Desktop Entry] Name=Kittens GenericName=Kittens Comment=Kitten Script Exec=kittens StartupNotify=true Terminal=false Encoding=UTF-8 Type=Application Categories=Network;GTK; Name[de_DE]=Kittens Normally this should create the term file on logout and the hup file when it has been started with &. But not on my System. GDM doesn't care about the script at all, when I relog, it's still running. I've also tried using shopt -s huponexit, with no success. EDIT2: Also here's some more information aboute the real code, the whole thing looks like this: Wrapper Script, that catches errors and restarts the programm -> Main Programm with GTK Mainloop -> Background Updater Thread The flow is like this: Start Wrapper -> enter restart loop while restarts < max: -> start program -> check return code -> write error to file or exit the wrapper on 0 Now on shutdown, start program return 1. That means either it did hanup or the parent process terminated, the main problem is to figure out which of these two did just happen. X Errors result in a 1 too. Trapping in the shellscript doesn't work. If you want to take a look at the actual code check it out over at GitHub: http://github.com/BonsaiDen/Atarashii

    Read the article

  • Binding, Prefixes and generated HTML

    - by Vman
    MVC newbie question re binders. Supposing I have two strongly typed partial actions that happen to have a model attributes with the same name, and are rendered in the same containing page i.e.: Class Friend {string Name {get; set ;} DateTime DOB {get; set ;}} Class Foe {string Name {get; set ;} string ReasonForDislike {get; set ;}} Both partials will have a line: <%= Html.TextBoxFor(model => model.Name) %> And associated controller actions: public ActionResult SaveFriend(Friend friend) public ActionResult SaveFoe(Foe foe) My problem is that both will render on my containing page with the same id (of course, bad for lots of reasons). I’m aware of the [Bind] attribute that allows me add a prefix, resulting in code: public ActionResult SaveFriend([Bind(Prefix = “friend”)] Friend friend) <%= Html.TextBox("friend.Name", Model. Name) %> //Boo, no TextBoxFor :( But this still doesn’t cut it. I can just about tolerate the loss of the strongly typed TextBoxFor helpers but I’ve yet to get clientside validation to work with prefixes: I’ve tried: <%= Html.ValidationMessage("friend.Name") %> ...and every other variant I can think of. I seem to need the model to be aware of the prefix in both directions but bind only applies when mapping the inbound request. It seems (to me) a common scenario but I’m struggling to find examples out there. What am I missing! Thanks in advance.

    Read the article

  • MP3 Encoding in Java

    - by Mohit Nanda
    I need an OpenSource API in Java, which can encode *.wav and *.au formats to MP3, and vice-versa. Have evaluated Java Sound API, and LameOnJ, but they dont meet the requirements and aint stable, respectively. Please suggest one that is free, and platform independent.

    Read the article

  • Which knowledge base/rule-based inference engine to choose for real time Runway incursion prevention

    - by Piligrim
    Hello, we are designing a project that would listen to dialog between airport controllers and pilots to prevent runway incursions (eg. one airplane is taking off while other is crossing the runway). Our professor wants us to use Jena for knowledge base (or anything else but it should be some sort of rule-based engine). Inference is not the main thing in Jena and there's not much documentation and examples of this. So we need an engine that would get messages from pilots as input and output possible risks of incursion or any other error in message protocol. It should be easy to write rules, and should be easy to provide engine with real time data. I image it something like this: A pilot sends a message that he lands on some runway, the system remembers that the runway is busy and no one should cross it If someone is given an instruction to cross this runway, the engine should fire a rule that something is wrong When the pilot sends a message that he left the runway and goes to the gate, the system clears the runway and lets other planes to use it. So is Jena, or prolog or any other rules engine suitable for this? I mean it is suitable, but do we really need to use it? I asked the prof. if we could just keep state of the runway and use some simple checks based on messages we receive and he said that it is not scalable and we need the knowledge base. Can someone give me any advise on which approach to use for this system? If you recommend k.b., then which one should we use? The project is written in java. Thank you.

    Read the article

  • Platform Builder: Building Cloned Code from Multiple OS Versions

    - by Bruce Eitman
    My career goal is to delete more code than I write, and so far I have been fairly successful. But of course once in a while I need to clone code from the public tree which is contrary to my goal. Usually what follows is a new OS release. To help reach my goal, my team uses the same BSP code for multiple versions of the OS. That means that we need to handle the cloned code so that the correct code builds for the OS version that we are working on. To handle this we could use SKIPBUILD in the sources file, but that gets messy if the cloned code contains multiple folders. The solution that we use is to have a parent folder with subfolders that contain the OS version number. Example: PM |-PM500 |-PM600 |-PM700 The version number corresponds to the environment variable _WINCEOSVER. Then we have a simple DIRS file in the parent folder: DIRS=PM$( _WINCEOSVER) Which automatically selects the folder that goes with the OS version that we are building.   Copyright © 2010 – Bruce Eitman All Rights Reserved

    Read the article

  • Dell OpenManage Causing Periodic Slowness

    - by Zorlack
    Today we diagnosed the cause of a Periodic slowness issue: see here. Dell OpenManage Server Administrator seems to have been causing hourly slowness. It would occasionally peg one of the CPUs for upwards of two minutes. Disabling it drastically improved the performance of the SQL Server. The server hardware: Dell R710 Dual Quad Core 2.9GHz Processors 96GB Memory 2 Disk RAID 1 SAS System Disk (Internal) 4 Disk RAID 10 SAS Log Disk (Internal) 14 Disk RAID 10 SAS Data Disk (External DAS MD1000) Windows 2008 Enterprise R2 x64 We installed the OS using Dell OpenManage Server Assistant, so I assume that it was correctly configured. For now we have disabled OMSA to alleviate the performance issues it was causing, but I'd like to be able to re-enable it. Has anyone had a similar experience that can shed a little light on the nature of this problem?

    Read the article

  • CentOS - massive usage on loopback interface

    - by Matthew Iselin
    Hi, I have a CentOS installation which is running fairly smoothly. Today I ran ifconfig mainly to see what sort of usage has been coming across the ethernet interface, and to also check my link speed. This is what I ended up seeing for the loopback device: lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:10301085132061223274 errors:0 dropped:0 overruns:0 frame:0 TX packets:13981054163812689233 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:11783901785008000095 (0.6 EiB) TX bytes:10333501021200548281 (0.9 EiB) This just feels completely wrong - almost an EiB of data? Any assistance in tracking down the source of these statistics would be greatly appreciated.

    Read the article

  • MacBook's Airport not working from menu bar

    - by not22
    All of the sudden my MacBook doesn't connect to my wireless after waking from sleep. My network shows up at full signal strength and it remembers the password correctly, but I get an error message when I try to connect from the menu bar. The only way I can get on the internet is to go through Network Diagnostics and turn it on there. I don't understand why it works every time through Network Diagnostics and never on it's own or through the airport menu bar. Nothing has been changed or installed or reset on my computer that I know of. Restarting doesn't fix it, nor does turning off the airport card. Any ideas?

    Read the article

  • Quick way to convert Excel sheet to XML

    - by nute
    How do you easily convert an excel file into a XML file? When trying to save as an XML File, it complains that the file does not have an XML mapping. Clicking help brings up pretty complicated stuff about XML Mapping file, XLD and some other acronyms. Why is it so complicated? Lately I've realized that tab delimited, CSV and others are prone to formating issues (comas in a field, new lines, quotes, ...). So I think that XML is a better way to process excel data. Please advise. Maybe a freeway tool?

    Read the article

  • Add a link to a JQueryUI autocomplete item

    - by Tordek
    When a user starts typing on the searchbox, the suggestion page returns the latest item from all collections matching that nama, plus other data. I'd like to show that item (along its image), and a link to "see all items from this collection". I can do (most of) that with the following code: $('#search').autocomplete({ source: function (request, response) { $.ajax({ url: suggesturl, dataType: 'json', data: request, success: function (data) { response(data.map(function (value) { return { 'label': '<img src="' + value.thumbsmall + '" />' + value.name + '<a href="/">More items from this collection...</a>', 'value': value.fullname }; })); } }); }, minLength: 3 }) The problem is that, although the link appears in the box, when it's clicked it gets ignored, and the default select action is executed (the item's value is put into the textbox).

    Read the article

  • Understanding Twitter API's "Cursor" parameter

    - by Adam
    I don't really get how to use the Curesor parameter in Twitter's API, for an exmaple - here. Am I supposed to make a new API call for each 100 followers? I'd love it if someone could provide a PHP example for getting a full list of followers assuming I have more than 100... Thanks in advance!

    Read the article

  • ASPxGridView POST timeout

    - by Jo Asakura
    Hello all, I have a ASPxGridView with DetailRow in this row there are three additional ASPxGridViews. Each detail ASPxGridView contains EmptyDataRow templates with link to create a new row: <a href="javascript:gridViewDetails1.AddNewRow();">AddNewRecord</a> When master ASPxGridView rows is 1 or 2 then new rows in detail grids adding fine, but if in master ASPxGridView rows about 10 or more then when I clicking on detail grids link to add new row the loading panel appers for unlimited time and FireBug-Net shows that status of POST is timeout and time is about 1 sec. How can I repair it? To AGoodDisplayName: are the detail row gridviews bound to anything? yes of course, inside the details row of master gridView there are 3 another gridView and each of them have a separate ObjectDataSource. Are you expanding more than row at a time? No, I have only one row at time: AllowOnlyOneMasterRowExpanded="true" Can we see some of the mark up? Yep: <asp:ObjectDataSource ID="dsMaster" runat="server" TypeName="..." SelectMethod="..."> </asp:ObjectDataSource> <dxwgv:ASPxGridView ID="gridViewMaster" ClientInstanceName="gridViewMaster" runat="server" DataSourceID="dsMaster"> <Templates> <DetailRow> <%--first of details gridView--%> <asp:ObjectDataSource ID="dsDetail1" runat="server" TypeName="..." SelectMethod="..."> </asp:ObjectDataSource> <dxwgv:ASPxGridView ID="gridViewDetail1" ClientInstanceName="gridViewDetail1" runat="server" DataSourceID="dsDetail1"> <Templates> <EmptyDataRow> <a href="javascript:gridViewDetail1.AddNewRow();">AddNewRecord</a> </EmptyDataRow> </Templates> </dxwgv:ASPxGridView> <%--next others detail gridViews--%> </DetailRow> </Templates> </dxwgv:ASPxGridView>

    Read the article

  • Showing a Captcha popup after failed login.

    - by thinker07
    I have created two asp.net pages, if x times the login fails, I want to call the captcha page (second page) in a popup window. How do I automatically call the second page as a popup window in the first page without using a hyperlink button? Are there any tutorials?

    Read the article

  • Using SSIS Web Service Task with WCF

    - by Omri
    Hello, I am using SQL Server 2008 SSIS for importing data to the DB and .Net 3.5 SP1 for Creating the WCF service. In the import task I am trying to use the Web Service Task to report to a WCF service. At first I encountered a problem with the WCF WSDL, the Web Service task couldn't get their code generated from the metadata exposed by the WCF service. So I found a blog post at Christian Weyer's Blog talking just about that. Now after I can successfully load a WCF service to the Web Service Task and get the functions generated just fine from the WSDL I encountered another problem. I get an error from the SSIS package at runtime saying that "Method 'ProxyNamespace.MyService.GetData' not found." The full Error is: Error: 0xC002F304 at Web Service Task False, Web Service Task: An error occurred with the following error message: "Microsoft.SqlServer.Dts.Tasks.WebServiceTask.WebserviceTaskException: Could not execute the Web method. The error is: Method 'ProxyNamespace.MyService.GetData' not found.. at Microsoft.SqlServer.Dts.Tasks.WebServiceTask.WebMethodInvokerProxy.InvokeMethod(DTSWebMethodInfo methodInfo, String serviceName, Object connection) at Microsoft.SqlServer.Dts.Tasks.WebServiceTask.WebServiceTaskUtil.Invoke(DTSWebMethodInfo methodInfo, String serviceName, Object connection, VariableDispenser taskVariableDispenser) at Microsoft.SqlServer.Dts.Tasks.WebServiceTask.WebServiceTask.executeThread()". I know that the simple solution is going back to regular Web Service, but I really don't want to go there. Thanks, Omri.

    Read the article

  • SQL Query Not Functioning - No Error Message

    - by gamerzfuse
    // Write the data to the database $query = "INSERT INTO staff (name, lastname, username, password, position, department, birthmonth, birthday, birthyear, location, phone, email, street, city, state, country, zip, tags, photo) VALUES ('$name', '$lastname', '$username', '$password', '$position', '$department', '$birthmonth', '$birthday', '$birthyear', '$location', '$phone', '$email', '$street', '$city', '$state', '$country', '$zip', '$tags', '$photo')"; mysql_query($query); var_dump($query); echo '<p>' . $name . ' has been added to the Employee Directory.</p>'; if (!$query) { die('Invalid query: ' . mysql_error()); } Can someone tell me why the above code produced: string(332) "INSERT INTO staff (name, lastname, username, password, position, department, birthmonth, birthday, birthyear, location, phone, email, street, city, state, country, zip, tags, photo) VALUES ('Craig', 'Hooghiem', 'sdf', 'sdf', 'sdf', 'sdf', '01', '01', 'sdf', 'sdf', '', 'sdf', 'sdf', 'sd', 'sdf', 'sdf', 'sd', 'sdg', 'leftround.gif')" Craig has been added to the Employee Directory. But does not actually add anything into the database table "staff" ? I must be missing something obvious here.

    Read the article

  • Lightweight .NET web development?

    - by Breck Fresen
    Fellow stack overflowers, I'm currently working on a project that has a sizable amount of both client and web code. The client code is written in C# and the web piece is written in PHP. Maintaining consistency between the two worlds is becoming cumbersome, and I want consolidate the web code to .Net. The issue is that I hate web development in ASP.Net Web Forms. I want something as raw as PHP, just using C# instead. I've read a little about ASP.Net MVC, but it looks like it abstracts too much of the request logic for my liking. Does anyone know of a lightweight way to allow C# + .Net to handle web requests? Should I be looking more closely at MVC? Thanks in advance, -- Breck

    Read the article

  • Can you preload images in a dojo animation.

    - by asynchronous-challenged
    I have a dojo animation object of about 15 images. I'm also using dojo.fx.chain to link them all together. Right before I create all my dojo.fadeIn's and dojo.fadeOut's I added in some basic javascript to preload each image. My question is: Am I doing this the hard way or is there some function/attr I can set in the animation object to do this?

    Read the article

< Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >