Search Results

Search found 81 results on 4 pages for 'amy p'.

Page 4/4 | < Previous Page | 1 2 3 4 

  • 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

  • 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

  • ArrayAdapter need to be clear even i am creating a new one

    - by Roi
    Hello I'm having problems understanding how the ArrayAdapter works. My code is working but I dont know how.(http://amy-mac.com/images/2013/code_meme.jpg) I have my activity, inside it i have 2 private classes.: public class MainActivity extends Activity { ... private void SomePrivateMethod(){ autoCompleteTextView.setAdapter(new ArrayAdapter<String>(this, android.R.layout.simple_spinner_dropdown_item, new ArrayList<String>(Arrays.asList("")))); autoCompleteTextView.addTextChangedListener(new MyTextWatcher()); } ... private class MyTextWatcher implements TextWatcher { ... } private class SearchAddressTask extends AsyncTask<String, Void, String[]> { ... } } Now inside my textwatcher class i call the search address task: @Override public void afterTextChanged(Editable s) { new SearchAddressTask().execute(s.toString()); } So far so good. In my SearchAddressTask I do some stuff on doInBackground() that returns the right array. On the onPostExecute() method i try to just modify the AutoCompleteTextView adapter to add the values from the array obtained in doInBackground() but the adapter cannot be modified: NOT WORKING CODE: protected void onPostExecute(String[] addressArray) { ArrayAdapter<String> adapter = (ArrayAdapter<String>) autoCompleteDestination.getAdapter(); adapter.clear(); adapter.addAll(new ArrayList<String>(Arrays.asList(addressArray))); adapter.notifyDataSetChanged(); Log.d("SearchAddressTask", "adapter isEmpty : " + adapter.isEmpty()); // Returns true!!??! } I dont get why this is not working. Even if i run it on UI Thread... I kept investigating, if i recreate the arrayAdapter, is working in the UI (Showing the suggestions), but i still need to clear the old adapter: WORKING CODE: protected void onPostExecute(String[] addressArray) { ArrayAdapter<String> adapter = (ArrayAdapter<String>) autoCompleteDestination.getAdapter(); adapter.clear(); autoCompleteDestination.setAdapter(new ArrayAdapter<String>(NewDestinationActivity.this,android.R.layout.simple_spinner_dropdown_item, new ArrayList<String>(Arrays.asList(addressArray)))); //adapter.notifyDataSetChanged(); // no needed Log.d("SearchAddressTask", "adapter isEmpty : " + adapter.isEmpty()); // keeps returning true!!??! } So my question is, what is really happening with this ArrayAdapter? why I cannot modify it in my onPostExecute()? Why is working in the UI if i am recreating the adapter? and why i need to clear the old adapter then? I dont know there are so many questions that I need some help in here!! Thanks!!

    Read the article

  • Stumbleupon type query...

    - by Chris Denman
    Wow, makes your head spin! I am about to start a project, and although my mySql is OK, I can't get my head around what required for this: I have a table of web addresses. id,url 1,http://www.url1.com 2,http://www.url2.com 3,http://www.url3.com 4,http://www.url4.com I have a table of users. id,name 1,fred bloggs 2,john bloggs 3,amy bloggs I have a table of categories. id,name 1,science 2,tech 3,adult 4,stackoverflow I have a table of categories the user likes as numerical ref relating to the category unique ref. For example: user,category 1,4 1,6 1,7 1,10 2,3 2,4 3,5 . . . I have a table of scores relating to each website address. When a user visits one of these sites and says they like it, it's stored like so: url_ref,category 4,2 4,3 4,6 4,2 4,3 5,2 5,3 . . . So based on the above data, URL 4 would score (in it's own right) as follows: 2=2 3=2 6=1 What I was hoping to do was pick out a random URL from over 2,000,000 records based on the current users interests. So if the logged in user likes categories 1,2,3 then I would like to ORDER BY a score generated based on their interest. If the logged in user likes categories 2 3 and 6 then the total score would be 5. However, if the current logged in user only like categories 2 and 6, the URL score would be 3. So the order by would be in context of the logged in users interests. Think of stumbleupon. I was thinking of using a set of VIEWS to help with sub queries. I'm guessing that all 2,000,000 records will need to be looked at and based on the id of the url it will look to see what scores it has based on each selected category of the current user. So we need to know the user ID and this gets passed into the query as a constant from the start. Ain't got a clue! Chris Denman

    Read the article

  • Apache-Mina FTPServer Issue — unable to login into apache ftp server while using database user manager

    - by piyush
    I am unable to login into apache ftp server while using database user manager: while entering username and password,I am getting following error in log file: [ INFO] 2013-02-07 20:51:07,779 [] [0:0:0:0:0:0:0:1] RECEIVED: USER piyush [ INFO] 2013-02-07 20:51:07,781 [piyush] [0:0:0:0:0:0:0:1] SENT: 331 User name okay, need password for piyush. [ INFO] 2013-02-07 20:51:07,784 [piyush] [0:0:0:0:0:0:0:1] RECEIVED: PASS ***** [ WARN] 2013-02-07 20:51:07,785 [piyush] [0:0:0:0:0:0:0:1] User failed to log in [ WARN] 2013-02-07 20:51:08,285 [piyush] [0:0:0:0:0:0:0:1] Login failure - piyush [ INFO] 2013-02-07 20:51:08,286 [piyush] [0:0:0:0:0:0:0:1] SENT: 530 Authentication failed. [ INFO] 2013-02-07 20:51:08,286 [piyush] [0:0:0:0:0:0:0:1] RECEIVED: QUIT [ INFO] 2013-02-07 20:51:08,290 [piyush] [0:0:0:0:0:0:0:1] SENT: 221 Goodbye. [ INFO] 2013-02-07 20:51:08,291 [piyush] [0:0:0:0:0:0:0:1] CLOSED here is my xml file ftpd-typical.xml: <?xml version="1.0" encoding="UTF-8"?> <!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> <server xmlns="http://mina.apache.org/ftpserver/spring/v1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:beans="http://www.springframework.org/schema/beans" xsi:schemaLocation=" http://mina.apache.org/ftpserver/spring/v1 http://mina.apache.org/ftpserver/ftpserver-1.0.xsd " id="Prometheus"> <listeners> <nio-listener name="default" port="2121" /> </listeners> <db-user-manager encrypt-passwords="salted"> <data-source> <beans:bean class="org.apache.commons.dbcp.BasicDataSource" > <beans:property name="driverClassName" value="com.mysql.jdbc.Driver" /> <beans:property name="url" value="jdbc:mysql://localhost/apache_test" /> <beans:property name="username" value="amy" /> <beans:property name="password" value="piyush" /> </beans:bean> </data-source> <insert-user>INSERT INTO FTP_USER (userid, userpassword, homedirectory, enableflag, writepermission, idletime, uploadrate, downloadrate) VALUES ('{userid}', '{userpassword}', '{homedirectory}', {enableflag}, {writepermission}, {idletime}, {uploadrate}, {downloadrate}) </insert-user> <update-user>UPDATE FTP_USER SET userpassword='{userpassword}',homedirectory='{homedirectory}',enableflag={enableflag},writepermission={writepermission},idletime={idletime},uploadrate={uploadrate},downloadrate={downloadrate} WHERE userid='{userid}' </update-user> <delete-user>DELETE FROM FTP_USER WHERE userid = '{userid}' </delete-user> <select-user>SELECT userid, userpassword, homedirectory, enableflag, writepermission, idletime, uploadrate, downloadrate, maxloginnumber, maxloginperip FROM FTP_USER WHERE userid = '{userid}' </select-user> <select-all-users>SELECT userid FROM FTP_USER ORDER BY userid </select-all-users> <is-admin>SELECT userid FROM FTP_USER WHERE userid='{userid}' AND userid='admin' </is-admin> <authenticate>SELECT userpassword from FTP_USER WHERE userid='{userid}'</authenticate> </db-user-manager> </server>

    Read the article

< Previous Page | 1 2 3 4