Search Results

Search found 798 results on 32 pages for 'amy west'.

Page 25/32 | < Previous Page | 21 22 23 24 25 26 27 28 29 30 31 32  | Next Page >

  • Oracle MDM Panel at OOW 12: Best practices, Lessons Learned and More...

    - by Mala Narasimharajan
    By Narayana Machiraju  We are less than two weeks out from the start of Oracle Open World 2012. The MDM team has built-up a solid line-up of product and customer sessions for you to attend this year in addition to the hands-on labs, and numerous demonstration pods in Moscone West. This year we will be hosting a customer panel session dedicated to Oracle Customer Hub at Oracle Open World. An esteemed panel of Oracle Customer Hub customers in different Industries: Credit Suisse, Allianz and Elsevier will provide insight into the journey of Customer MDM right from building a business case and MDM vision, establishing and sustaining governance, implementation strategies and realizing the benefits. You will also hear about implementation challenges, phasing strategies and lessons learned from real-life experiences. If you are already implementing Customer MDM or evaluating the benefits of MDM and you would like to hear directly from our customers then I highly recommend you attend this session: Customer MDM Panel: Discussion and Q&A on Implementation Best Practices, Data Quality, Data Governance          and ROI Wednesday October, 3rd, 5:00PM - 6:00PM Westin Market Street Hotel - Metropolitan 1 The MDM track at Oracle Open World covers variety of topics related to MDM. In addition to the product management team presenting product updates and roadmap, we have several customer panels, Conference sessions and Customer round table sessions featuring a lot of marquee Customers. You can see an overview of MDM sessions here.  We hope to see you at Open World and stay in touch via our future blogs.

    Read the article

  • Network(ing) to the Limit

    - by Oracle OpenWorld Blog Team
     By Karen Shamban While Oracle OpenWorld attendees are networking, there's an Oracle Global IT team that builds and maintains the massive networks that help run the show. The objective? To keep things running as seamlessly and smoothly as possible, constantly evaluate priorities, mitigate risk, and be ready for whatever might happen -- because things do happen when there are 50,000 plus attendees, tens of thousands of devices, unexpected requirements, and a constant flow of up-to-the-minute information. Here's just some of what it takes to keep the conference going, network style: 100 Oracle network, voice, and desktop engineers; security, risk management, and other IT experts, who come in from 17 countries  1000+ network switches 300+ miles of copper and fiber 485 wireless access points 2,500 wired laptops 300 VoIP phones And just where are all these networks and devices deployed? This is what the team had to build and manage: Moscone North, South, and West, including: The keynote hall Oracle DEMOgrounds in the Exhibition Halls Hundreds of session rooms Connection Centers, Social Avenue, Lounges Registration The Howard Street Tent and Taylor Street Cafe tented venues Oracle Square (Union Square) Yerba Buena Gardens Masonic Auditorium Sessions and demos at 8 hotel venues That's a whole lot of networking going on. And here's the kicker: the team has only 4 days to bring get it all up and running across these many venues, and exactly 12 hours to take it all down once the show ends. The Global IT team puts in the equivalent of 152 24-hour days for set-up, 227 24-hour days of support during the conferences, and then tears it all down in about 20 24-hour days. And in case you were wondering, the planning for next year's Oracle OpenWorld starts ... next week. No rest for the weary.  Now THAT's networking!  So hats off to the Global IT team -- the job ain't easy, but somebody's got to do it, and they do it remarkably well.

    Read the article

  • Swing button repaint issue

    - by KáGé
    Hello, I'm new to java and I have to get a school project done by Sunday and got a problem. Here's the code: private abstract class GamePanel { JPanel panel = null; } private class PutPanel extends GamePanel { JButton putShip1 = new JButton(""); JButton putShip2 = new JButton(""); JButton putShip3 = new JButton(""); JButton putShip4 = new JButton(""); ShipDirection ship1Direction = ShipDirection.NORTH; ShipDirection ship2Direction = ShipDirection.NORTH; ShipDirection ship3Direction = ShipDirection.NORTH; ShipDirection ship4Direction = ShipDirection.NORTH; JButton startButton = new JButton("Start game"); public PutPanel(){ this.panel = new JPanel(); panel.setSize(200, Torpedo.session.map.size*Field.buttonSize+300); panel.setBackground(Color.blue); putShip1.setSize(90, 90); putShip1.setLocation(55, 5); putShip1.setIcon(createImageIcon(Torpedo.session.map.shipPath+"/ship1/full_north.png", null)); putShip2.setSize(90, 90); putShip2.setLocation(55, 105); putShip2.setIcon(createImageIcon(Torpedo.session.map.shipPath+"/ship2/full_north.png", null)); putShip3.setSize(90, 90); putShip3.setLocation(55, 205); putShip3.setIcon(createImageIcon(Torpedo.session.map.shipPath+"/ship3/full_north.png", null)); putShip4.setSize(90, 90); putShip4.setLocation(55, 305); putShip4.setIcon(createImageIcon(Torpedo.session.map.shipPath+"/ship4/full_north.png", null)); startButton.setSize(150, 30); startButton.setLocation(20, Torpedo.session.map.size*Field.buttonSize+205); panel.add(putShip1); panel.add(putShip2); panel.add(putShip3); panel.add(putShip4); panel.add(startButton); startButton.addActionListener(startButton()); startButton.addActionListener(putShip1()); startButton.addActionListener(putShip2()); startButton.addActionListener(putShip3()); startButton.addActionListener(putShip4()); panel.setLayout(null); panel.setVisible(true); } private ActionListener startButton(){ return new ActionListener(){ public void actionPerformed(ActionEvent e) { putPanel.panel.setVisible(false); actionPanel.panel.setVisible(true); } }; } private ActionListener putShip1(){ return new ActionListener(){ public void actionPerformed(ActionEvent e) { selectedShip = 1; putShip1.setBackground(Color.red); putShip2.setBackground(null); putShip3.setBackground(null); putShip4.setBackground(null); switch(ship1Direction){ case NORTH: ship1Direction = ShipDirection.EAST; putShip1.setIcon(createImageIcon(Torpedo.session.map.shipPath+"/ship1/full_east.png", null)); break; case EAST: ship1Direction = ShipDirection.SOUTH; putShip1.setIcon(createImageIcon(Torpedo.session.map.shipPath+"/ship1/full_south.png", null)); break; case SOUTH: ship1Direction = ShipDirection.WEST; putShip1.setIcon(createImageIcon(Torpedo.session.map.shipPath+"/ship1/full_west.png", null)); break; case WEST: ship1Direction = ShipDirection.NORTH; putShip1.setIcon(createImageIcon(Torpedo.session.map.shipPath+"/ship1/full_north.png", null)); break; } putShip1.repaint(); putShip2.repaint(); putShip3.repaint(); putShip4.repaint(); panel.repaint(); JOptionPane.showMessageDialog(new JFrame(), "Repaint finished", "Repaint status info", JOptionPane.INFORMATION_MESSAGE); //this here hangs the program when the method is finally called } }; When one of the putShip* buttons is clicked, it should rotate its own icon right 90° (means changing it to the next image), but it does nothing until the startButton is clicked, which changes the panel to an other one. (Only the first button's actionListener is here, the others' are practically the same). The panel is in a JFrame with two other panels that yet do nothing. How could I make it work properly? Thank you.

    Read the article

  • PHP/SQL/Wordpress: Group a user list by alphabet

    - by rayne
    I want to create a (fairly big) Wordpress user index with the users categorized alphabetically, like this: A Amy Adam B Bernard Bianca and so on. I've created a custom Wordpress query which works fine for this, except for one problem: It also displays "empty" letters, letters where there aren't any users whose name begins with that letter. I'd be glad if you could help me fix this code so that it only displays the letter if there's actually a user with a name of that letter :) I've tried my luck by checking how many results there are for that letter, but somehow that's not working. (FYI, I use the user photo plugin and only want to show users in the list who have an approved picture, hence the stuff in the SQL query). <?php $alphabet = range('A', 'Z'); foreach ($alphabet as $letter) { $user_count = $wpdb->get_results("SELECT COUNT(*) FROM wp_users WHERE display_name LIKE '".$letter."%' ORDER BY display_name ASC"); if ($user_count > 0) { $user_row = $wpdb->get_results("SELECT wp_users.user_login, wp_users.display_name FROM wp_users, wp_usermeta WHERE wp_users.display_name LIKE '".$letter."%' AND wp_usermeta.meta_key = 'userphoto_approvalstatus' AND wp_usermeta.meta_value = '2' AND wp_usermeta.user_id = wp_users.ID ORDER BY wp_users.display_name ASC"); echo '<li class="letter">'.$letter.''; echo '<ul>'; foreach ($user_row as $user) { echo '<li><a href="/author/'.$user->user_login.'">'.$user->display_name.'</a></li>'; } echo '</ul></li>'; } } ?> Thanks in advance!

    Read the article

  • Efficient alternative to merge() when building dataframe from json files with R?

    - by Bryan
    I have written the following code which works, but is painfully slow once I start executing it over thousands of records: require("RJSONIO") people_data <- data.frame(person_id=numeric(0)) json_data <- fromJSON(json_file) n_people <- length(json_data) for(lender in 1:n_people) { person_dataframe <- as.data.frame(t(unlist(json_data[[person]]))) people_data <- merge(people_data, person_dataframe, all=TRUE) } output_file <- paste("people_data",".csv") write.csv(people_data, file=output_file) I am attempting to build a unified data table from a series of json-formated files. The fromJSON() function reads in the data as lists of lists. Each element of the list is a person, which then contains a list of the attributes for that person. For example: [[1]] person_id name gender hair_color [[2]] person_id name location gender height [[...]] structure(list(person_id = "Amy123", name = "Amy", gender = "F", hair_color = "brown"), .Names = c("person_id", "name", "gender", "hair_color")) structure(list(person_id = "matt53", name = "Matt", location = structure(c(47231, "IN"), .Names = c("zip_code", "state")), gender = "M", height = 172), .Names = c("person_id", "name", "location", "gender", "height")) The end result of the code above is matrix where the columns are every person-attribute that appears in the structure above, and the rows are the relevant values for each person. As you can see though, some data is missing for some of the people, so I need to ensure those show up as NA and make sure things end up in the right columns. Further, location itself is a vector with two components: state and zip_code, meaning it needs to be flattened to location.state and location.zip_code before it can be merged with another person record; this is what I use unlist() for. I then keep the running master table in people_data. The above code works, but do you know of a more efficient way to accomplish what I'm trying to do? It appears the merge() is slowing this to a crawl... I have hundreds of files with hundreds of people in each file. Thanks! Bryan

    Read the article

  • Matching a Repeating Sub Series using a Regular Expression with PowerShell

    - by Hinch
    I have a text file that lists the names of a large number of Excel spreadsheets, and the names of the files that are linked to from the spreadsheets. In simplified form it looks like this: "Parent File1.xls" Link: ChildFileA.xls Link: ChildFileB.xls "ParentFile2.xls" "ParentFile3.xls" Blah Link: ChildFileC.xls Link: ChildFileD.xls More Junk Link: ChildFileE.xls "Parent File4.xls" Link: ChildFileF.xls In this example, ParentFile1.xls has embedded links to ChildFileA.xls and ChildFileB.xls, ParentFile2.xls has no embedded links, and ParentFile3.xls has 3 embedded links. I am trying to write a regular expression in PowerShell that will parse the text file producing output in the following form: ParentFile1.xls:ChildFileA.xls,ChildFileB.xls ParentFile3.xls:ChildFileC.xls,ChildFileD.xls,ChildFileE.xls etc The task is complicated by the fact that the text file contains a lot of junk between each of the lines, and a parent may not always have a child. Furthermore, a single file name may pass over multiple lines. However, it's not as bad as it sounds, as the parent and child file names are always clearly demarcated (the parent with quotes and the child with a prefix of Link: ). The PowerShell code I've been using is as follows: $content = [string]::Join([environment]::NewLine, (Get-Content C:\Temp\text.txt)) $regex = [regex]'(?im)\s*\"(.*)\r?\n?\s*(.*)\"[\s\S]*?Link: (.*)\r?\n?' $regex.Matches($content) | %{$_.Groups[1].Value + $_.Groups[2].Value + ":" + $_.Groups[3].Value} Using the example above, it outputs: ParentFile1.xls:ChildFileA.xls ParentFile2.xls""ParentFile3.xls:ChildFileC.xls ParentFile4.xls:ChildFileF.xls There are two issues. Firstly, the inclusion of the "" instead of a newline whenever a Parent without a Child is processed. And the second issue, which is the most important, is that only a single child is ever shown for each parent. I'm guessing I need to somehow recursively capture and display the multiple child links that exist for each parent, but I'm totally stumped as to how to do this with a regular expression. Amy help would be greatly appreciated. The file contains 100's of thousands of lines, and manual processing is not an option :)

    Read the article

  • error C2512 in precompiled header file?

    - by SoloMael
    I'm having a ridiculously strange problem. When I try to run the program below, there's an error message that says: "error C2512: 'Record' : no appropriate default constructor available". And when I double-click it, it directs me to a precompiled read-only header file named "xmemory0". Do they expect me to change a read-only file? Here's the segment of code in the file it directs me to: void construct(_Ty *_Ptr) { // default construct object at _Ptr ::new ((void *)_Ptr) _Ty(); // directs me to this line } Here's the program: #include <iostream> #include <vector> #include <string> using namespace std; const int NG = 4; // number of scores struct Record { string name; // student name int scores[NG]; double average; // Calculate the average // when the scores are known Record(int s[], double a) { double sum = 0; for(int count = 0; count != NG; count++) { scores[count] = s[count]; sum += scores[count]; } average = a; average = sum / NG; } }; int main() { // Names of the class string names[] = {"Amy Adams", "Bob Barr", "Carla Carr", "Dan Dobbs", "Elena Evans"}; // exam scores according to each student int exams[][NG]= { {98, 87, 93, 88}, {78, 86, 82, 91}, {66, 71, 85, 94}, {72, 63, 77, 69}, {91, 83, 76, 60}}; vector<Record> records(5); return 0; }

    Read the article

  • PHP issue json_decode echo array

    - by dfdf
    <?php $string = file_get_contents("http://www.reddit.com/r/news.json"); $array = json_decode($string, true); echo $array['data'][0]['children'][0]['data'][0]['title'][0]; ?> I've got a problem- the code doesn't echo anything. I'm kinda new to json_decode, so any help is appreciated :-) Edit: As a response to a comment, here's what print_r results to: Array ( [kind] => Listing [data] => Array ( [modhash] => [children] => Array ( [0] => Array ( [kind] => t3 [data] => Array ( [domain] => syracuse.com [banned_by] => [media_embed] => Array ( ) [subreddit] => news [selftext_html] => [selftext] => [likes] => [secure_media] => [link_flair_text] => [id] => 1qdtqr [secure_media_embed] => Array ( ) [clicked] => [stickied] => [author] => cadencehz [media] => [score] => 1552 [approved_by] => [over_18] => [hidden] => [thumbnail] => [subreddit_id] => t5_2qh3l [edited] => [link_flair_css_class] => [author_flair_css_class] => [downs] => 978 [saved] => [is_self] => [permalink] => /r/news/comments/1qdtqr/thousands_defend_grocery_store_employee_with/ [name] => t3_1qdtqr [created] => 1384215998 [url] => http://www.syracuse.com/news/index.ssf/2013/11/thousands_come_to_defense_of_clay_wegmans_employee_with_aspergers_syndrome_after.html#incart_m-rpt-2 [author_flair_text] => [title] => Thousands defend grocery store employee with Asperger's syndrome after customer yells at him for being too slow [created_utc] => 1384187198 [ups] => 2530 [num_comments] => 401 [visited] => [num_reports] => [distinguished] => ) ) [1] => Array ( [kind] => t3 [data] => Array ( [domain] => bostonherald.com [banned_by] => [media_embed] => Array ( ) [subreddit] => news [selftext_html] => [selftext] => [likes] => [secure_media] => [link_flair_text] => [id] => 1qddl6 [secure_media_embed] => Array ( ) [clicked] => [stickied] => [author] => boxofrain [media] => [score] => 2086 [approved_by] => [over_18] => [hidden] => [thumbnail] => [subreddit_id] => t5_2qh3l [edited] => [link_flair_css_class] => [author_flair_css_class] => [downs] => 2556 [saved] => [is_self] => [permalink] => /r/news/comments/1qddl6/motorcycle_stolen_in_1961_found_is_recovered_and/ [name] => t3_1qddl6 [created] => 1384199801 [url] => http://bostonherald.com/news_opinion/offbeat_news/2013/11/man_glad_stolen_motorcycle_found_after_46_years [author_flair_text] => [title] => Motorcycle stolen in 1961 found is recovered and will be returned to it 73 year old owner. [created_utc] => 1384171001 [ups] => 4642 [num_comments] => 141 [visited] => [num_reports] => [distinguished] => ) ) [2] => Array ( [kind] => t3 [data] => Array ( [domain] => hosted.ap.org [banned_by] => [media_embed] => Array ( ) [subreddit] => news [selftext_html] => [selftext] => [likes] => [secure_media] => [link_flair_text] => [id] => 1qe6gp [secure_media_embed] => Array ( ) [clicked] => [stickied] => [author] => donkey-kick [media] => [score] => 415 [approved_by] => [over_18] => [hidden] => [thumbnail] => [subreddit_id] => t5_2qh3l [edited] => [link_flair_css_class] => [author_flair_css_class] => [downs] => 334 [saved] => [is_self] => [permalink] => /r/news/comments/1qe6gp/atheist_mega_churches_take_hold_in_the_us_and/ [name] => t3_1qe6gp [created] => 1384224670 [url] => http://hosted.ap.org/dynamic/stories/U/US_ATHEIST_MEGACHURCH?SITE=AP&amp;SECTION=HOME&amp;TEMPLATE=DEFAULT&amp;CTIME=2013-11-10-17-03-15 [author_flair_text] => [title] => Atheist Mega Churches take hold in the US and around the world. [created_utc] => 1384195870 [ups] => 749 [num_comments] => 368 [visited] => [num_reports] => [distinguished] => ) ) [3] => Array ( [kind] => t3 [data] => Array ( [domain] => abcnews.go.com [banned_by] => [media_embed] => Array ( ) [subreddit] => news [selftext_html] => [selftext] => [likes] => [secure_media] => [link_flair_text] => [id] => 1qdie4 [secure_media_embed] => Array ( ) [clicked] => [stickied] => [author] => Hoosier_made [media] => [score] => 984 [approved_by] => [over_18] => [hidden] => [thumbnail] => [subreddit_id] => t5_2qh3l [edited] => [link_flair_css_class] => [author_flair_css_class] => [downs] => 400 [saved] => [is_self] => [permalink] => /r/news/comments/1qdie4/abc_news_amy_robach_has_mammogram_live_on_gma/ [name] => t3_1qdie4 [created] => 1384206209 [url] => http://abcnews.go.com/blogs/health/2013/11/11/abc-news-amy-robach-reveals-breast-cancer-diagnosis/ [author_flair_text] => [title] => ABC News’ Amy Robach has mammogram live on GMA. Results Reveal Breast Cancer Diagnosis. [created_utc] => 1384177409 [ups] => 1384 [num_comments] => 130 [visited] => [num_reports] => [distinguished] => ) ) // ECT... I CUT HERE BECAUSE IT WENT ON FOR A WHILE [after] => t3_1qdinr [before] => ) ) Here's the url to the exact output, I had to trim the code to fit the character limit so maybe there's something I messed up ! :P Okay: Link goes here...

    Read the article

  • Using jQuery to Insert a New Database Record

    - by Stephen Walther
    The goal of this blog entry is to explore the easiest way of inserting a new record into a database using jQuery and .NET. I’m going to explore two approaches: using Generic Handlers and using a WCF service (In a future blog entry I’ll take a look at OData and WCF Data Services). Create the ASP.NET Project I’ll start by creating a new empty ASP.NET application with Visual Studio 2010. Select the menu option File, New Project and select the ASP.NET Empty Web Application project template. Setup the Database and Data Model I’ll use my standard MoviesDB.mdf movies database. This database contains one table named Movies that looks like this: I’ll use the ADO.NET Entity Framework to represent my database data: Select the menu option Project, Add New Item and select the ADO.NET Entity Data Model project item. Name the data model MoviesDB.edmx and click the Add button. In the Choose Model Contents step, select Generate from database and click the Next button. In the Choose Your Data Connection step, leave all of the defaults and click the Next button. In the Choose Your Data Objects step, select the Movies table and click the Finish button. Unfortunately, Visual Studio 2010 cannot spell movie correctly :) You need to click on Movy and change the name of the class to Movie. In the Properties window, change the Entity Set Name to Movies. Using a Generic Handler In this section, we’ll use jQuery with an ASP.NET generic handler to insert a new record into the database. A generic handler is similar to an ASP.NET page, but it does not have any of the overhead. It consists of one method named ProcessRequest(). Select the menu option Project, Add New Item and select the Generic Handler project item. Name your new generic handler InsertMovie.ashx and click the Add button. Modify your handler so it looks like Listing 1: Listing 1 – InsertMovie.ashx using System.Web; namespace WebApplication1 { /// <summary> /// Inserts a new movie into the database /// </summary> public class InsertMovie : IHttpHandler { private MoviesDBEntities _dataContext = new MoviesDBEntities(); public void ProcessRequest(HttpContext context) { context.Response.ContentType = "text/plain"; // Extract form fields var title = context.Request["title"]; var director = context.Request["director"]; // Create movie to insert var movieToInsert = new Movie { Title = title, Director = director }; // Save new movie to DB _dataContext.AddToMovies(movieToInsert); _dataContext.SaveChanges(); // Return success context.Response.Write("success"); } public bool IsReusable { get { return true; } } } } In Listing 1, the ProcessRequest() method is used to retrieve a title and director from form parameters. Next, a new Movie is created with the form values. Finally, the new movie is saved to the database and the string “success” is returned. Using jQuery with the Generic Handler We can call the InsertMovie.ashx generic handler from jQuery by using the standard jQuery post() method. The following HTML page illustrates how you can retrieve form field values and post the values to the generic handler: Listing 2 – Default.htm <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Add Movie</title> <script src="http://ajax.microsoft.com/ajax/jquery/jquery-1.4.2.js" type="text/javascript"></script> </head> <body> <form> <label>Title:</label> <input name="title" /> <br /> <label>Director:</label> <input name="director" /> </form> <button id="btnAdd">Add Movie</button> <script type="text/javascript"> $("#btnAdd").click(function () { $.post("InsertMovie.ashx", $("form").serialize(), insertCallback); }); function insertCallback(result) { if (result == "success") { alert("Movie added!"); } else { alert("Could not add movie!"); } } </script> </body> </html>     When you open the page in Listing 2 in a web browser, you get a simple HTML form: Notice that the page in Listing 2 includes the jQuery library. The jQuery library is included with the following SCRIPT tag: <script src="http://ajax.microsoft.com/ajax/jquery/jquery-1.4.2.js" type="text/javascript"></script> The jQuery library is included on the Microsoft Ajax CDN so you can always easily include the jQuery library in your applications. You can learn more about the CDN at this website: http://www.asp.net/ajaxLibrary/cdn.ashx When you click the Add Movie button, the jQuery post() method is called to post the form data to the InsertMovie.ashx generic handler. Notice that the form values are serialized into a URL encoded string by calling the jQuery serialize() method. The serialize() method uses the name attribute of form fields and not the id attribute. Notes on this Approach This is a very low-level approach to interacting with .NET through jQuery – but it is simple and it works! And, you don’t need to use any JavaScript libraries in addition to the jQuery library to use this approach. The signature for the jQuery post() callback method looks like this: callback(data, textStatus, XmlHttpRequest) The second parameter, textStatus, returns the HTTP status code from the server. I tried returning different status codes from the generic handler with an eye towards implementing server validation by returning a status code such as 400 Bad Request when validation fails (see http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html ). I finally figured out that the callback is not invoked when the textStatus has any value other than “success”. Using a WCF Service As an alternative to posting to a generic handler, you can create a WCF service. You create a new WCF service by selecting the menu option Project, Add New Item and selecting the Ajax-enabled WCF Service project item. Name your WCF service InsertMovie.svc and click the Add button. Modify the WCF service so that it looks like Listing 3: Listing 3 – InsertMovie.svc using System.ServiceModel; using System.ServiceModel.Activation; namespace WebApplication1 { [ServiceBehavior(IncludeExceptionDetailInFaults=true)] [ServiceContract(Namespace = "")] [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)] public class MovieService { private MoviesDBEntities _dataContext = new MoviesDBEntities(); [OperationContract] public bool Insert(string title, string director) { // Create movie to insert var movieToInsert = new Movie { Title = title, Director = director }; // Save new movie to DB _dataContext.AddToMovies(movieToInsert); _dataContext.SaveChanges(); // Return movie (with primary key) return true; } } }   The WCF service in Listing 3 uses the Entity Framework to insert a record into the Movies database table. The service always returns the value true. Notice that the service in Listing 3 includes the following attribute: [ServiceBehavior(IncludeExceptionDetailInFaults=true)] You need to include this attribute if you want to get detailed error information back to the client. When you are building an application, you should always include this attribute. When you are ready to release your application, you should remove this attribute for security reasons. Using jQuery with the WCF Service Calling a WCF service from jQuery requires a little more work than calling a generic handler from jQuery. Here are some good blog posts on some of the issues with using jQuery with WCF: http://encosia.com/2008/06/05/3-mistakes-to-avoid-when-using-jquery-with-aspnet-ajax/ http://encosia.com/2008/03/27/using-jquery-to-consume-aspnet-json-web-services/ http://weblogs.asp.net/scottgu/archive/2007/04/04/json-hijacking-and-how-asp-net-ajax-1-0-mitigates-these-attacks.aspx http://www.west-wind.com/Weblog/posts/896411.aspx http://www.west-wind.com/weblog/posts/324917.aspx http://professionalaspnet.com/archive/tags/WCF/default.aspx The primary requirement when calling WCF from jQuery is that the request use JSON: The request must include a content-type:application/json header. Any parameters included with the request must be JSON encoded. Unfortunately, jQuery does not include a method for serializing JSON (Although, oddly, jQuery does include a parseJSON() method for deserializing JSON). Therefore, we need to use an additional library to handle the JSON serialization. The page in Listing 4 illustrates how you can call a WCF service from jQuery. Listing 4 – Default2.aspx <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Add Movie</title> <script src="http://ajax.microsoft.com/ajax/jquery/jquery-1.4.2.js" type="text/javascript"></script> <script src="Scripts/json2.js" type="text/javascript"></script> </head> <body> <form> <label>Title:</label> <input id="title" /> <br /> <label>Director:</label> <input id="director" /> </form> <button id="btnAdd">Add Movie</button> <script type="text/javascript"> $("#btnAdd").click(function () { // Convert the form into an object var data = { title: $("#title").val(), director: $("#director").val() }; // JSONify the data data = JSON.stringify(data); // Post it $.ajax({ type: "POST", contentType: "application/json; charset=utf-8", url: "MovieService.svc/Insert", data: data, dataType: "json", success: insertCallback }); }); function insertCallback(result) { // unwrap result result = result["d"]; if (result === true) { alert("Movie added!"); } else { alert("Could not add movie!"); } } </script> </body> </html> There are several things to notice about Listing 4. First, notice that the page includes both the jQuery library and Douglas Crockford’s JSON2 library: <script src="Scripts/json2.js" type="text/javascript"></script> You need to include the JSON2 library to serialize the form values into JSON. You can download the JSON2 library from the following location: http://www.json.org/js.html When you click the button to submit the form, the form data is converted into a JavaScript object: // Convert the form into an object var data = { title: $("#title").val(), director: $("#director").val() }; Next, the data is serialized into JSON using the JSON2 library: // JSONify the data var data = JSON.stringify(data); Finally, the form data is posted to the WCF service by calling the jQuery ajax() method: // Post it $.ajax({   type: "POST",   contentType: "application/json; charset=utf-8",   url: "MovieService.svc/Insert",   data: data,   dataType: "json",   success: insertCallback }); You can’t use the standard jQuery post() method because you must set the content-type of the request to be application/json. Otherwise, the WCF service will reject the request for security reasons. For details, see the Scott Guthrie blog post: http://weblogs.asp.net/scottgu/archive/2007/04/04/json-hijacking-and-how-asp-net-ajax-1-0-mitigates-these-attacks.aspx The insertCallback() method is called when the WCF service returns a response. This method looks like this: function insertCallback(result) {   // unwrap result   result = result["d"];   if (result === true) {       alert("Movie added!");   } else {     alert("Could not add movie!");   } } When we called the jQuery ajax() method, we set the dataType to JSON. That causes the jQuery ajax() method to deserialize the response from the WCF service from JSON into a JavaScript object automatically. The following value is passed to the insertCallback method: {"d":true} For security reasons, a WCF service always returns a response with a “d” wrapper. The following line of code removes the “d” wrapper: // unwrap result result = result["d"]; To learn more about the “d” wrapper, I recommend that you read the following blog posts: http://encosia.com/2009/02/10/a-breaking-change-between-versions-of-aspnet-ajax/ http://encosia.com/2009/06/29/never-worry-about-asp-net-ajaxs-d-again/ Summary In this blog entry, I explored two methods of inserting a database record using jQuery and .NET. First, we created a generic handler and called the handler from jQuery. This is a very low-level approach. However, it is a simple approach that works. Next, we looked at how you can call a WCF service using jQuery. This approach required a little more work because you need to serialize objects into JSON. We used the JSON2 library to perform the serialization. In the next blog post, I want to explore how you can use jQuery with OData and WCF Data Services.

    Read the article

  • 405 Method Not Allowed Error in WCF

    - by DotnetDude
    Can someone spot the problem with this implementation? I can open it up in the browser and it works, but a call from client side (using both jquery and asp.net ajax fails) Service Contract [OperationContract(Name = "GetTestString")] [WebInvoke(Method = "GET", ResponseFormat = WebMessageFormat.Json )] string GetTestString(); In Web.config among other bindings, I have a webHttp binding <endpoint address="ajax" binding="webHttpBinding" contract="TestService" behaviorConfiguration="AjaxBehavior" /> EndPoint Behavior <endpointBehaviors> <behavior name="AjaxBehavior"> <enableWebScript/> </behavior> </endpointBehaviors> </behaviors> Svc file <%@ ServiceHost Service="TestService" %> Client var serviceUrl = "http://127.0.0.1/Test.svc/ajax/"; var proxy = new ServiceProxy(serviceUrl); I am then using the approach in http://www.west-wind.com/weblog/posts/324917.aspx to call the service

    Read the article

  • Can't figure out jQuery ajax call parameters

    - by chad larson
    I am learning jQuery and trying the following but the parameters are so foreign to me with all the embedded quotes I think that is my problem. Can someone explain the parameters and where quotes go and possibly rewrite my parameters line? (This is a live site to see the required parms). function AirportInfo() { var divToBeWorkedOn = '#detail'; var webMethod = "'http://ws.geonames.org/citiesJSON'"; var parameters = "{'north':'44.1','south':'9.9','east':'22.4','west':'55.2','lang':'de'}"; $.ajax({ type: "POST", url: webMethod, data: parameters, contentType: "application/json; charset=utf-8", dataType: "json", success: function(msg) { alert(msg.d); $(divToBeWorkedOn).html(msg.d); }, error: function(xhr) { alert(xhr); alert(xhr.statusText); alert(xhr.responseText); $(divToBeWorkedOn).html("Unavailable"); } }); }

    Read the article

  • How do I get the intellisense in FoxPro 8 to work with .net COM objects?

    - by IsaacB
    Hi, I'm at my wit's end with this. What I'm doing is making a C# dll file that needs to have some methods exposed to FoxPro 8. This guy here http://www.west-wind.com/presentations/VfpDotNetInterop/DotNetFromVFP.asp says that you can put [ClassInterface(ClassInterfaceType.AutoDual)] in front of the (C# in my case) class, and then intellisense in Foxpro magically works. I'm accessing the COM object fine in FoxPro, but unfortunately the intellisense doesn't work, and it's annoying me. Is there some other step I'm missing to this? Is there some registry entry to look for to confirm that the methods are exposed properly (for intellisense to work)? Are there other steps in Foxpro that I'm supposed to follow (I don't know a thing about FoxPro!) It might be a pretty obscure question these days, but someone on here must know the answer! Thanks

    Read the article

  • How to solve JAVA menubar, layout and panel problem ?

    - by Berkay
    i'm not a java guy however i start implementing some security tools with java, in these days i'm creating a gui for my security tools : Here is the how my Gui looks: menuBar = new JMenuBar(); // construct menu bar // hash functions fileMenu = new JMenu("HASH FUNCTIONS"); // define file menu fileMenu.setMnemonic('H'); // shortcut hashes = new JMenuItem("Md5&Sha1"); // define file menu options hashes.setMnemonic('M'); hashes.addActionListener(this); fileMenu.add(hashes); menuBar.add(fileMenu); // add file menu to menu bar // symmetric encryption asMenu = new JMenu("SYMMETRIC ENCRYPTION"); // define format menu asMenu.setMnemonic('S'); // shortcut desItem = new JMenuItem("DES"); // define format menu options desItem.setMnemonic('D'); desItem.addActionListener(this); asMenu.add(desItem); ... ... menuBar.add(helpMenu); // add help menu to menu bar setJMenuBar(menuBar); // put menu bar on application textColor = Color.RED; when from the Menu desitem is selected, desvar is just for not showing the panel multiple times, it calls Panels () else if(e.getSource() == desItem && desvar ==1 ) { // make other panels unvisible. if(hashvar!=1) MyPanel.setVisible(false);//hash functions if(rsavar!=1) MyPanel3.setVisible(false);//rsa function if (dhvar!=1) MyPanel4.setVisible(false);//dh diffie hellman hashvar=1; rsavar=1; dhvar=1; ++desvar; desPanel=true; Panels(); } and in Panels() Method: if (hashPanel){ MyPanel.add("West",radioSHA1); MyPanel.add("West",radioMD5); MyPanel.add("Center", inputField); MyPanel.add("East",SubmitButton); MyPanel.add("South",resultHash); add(MyPanel); validate(); hashPanel=false; } i have many panels for example : -hash functions=mypanel1 , des=mypanel2, rsa functions= mypanel3 , dh= mypanel4 However in may other panals such as rsa function: i have to use some layout properties of the java:in this panel i selected to use gridbaglayout if (dhPanel){ System.out.println("rsa panel burda misin"); MyPanel3.add(pqLabel); MyPanel3.add(pLabel); MyPanel3.add(pTextArea); MyPanel3.add(qLabel); ... ... add(MyPanel3); generate_pqButton.addActionListener(this); calculate_nButton.addActionListener(this); ... ... GridBagLayout layout = new GridBagLayout(); GridBagConstraints gbc = new GridBagConstraints(); setLayout(layout); // x, y, w, h, wx, wy gbc.fill = GridBagConstraints.NONE; add (bit_length_label, gbc, 0, 0, 1, 1, 0, 10); add (p, gbc, 0, 1, 1, 1, 0, 10); add (g, gbc, 0, 2, 1, 1, 0, 10); add (a, gbc, 1, 3, 1, 1, 100, 10); add (x, gbc, 0, 4, 1, 1, 0, 10); add (gx, gbc, 0, 5, 1, 1, 0, 10); add (gxy, gbc, 0, 6, 1, 1, 0, 10); add (b, gbc, 1, 7, 1, 1, 100, 10); add (y, gbc, 0, 8, 1, 1, 0, 10); add (gy, gbc, 0, 9, 1, 1, 0, 10); add (gyx, gbc, 0, 10, 1, 1, 0, 10); add (sk, gbc, 1, 11, 1, 1, 100, 10); add (key, gbc, 0, 12, 1, 1, 0, 10); add (status, gbc, 1, 13, 1, 1, 100, 10); add (dhstart, gbc, 1, 14, 1, 1, 100, 10); add (bit_length_value, gbc, 1, 0, 1, 1, 100, 10); add (p_value, gbc, 1, 1, 1, 1, 100, 10); add (g_value, gbc, 1, 2, 1, 1, 100, 10); add (x_value, gbc, 1, 4, 1, 1, 100, 10); add (gx_value, gbc, 1, 5, 1, 1, 100, 10); add (gxy_value, gbc, 1, 6, 1, 1, 100, 10); add (y_value, gbc, 1, 8, 1, 1, 100, 10); add (gy_value, gbc, 1, 9, 1, 1, 100, 10); add (gyx_value, gbc, 1, 10, 1, 1, 100, 10); validate(); repaint(); rsaPanel=false; } Everthing seems okey however when i swith from one menu to another sometimes components are seen or apper in wrong places or mixed. where i'm doing wrong?

    Read the article

  • LinkButton + showmodaldialog not working

    - by CPM
    What would be the west way to open a window.showModalDialog on linkbutton when updating a form? I have a linkbutton on form that allows me to update the data, I want to be able to check if the data updatedin this case , parameter status of client is active I want to be able to open a window to fill some more information. Public Function OpenWindowRquest(ByVal URL As String) As String If accountMode = "1" Then Return "window.showModalDialog('" & Page.ResolveUrl(Server.UrlEncode(URL)) & "', window,'resizable:yes; scroll:on; status:yes; dialogWidth:750px; dialogHeight:350px; center:yes');" Else accountMode = "" Return "" End If On aspx side I have <asp:LinkButton id="UpdateButton" runat="server" commandName="Update" Text="Update" OnClientClick='<%# OpenWindowRequest("myurl.aspx") %>'></asp:LinkButton> I also tried to call the function OpenWindowRequest on FormUpdating event but it doesnt work, window is not opened.

    Read the article

  • Fortran recursion segmentation faults

    - by ConnorG
    Hey all - I have to design and implement a Fortran routine to determine the size of clusters on a square lattice, and it seemed extremely convenient to code the subroutine recursively. However, whenever my lattice size grows beyond a certain value (around 200/side), the subroutine consistently segfaults. Here's my cluster-detection routine: RECURSIVE SUBROUTINE growCluster(lattice, adj, idx, area) INTEGER, INTENT(INOUT) :: lattice(:), area INTEGER, INTENT(IN) :: adj(:,:), idx lattice(idx) = -1 area = area + 1 IF (lattice(adj(1,idx)).GT.0) & CALL growCluster(lattice,adj,adj(1,idx),area) IF (lattice(adj(2,idx)).GT.0) & CALL growCluster(lattice,adj,adj(2,idx),area) IF (lattice(adj(3,idx)).GT.0) & CALL growCluster(lattice,adj,adj(3,idx),area) IF (lattice(adj(4,idx)).GT.0) & CALL growCluster(lattice,adj,adj(4,idx),area) END SUBROUTINE growCluster where adj(1,n) represents the north neighbor of site n, adj(2,n) represents the west and so on. What would cause the erratic segfault behavior? Is the cluster just "too huge" for large lattice sizes?

    Read the article

  • Whoosh: PASS Board Year 1, Q4

    - by Denise McInerney
    "Whoosh". That's the sound the last quarter of 2012 made as it rushed by. My first year on the PASS Board is complete, and the last three months of it were probably the busiest. PASS Summit 2012 Much of October was devoted to preparing for Summit. Every Board  member, HQ staffer and dozens of volunteers were busy in the run-up to our flagship event. It takes a lot of work to put on the Summit. The community meetings,  first-timers program, keynotes, sessions and that fabulous Community Appreciation party are the result of many hours of preparation. Virtual Chapters at the Summit With a lot of help from Karla Landrum, Michelle Nalliah, Lana Montgomery and others at HQ the VCs had a good presence at Summit. We started the week with a VC leaders meeting. I shared some information about the activities and growth during the first part of the year.   From January - September 2012: The number of VCs increased from 14 to 20 VC membership  grew from 55,200 to 80,100 Total attendance at VC meetings increased from 1,480 to 2,198 Been part of PASS Global Growth with language-based VC- including Chinese, Spanish and Portuguese. We also heard from some VC leaders and volunteers. Ryan Adams (Performance VC) shared his tips for successful marketing of VC events. Amy Lewis (Business Intelligence VC) described how the BI chapter has expanded to support PASS' global growth by finding volunteers to organize events at times that are convenient for people in Europe and Australia. Felipe Ferreira (Portuguese language VC) described the experience of building a user group first in Brazil, then expanding to work with Portuguese-speaking data professionals around the world. Virtual Chapter leaders and volunteers were in evidence throughout Summit, beginning with the Welcome Reception. For the past several years VCs have had an organized presence at this event, signing up new members and advertising their meetings. Many VC leaders also spent time at the Community Zone. This new addition to the Summit proved to be a vibrant spot were new members and volunteers could network with others and find out how to start a chapter or host a SQL Saturday. Women In Technology 2012 was the 10th WIT Luncheon to be held at Summit. I was honored to be asked to be on the panel to discuss the topic "Where Have We Been and Where are We Going?" The PASS community has come a long way in our understanding of issues facing women in tech and our support of women in the organization. It was great to hear from panelists Stefanie Higgins and Kevin Kline who were there at the beginning as well as Kendra Little and Jen Stirrup who are part of the progress being made by women in our community today. Bylaw Changes The Board spent a good deal of time in 2012 discussing how to move our global growth initiatives forward. An important component of this is a proposed change to how the Board is elected with some seats representing geographic regions. At the end of December we voted on these proposed bylaw changes which have been published for review. The member review and feedback is open until February 8. I encourage all members to review these changes and send any feedback to [email protected]  In addition to reading the bylaws, I recommend reading Bill Graziano's blog post on the subject. Business Analytics Conference At Summit we announced a new event: the PASS Business Analytics Conference. The inaugural event will be April 10-12, 2013 in Chicago. The world of data is changing rapidly. More and more businesses want to extract value and insight from their data. Data professionals who provide these insights or enable others to do so are in demand. The BA Conference offers expert content on predictive analytics, data exploration and visualization, content delivery strategies and more. By holding this new event PASS is participating in important discussions happening in our industry, offering our members more educational value and reaching out to data professionals who are not currently part of our organization. New Year, New Portfolio In addition to my work with the Virtual Chapters I am also now responsible for the 24 Hours of PASS portfolio. Since the first 24HOP of 2013 is scheduled for January 30 we started the transition of the portfolio work from Rob Farley to me right after Summit. Work immediately started to secure speakers for the January event. We have also been evaluating webinar platforms that can be used for 24HOP as well as the Virtual Chapters. Next Up 24 Hours of PASS: Business Analytics Edition will be held on January 30. I'll be there and will moderate one or two sessions. The 24HOP topics are a sneak peek into the type of content that will be offered at the Business Analytics Conference. I hope to see some of you there. The Virtual Chapters have hit the ground running in 2013; many of them have events scheduled. The Application Development VC is getting restarted  and a new Business Analytics VC will be starting soon. Check out the lineup and join the VCs that interest you. And watch the Events page and Connector for announcements of upcoming meetings. At the end of January I will be attending a Board meeting in Seattle, and February 23 I will be at SQL Saturday #177 in Silicon Valley.

    Read the article

  • Groovy: How to access objects with Id tag?

    - by skifan0
    Hello, I have the following Groovy+SwingBuilder code. In one panel I generate checkboxes and in another panel I want to access the values of the checkboxes. The code looks basically likes this: def optionsmap = [ foo : "value_foo", bar : "value_bar"] SwingBuilder.build() { frame(title:'demo1', size:[400,700], visible:true, defaultCloseOperation:WC.EXIT_ON_CLOSE) { gridLayout(rows: 1, cols: 2) panel(id:'optionPanel', constraints:java.awt.BorderLayout.CENTER) { gridLayout(rows: 5, cols: 1) myGroup = buttonGroup(); for (entry in optionsmap) { checkBox(id: entry.key, text: entry.value ) } } panel(constraints:java.awt.BorderLayout.WEST) { button ('Show values', actionPerformed: { for (entry in optionsmap) { println (entry.key as Class).text } }) } } } optionsmap is a map with (id, text) pairs that can be extended. When I press "show values" I get an error message: org.codehaus.groovy.runtime.typehandling.GroovyCastException: Cannot cast object 'foo' with class 'java.lang.String' to class 'java.lang.Class' How could I access the checkboxes for my action in the second panel by using the checkbox ids from optionsmap? Thank you if you can help

    Read the article

  • linq to sql datacontext for a web application

    - by rap-uvic
    Hello, I'm trying to use linq to sql for my project (very short deadline), and I'm kind of in a bind. I don't know the best way to have a data context handy per request thread. I want something like a singleton class from which all my repository classes can access the current data context. However, singleton class is static and is not thread-safe and therefore not suitable for web apps. I want something that would create a data context at the beginning of the request and dispose of it along with the request. Can anyone please share their solution to this problem? I've been searching for a solution and I've found a good post from Rick Strahl : http://www.west-wind.com/weblog/posts/246222.aspx but I don't completely understand his thread-safe or business object approach. If somebody has a simplified version of his thread-safe approach, i'd love to take a look.

    Read the article

  • Basic doubt about sensor usage

    - by Al
    Suppose I have a cellphone with accelerometer and magnetometer, and want to determine its absolute (wrt North/East/South/West) 3d position. Imagine the phone is laid vertically, with the screen facing me, the "up" vector pointing to the ceil. Whenever I tilt, the accelerometer allows me to get the "up" vector info change. The problem is that if I tilt the device and put it horizontally (screen now facing ceil, and "up" vector pointing to the opposite of where I am), then the up vector doesn't get updated any more if I rotate the phone horizontally on the table. This is something that clearly is detected by the magnetometer now. So, the question is, when to know where to use acc or mag for each case? Is there a generic way to achieve this?

    Read the article

  • Why doesn't this Perl array sort work?

    - by Luke
    Why won't the array sort? CODE my @data = ('PJ RER Apts to Share|PROVIDENCE', 'PJ RER Apts to Share|JOHNSTON', 'PJ RER Apts to Share|JOHNSTON', 'PJ RER Apts to Share|JOHNSTON', 'PJ RER Condo|WEST WARWICK', 'PJ RER Condo|WARWICK'); foreach my $line (@data) { $count = @data; chomp($line); @fields = split(/\|/,$line); if ($fields[0] eq "PJ RER Apts to Share"){ @city = "\u\L$fields[1]"; @city_sort = sort (@city); print "@city_sort","\n"; } } print "$count","\n"; OUTPUT Providence Johnston Johnston Johnston 6

    Read the article

  • How to calculate dawn / dusk times

    - by ryyst
    Hi, I'm currently using this code to calculate the sunrise / sunset times. (To be more precise, I'm looking for civil dawn / civil dusk times which are defined as the time when the sun is between 0° and -6° altitude). As a next step, I'd like to compute the dawn beginning and dusk ending times. I believe the calculations must be very similar. My idea is that if I want to calculate the dawn beginning (dusk ending) time for a place I just calculate the sunrise (sunset) times for a place 6° farther east (west). Can somebody confirm this assumption, or am I thinking wrong? Thanks for answers! -- Ry

    Read the article

  • C++ string array binary search

    - by Jose Vega
    string Haystack[] = { "Alabama", "Alaska", "American Samoa", "Arizona", "Arkansas", "California", "Colorado", "Connecticut", "Delaware", "District of Columbia", "Florida", "Georgia", "Guam", "Hawaii", "Idaho", "Illinois", "Indiana", "Iowa", "Kansas", "Kentucky", "Louisiana", "Maine", "Maryland", "Massachusetts", "Michigan", "Minnesota", "Mississippi", "Missouri", "Montana", "Nebraska", "Nevada", "New Hampshire", "New Jersey", "New Mexico", "New York", "North Carolina", "North Dakota", "Northern Mariana Islands", "Ohio", "Oklahoma", "Oregon", "Pennsylvania", "Puerto Rico", "Rhode Island", "South Carolina", "South Dakota", "Tennessee", "Texas", "US Virgin Islands", "Utah", "Vermont", "Virginia", "Washington", "West Virginia", "Wisconsin", "Wyoming"}; string Needle = "Virginia"; if(std::binary_search(Haystack, Haystack+56, Needle)) cout<<"Found"; If I also wanted to find the location of the needle in the string array, is there an "easy" way to find out?

    Read the article

  • How to order a TimeZone list in .NET?

    - by reallyJim
    I have an ASP.NET web application that requires users to select their appropriate time zone so that it can correctly show local times for events. In creating a simple approach for selecting the time zone, I started by just using the values from TimeZoneInfo.GetSystemTimeZones(), and showing that list. The only problem with this is that since our application is primarily targeted at the United States, I'd like to show those entries first, basically starting with Eastern Time and working backwards (West) until I reach Atlantic time. What's a good approach to do this in code?

    Read the article

  • How do you diagnose a 500 error on Heroku when there is no error message in the logs?

    - by lala
    I have a Rails app on Heroku that is serving 500 errors at random intervals. Web pages will display "Internal server error" in plain text, instead of the usual "We're sorry. Something went wrong." page. When I refresh the page, it works fine. The logs don't show me an error message, just » 14:20:34.107 2013-10-11 12:20:33.763690+00:00 heroku router - - at=info method=HEAD path=/ host=www.mydomain.com fwd="184.73.237.85/ec2-184-73-237-85.compute-1.amazonaws.com" dyno=web.1 connect=1ms service=63ms status=200 bytes=0 » 14:21:03.957 2013-10-11 12:21:03.561867+00:00 heroku router - - at=info method=GET path=/ host=www.mydomain.com fwd="50.112.95.211/ec2-50-112-95-211.us-west-2.compute.amazonaws.com" dyno=web.1 connect=0ms service=1ms status=500 bytes=21 Support has told me to look at request queuing in New Relic, but New Relic only shows a big red mark saying the server is down (even though the site works fine when refreshed). With no error messages, I'm at a loss for how to diagnose this issue.

    Read the article

  • Objective C - Constants with behaviour

    - by Akshay
    Hi, I'm new to Objective C. I am trying to define Constants which have behavior associated with them. So far I have done - @interface Direction : NSObject { NSString *displayName; } -(id)initWithDisplayName:(NSString *)aName; -(id)left; // returns West when North -(id)right; // return East when North @end @implementation Direction -(id)initWithDisplayName:(NSString *)aName { if(self = [super init]) { displayName = aName; } return self; } -(id)left {}; -(id)right {}; @end Direction* North = [Direction initWithDisplayName:@"North"]; // error - initializer element is not constant. This approach results in the indicated error. Is there a better way of doing this in Objective C.

    Read the article

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