Search Results

Search found 31491 results on 1260 pages for 'simple talk'.

Page 71/1260 | < Previous Page | 67 68 69 70 71 72 73 74 75 76 77 78  | Next Page >

  • simple obj-c naming question

    - by Highstead
    This question is more to figure out how to look up classes and objects in objective-c but i lack the knowledge to figure out how to look this up so i pose the question here. In .Net if i had a MyObject.MyValue the MyValue would be called a property, and I could look this up in MSDN. In java i would check the javadocs online (and that property would have to be a value). With objective-c that is called a ? and if i wanted to look it up i would look where? Example: //Object.??? UIImage.backgroundColor = [UIColor blueColor];

    Read the article

  • Need simple Twitter API v1.1 example to show timeline using jQuery or C# ASP.NET

    - by Ken Palmer
    With Twitter turning off the API 1.0 faucet on 6/11/2013, we have several sites that now fail to display timelines. I've been looking for an "If you did that, now do this" example. Here was Twitter's announcement. https://dev.twitter.com/blog/api-v1-is-retired Here is what we were originally doing to show the Twitter timeline via API 1.0. <div id="twitter"> <ul id="twitter_update_list"></ul> <script type="text/javascript" src="http://twitter.com/javascripts/blogger.js"></script> <script type="text/javascript" src="http://api.twitter.com/1/statuses/user_timeline/companytwitterhandle.json?callback=twitterCallback2&amp;count=1"></script> <div style="float:left;"><a href="https://twitter.com/companytwitterhandle" target="_blank">@companytwitterhandle</a> | </div> <div class="twitterimg">&nbsp;</div> </div> Initially I tried changing the version in the JavaScript reference URL like so, which did not work. <script type="text/javascript" src="http://api.twitter.com/1.1/statuses/user_timeline/companytwitterhandle.json?callback=twitterCallback2&amp;count=1"></script> Then I looked at the Twitter API documentation (https://dev.twitter.com/docs/api/1.1/overview) which lacks a clear transition example. I don't have 4 or 5 hours to delve into that, or into this disheveled FAQ (https://dev.twitter.com/docs/faq#17750). Then I found this API documentation regarding the user timeline. So I changed the URL again as shown below. https://dev.twitter.com/docs/api/1.1/get/statuses/user_timeline <script type="text/javascript" src="https://api.twitter.com/1.1/statuses/user_timeline.json?screen_name=companytwitterhandle&amp;count=1"></script> That did not work. Using jQuery or C# ASP.NET MVC, how can I transition that interface from Twitter API 1.0 to Twitter API 1.1? My first preference would be for a browser client side implementation if that is possible. Please include a code example. Thanks.

    Read the article

  • actionscript simple addchild within child

    - by steve
    I just need a quick answer for this, but I can't find anything about it anywhere. I need to add a child named "framecontainer" and then add another child within that named "bagFrame," both need to be added to the main timeline "MovieClip(root)" (unless there's an easier way to do that). Thanks.

    Read the article

  • Spring MVC simple case

    - by coure2011
    Trying to understand a sample code... I am returning a modelview successfully from my AthuenticationController like this modelAndView = new ModelAndView("redirect:/home/"); .... return modelAndView; and my browser url is changed to /home/ but its showing a 404 page I have a HomePageController and it has methods @RequestMapping(method = RequestMethod.GET) public String loadHome and @RequestMapping(method = RequestMethod.GET, value = "/main") public String reloadHome but System.out.println("Message") is not executing in any of the above methods. When authenticated I want to load a home.jsp page? It is in WEB-INF/jsp/...

    Read the article

  • C++ Simple thread with parameter (no .net)

    - by Marc Vollmer
    I've searched the internet for a while now and found different solutions but then all don't really work or are to complicated for my use. I used C++ until 2 years ago so it might be a bit rusty :D I'm currently writing a program that posts data to an URL. It only posts the data nothing else. For posting the data I use curl, but it blocks the main thread and while the first post is still running there will be a second post that should start. In the end there are about 5-6 post operations running at the same time. Now I want to push the posting with curl into another thread. One thread per post. The thread should get a string parameter with the content what to push. I'm currently stuck on this. Tried the WINAPI for windows but that crashes on reading the parameter. (the second thread is still running in my example while the main thread ended (waiting on system("pause")). It would be nice to have a multi plattform solution, because it will run under windows and linux! Heres my current code: #define CURL_STATICLIB #include <curl/curl.h> #include <curl/easy.h> #include <cstdlib> #include <iostream> #include <stdio.h> #include <stdlib.h> #include <string> #if defined(WIN32) #include <windows.h> #else //#include <pthread.h> #endif using namespace std; void post(string post) { // Function to post it to url CURL *curl; // curl object CURLcode res; // CURLcode object curl = curl_easy_init(); // init curl if(curl) { // is curl init curl_easy_setopt(curl, CURLOPT_URL, "http://10.8.27.101/api.aspx"); // set url string data = "api=" + post; // concat post data strings curl_easy_setopt(curl, CURLOPT_POSTFIELDS, data.c_str()); // post data res = curl_easy_perform(curl); // execute curl_easy_cleanup(curl); // cleanup } else { cerr << "Failed to create curl handle!\n"; } } #if defined(WIN32) DWORD WINAPI thread(LPVOID data) { // WINAPI Thread string pData = *((string*)data); // convert LPVOID to string [THIS FAILES] post(pData); // post it with curl } #else // Linux version #endif void startThread(string data) { // FUnction to start the thread string pData = data; // some Test #if defined(WIN32) CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)thread, &pData, 0, NULL); // Start a Windows thread with winapi #else // Linux version #endif } int main(int argc, char *argv[]) { // The post data to send string postData = "test1234567890"; startThread(postData); // Start the thread system("PAUSE"); // Dont close the console window return EXIT_SUCCESS; } Has anyone a suggestion? Thanks for the help!

    Read the article

  • Simple to program yet computationally difficult functions

    - by ViralShah
    I need an example of a slow Excel sheet that could exist in the real world. Problem is I'm not sure what sort of functions are computationally difficult. Are there any sort of (maths?) functions that are easy enough to program that they can be used in Excel, yet computationally expensive? Something which has a real world application is a bonus.

    Read the article

  • A simple tutorial for a beginner with WPF

    - by Aditya
    Hi Guys, I started today working on WPF for the first time. My requirement is to create a windows application using WPF. I mean an application which has page, buttons, tree view, log details (typically of selecting a project and subproject then manipulate the data on it) using WPF controls. Can I get some basic tutorials on this please. I explored… but I couldn't get right stuff for the work. Please help. Thank You, Ramm

    Read the article

  • C# - Fast and simple multi dimensional data structures?

    - by Jeremy Rudd
    I need to store multi-dimensional data consisting of numbers in a manner thats easy to work with. I'm capturing data in real time, and once processed I would destroy and GC older data. This data structure must be fast so it won't hit my overall app performance. The faster the better. What are my choices in terms of platform supported data structures? I'm using VS 2010. and .NET 4.

    Read the article

  • Simple interlinear gloss: aligned bilingual paragraph

    - by D W
    An interlinear gloss can be used to layout a translation of a document. http://en.wikipedia.org/wiki/Interlinear_gloss Usually this is done word-by-word or morpheme-by-morpheme. However, I would like to do this in a different way, translating entire paragraphs at a time. http://www.optimnem.co.uk/learning/spanish/three-little-pigs.php For now I am not interested in taking into account the order of words or phrases that change order between languages. That is, I don't mind if the words in the paragraph are not aligned or if the length of one paragraph is much longer than the other, causing an overhanging line. As far as I can tell, the following packages do not meet my needs: covingtn.sty cgloss4e.sty gb4e.sty lingmacros.sty - shortex

    Read the article

  • MYSQL - SImple database design

    - by sequelDesigner
    Hello guys, I would like to develop a system, where user will get the data dynamically(what I mean dynamic is, without reloading pages, using AJAX.. but well, it does not matter much). My situation is like this. I have this table, I called it "player", in this player table, I will store the player information like, player name, level, experience etc. Each player can have different clothes, start from tops(shirts), bottoms, shoes, and hairstyle, and each player can have more than 1 tops, bottoms, shoes etc. What I am hesitated or not very sure about is, how do you normally store the data? My current design is like this: Player Table =========================================================================================== id | name | (others player's info) | wearing | tops | bottoms =========================================================================================== 1 | player1 | | top=1;bottom=2;shoes=5;hair=8 | 1,2,3| 7,2,3 Tops Table ===================== id | name | etc... ===================== 1 | t-shirt | ... I am not sure if this design is good. If you are the database designer, how would you design the database? Or how you will store them? Please advise. Thanks

    Read the article

  • SaaS tool for *simple* requirements definition?

    - by Angela
    I've seen some complex, enterprise tools for requirements like Rymatech's FeaturePlan -- is there something that enables collaboration and best practices for putting Business-Readable, Domain-Specific (or natural language) requirements and acceptance criteria in place?

    Read the article

  • Need a very simple bash-based webserver for logging XML in HTTP POST

    - by Syffys
    As in title, it's for testing purpose and I need it to be extremely light (1 line to 1 single light file). Here is a XML query sample: XML_QUERY=$(cat <<EOF <?xml version='1.0' encoding='UTF-8'?> <Test></Test> EOF ) curl -H "Content-type: text/xml; charset=utf-8" -H "Soapaction: \"\"" -k -d "${XML_QUERY}" http://localhost:8088 Here are some of the tracks I have found so far even if I wasnt able to adapt them to work as I expect: Netcat minimal webserver: Problem is that my nc does not have the -q option, so the connection is closing before delivering the XML content Netcat Only webserver: Same as above Python based: But does not handle POST Thanks in advance!

    Read the article

  • Simple jQuery syntax help, don't know where I've gone wrong

    - by Jascination
    I'm having trouble with a jQuery code at the moment, I know WHERE the problem lies, but I don't know what the problem is exactly. Probably very basic, but I'm new to this. You can see a (non)working fiddle here: http://www.jsfiddle.net/CvZeQ/ Basically I want to set different .click function based on whatever is selected (I have 5 image maps, each with a different #mapname, and want each to pertain to a different variable (answer1, answer2, answer3...) so as to store the selected 'answer' for each map.) Here is the code I'm using for one of the maps: $(window).load(function(){ //Get cookies when page loaded var useranswers=$.cookie('survery'); useranswers= JSON.parse (useranswers); // do something with previous answers //#shape functions $('#shape area').hover( function(e){ $('#'+ this.alt).addClass('hover'); }, function(e){ $('#'+ this.alt).removeClass('hover'); } ).click( function(e){ $('img.selected-region').removeClass('selected-region'); }, function(e){ $('#'+ this.alt).addClass('selected-region'); }, function(e){ var answer1 = $(this).attr("class"); }); }); I know the problem lies somewhere with the .click function, but I'm not entirely sure what I've done wrong. Any help would be greatly appreciated.

    Read the article

  • Why isn't this simple MySQL statement working?

    - by Clark
    I am trying to match a user inputted search term against two tables: posts and galleries. The problem is the union all clause isn't working. Is there something wrong with my code? $query = mysql_query(" SELECT * FROM posts WHERE title LIKE '%$searchTerm%' OR author LIKE '%$searchTerm%' OR location LIKE '%$searchTerm%' OR excerpt LIKE '%$searchTerm%' OR content LIKE '%$searchTerm%' UNION ALL SELECT * FROM galleries WHERE title LIKE '%$searchTerm%' ");

    Read the article

  • Simple, Custom Parsing with c++

    - by bradkovach
    Hi! I have been reading SO for some time now, but I truly cannot find any help for my problem. I have a c++ assignment to create an IAS simulator. Here is some sample code... 0 1 a 1 2 b 2 c 3 1 10 begin 11 . load a, subtract b and offset by -1 for jump+ 11 load M(0) 12 sub M(1) 13 sub M(3) 14 halt Using c++, I need to be able to read these lines and store them in a "memory register" class that I already have constructed... For example, the first line would need to store "1 a" in register zero. How can I parse out the number at the line beginning and then store the rest as a string? I have setup storage using a class that is called using mem.set(int, string);. int is the memory location at the beginning of the line and string is the stored instruction.

    Read the article

  • Simple Javascript question

    - by Rachel
    I have products : offer_id in javascript and am getting value of offer_id dynamically. Let say I get products : 12345 but now instead of that I want it to be as products : ;12345, than how can this be achieved in javascript. I have tried : products : ';'.offer_id products : ';'."offer_id" products : ';'.'offer_id' products : ";".offer_id But all of my above trials have failed and am getting syntax error for each one of those. I am newbie to Javascript and so would really appreciate any inputs.

    Read the article

  • What is wrong in this simple Makefile

    - by Walidix
    SRC_VAR = test string for variable manipulation. TEST1_VAR = $(subset for,foo,${SRC_VAR}) all: @echo original str: ${SRC_VAR} @echo substitution: ${TEST1_VAR} This is the output: original str: test string for variable manipulation. substitution: The output should be: original str: My test string for variable manipulation. substitution: My test string foo variable manipulation.

    Read the article

  • Simple way to do SURBL lookup from Java?

    - by StaxMan
    I am reading about SURBLs (known spam hosts), for purpose of classifying spam, as a batch process. Main access method seems to be via DNS lookups. I was wondering what's the usual way to do such lookups from Java code. Since this is a batch process with no strict performance requirements, I think most important feature would just be simplicity.

    Read the article

  • Why isn't this simple program working?

    - by user1445478
    I'm writing a very basic program that aims for the text view to display the phrase "Hello" after a button is pressed on the screen. However, I can't get this program to work; every time I run it, it says that the application has stopped unexpectedly. This is the program I wrote: public class EtudeActivityActivity extends Activity{ TextView tvResponse; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); final TextView tvResponse = (TextView) findViewById (R.id.tvResponse); } public void updateTV(View v) { tvResponse.setText("Hello"); } } Also, I inserted an android:onClick = "updateTV" into my main.xml file for the button. Thanks for any help!

    Read the article

  • Very simple code for number search gives me infinite loop

    - by Joshua
    Hello, I am a newbie Computer Science high school student and I have trouble with a small snippet of code. Basically, my code should perform a basic CLI search in an array of integers. However, what happens is I get what appears to be an infinite loop (BlueJ, the compiler I'm using, gets stuck and I have to reset the machine). I have set break points but I still don't quite get the problem...(I don't even understand most of the things that it tells me) Here's the offending code (assume that "ArrayUtil" works, because it does): import java.util.Scanner; public class intSearch { public static void main(String[] args) { search(); } public static void search() { int[] randomArray = ArrayUtil.randomIntArray(20, 100); Scanner searchInput = new Scanner(System.in); int searchInt = searchInput.nextInt(); if (findNumber(randomArray, searchInt) == -1) { System.out.println("Error"); }else System.out.println("Searched Number: " + findNumber(randomArray, searchInt)); } private static int findNumber(int[] searchedArray, int searchTerm) { for (int i = 0; searchedArray[i] == searchTerm && i < searchedArray.length; i++) { return i; } return -1; } } This has been bugging me for some time now...please help me identify the problem!

    Read the article

  • Issues with simple jQuery image gallery with Colorbox plugin

    - by Chris
    I'm putting together an image gallery for an ecommerce site and wanting to use colorbox to launch larger images. My problem is that image launched in colorbox stays as the first one launched and should reflect the image shown as img#bigpic - the link to the image does appear to be updating correctly. Here's the jQuery I have: $(document).ready(function(){ $("#largeimage").colorbox(); imageSwapper(".thumbnails a"); function imageSwapper(link) { $(link).click(function(){ $("#bigpic").attr("src", this.href); $("#largeimage").attr("href", this.rel); return false; }); }; $("#largeimage").bind('mouseenter mouseleave', function(event) { $("#largeimage span").toggleClass('showspan'); }); }); ...and the HTML <a href="_images/products/large/bpn0001_1.jpg" id="largeimage"><span></span><img src="_images/products/bpn0001_1.jpg" id="bigpic" /></a> <div class="thumbnails"> <ul> <li><a href="_images/products/bpn0001_1.jpg" rel="_images/products/large/bpn0001_1.jpg"><img src="_images/products/mini/bpn0001_1.jpg" /></a></li> <li><a href="_images/products/bpn0001_2.jpg" rel="_images/products/large/bpn0001_2.jpg"><img src="_images/products/mini/bpn0001_2.jpg" /></a></li> <li><a href="_images/products/bpn0001_3.jpg" rel="_images/products/large/bpn0001_3.jpg"><img src="_images/products/mini/bpn0001_3.jpg" /></a></li> </ul> </div> Any help would be much appreciated!

    Read the article

< Previous Page | 67 68 69 70 71 72 73 74 75 76 77 78  | Next Page >