Search Results

Search found 33802 results on 1353 pages for 'etc'.

Page 16/1353 | < Previous Page | 12 13 14 15 16 17 18 19 20 21 22 23  | Next Page >

  • Blackberry app development - Drawing graphics on top of rendered text/buttons etc

    - by paullb
    Based off the one of the demos I have the following code. Currently what displays in the simulator is just hte contents of the paint function, however the ObjectChoiceField is still selectable if one happens to click in the right location. I would like both the text contents and the paint function contents to appear. Is this possible? public CityInfoScreen() { //invoke the MainScreen constructor super(); //add a screen title LabelField title = new LabelField("City Information Kiosk", LabelField.ELLIPSIS | LabelField.USE_ALL_WIDTH); setTitle(title); //add a text label add(new RichTextField("Major U.S. Cities")); //add a drop-down list with three choices: //Los Angeles, Chicago, or New York //... String choices[] = {"Los Angeles","Chicago","New York"}; choiceField = new ObjectChoiceField("select a city", choices); add(choiceField); Manager man = this.getMainManager(); } ... public void paint(Graphics g){ super.paint(g); // g.drawRect(0,left,500,500+left); g.setGlobalAlpha(0); g.drawRect(100-left,100-top,200,200); String text = new Integer(left).toString(); String text2 = new Integer(top).toString(); g.drawText(text + " " + text2,120-left,120-top); }

    Read the article

  • jQuery function in .click() etc

    - by Martind
    Hi all. So normally, I do it like this: $('#selectRoom a').click( function(e) { e.preventDefault(); // To prevent the default behavior (following the link or adding # to URL) // Do some function specific logic here }); However, I would like to do it like this, to clean things up (and be able to reuse): $('#selectRoom a').click( selectRoom ); function selectRoom () { e.preventDefault(); // To prevent the default behavior (following the link or adding # to URL) // Do some function specific logic here } The problem is, i cant pass the "e" event-handler to the function, then the selectRoom() function is called on load. i.e: $('#selectRoom a').click( selectRoom(e) ); Can I fix this somehow?

    Read the article

  • Where to Declare Structures, etc?

    - by cam
    Should all structs and classes be declared in the header file? If I declare a struct/class in a source file, what do I need to put in the header file so that it can be used in other files? Also, are there any resources that show some standard practices of C++ out there?

    Read the article

  • Calling software modules (Java, Perl, etc.) from R

    - by harshsinghal
    I've recently started using R for Natural Language Processing tasks and find that a lot of applications are available in Java and Perl (for my purposes). For example: A few perl modules are available to find distance measures between words by querying Wordnet. I am aware of the R Wordnet package, but it does not perform the tasks that these CPAN modules do. Many Java packages for NLP are out there, which I'd like to use from within R. I know of rJava, RSPerl, the simple system command amongst others, but I'd like more examples of how I could make calls to Java and Perl applications from R. Recently I tried capturing console output from a perl script. cat( 'print "Hello World\n";',file="hello.pl" ) system(command="c:\Perl64\bin\perl hello.pl") system(command=paste(Sys.getenv("COMSPEC"),"/c","C:\Perl64\bin\perl hello.pl")) None of the above system commands showed 'Hello World' on the R console. I've used "system" before to run perl scripts to perform tasks without wanting to capture console output. Any hints and redirection to other more extensive sources of information would be highly appreciated. Thank you

    Read the article

  • initWithCoder breaking my touch events (touchBegan, touchMoved, etc)

    - by Adam
    So I have a UIView that has been setup, and in each touch event handler I have an NSLog fire off a message to the console. - (void) touchesBegan:(NSSSet*)touches withEvent:(UIEvent*)event { NSLog(@"touchesBegan"); } And that pretty much works as expected. But once I implement initWithCoder (even blank) - (id)initWithCoder:(NSCoder*)coder { return self; } I no longer receive the message to my console (or can hit breakpoints obviously). This is my first app so I'm probably missing something dumb, but I've looked through various example apps and I don't appear to be missing any code that would re-enable touch events.

    Read the article

  • What is the use of reflection in Java/C# etc

    - by zengr
    I was just curious, why should we use reflection in the first place? // Without reflection Foo foo = new Foo(); foo.hello(); // With reflection Class cls = Class.forName("Foo"); Object foo = cls.newInstance(); Method method = cls.getMethod("hello", null); method.invoke(foo, null); We can simply create an object and call the class's method, but why do the same using forName, newInstance and getMthod functions? To make everything dynamic?

    Read the article

  • Storing apostrophes, exclamation marks, etc. in mysql database

    - by rein
    I changed from latin1 to utf8. Although all sorts of text was displaying fine I noticed non-english characters were stored in the database as weird symbols. I spent a day trying to fix that and finally now non-english characters display as non-english characters in the database and display the same on the browser. However I noticed that I see apostrophes stored as &#39; and exclamation marks stored as &#33;. Is this normal, or should they be appearing as ' and ! in the database instead? If so, what would I need to do in order to fix that?

    Read the article

  • PHP Security checklist (injection, sessions etc)

    - by NoviceCoding
    So what kind of things should a person using PHP and MySql be focused on to maximize security. Things I have done: -mysql_real_escape_string all inputs -validate all inputs after escaping em -Placed random alpha numerics before my table names -50character salt + Ripemd passwords Heres where I think I am slacking: -I know know nothing about sessions and securing them. How unsafe/safe is it if all you are doing is: session_start(); $_SESSION['login']= $login; and checking it with: session_start(); if(isset($_SESSION['login'])){ -I heard something about other forms of injection like cross site injection and what not... -And probably many other things I dont know about. Is there a "checklist"/Quicktut on making php secure? I dont even know what I should be worried about.I kinda regret now not building off cakephp since I am not a pro.

    Read the article

  • how to load Module to control like panel , vbox etc +flex

    - by glory-grace
    Hi All, Im new to this flex. can anybody solve my problem.This is my query- i have home page divided into 3 part like top,left,middle positon. in middle postion -panel and combobox are there. i want to load my module to the middle positon like to panel. i have combobox, when i selected any item based on that im loading module to that panel using Custom moduleloader control.uptohere its working fine. my probelm, i selected one option from combobox. its showing the one module(sam1). when i click(sam1),it should open anothermodule(sam2) in same location(instead of sam1-sam2).so can u tel ur idea and how to resolve it.plz.

    Read the article

  • Count in base 2, 3, 4 etc in Java and output all permutations

    - by tree-hacker
    I want to write a function in Java that takes as input an integer and outputs every possible permutation of numbers up to that integer. For example: f(1) 0 f(2) should output: 00 01 10 11 f(3) should output: 000 001 002 010 011 012 020 021 022 100 .... 220 221 222 That is it should output all 27 permutations of the digits of the numbers 0, 1, 2. f(4) should output 0000 0001 0002 0003 0010 ... 3330 3331 3332 3333 f(4) should output 00000 00001 ... 44443 44444 I have been trying to solve this problem but cannot seem to work out how to do it and keep getting confused by how many loops I need. Does anyone know how to solve this problem? Thanks in advance.

    Read the article

  • C++ function object terminology functor, deltor, comparitor, etc..

    - by Robert S. Barnes
    Is there a commonly accepted terminology for various types for common functors? For instance I found myself naturally using comparitor for comparison functors like this: struct ciLessLibC : public std::binary_function<std::string, std::string, bool> { bool operator()(const std::string &lhs, const std::string &rhs) const { return strcasecmp(lhs.c_str(), rhs.c_str()) < 0 ? 1 : 0; } }; Or using the term deltor for something like this: struct DeleteAddrInfo { void operator()(const addr_map_t::value_type &pr) const { freeaddrinfo(pr.second); } }; If using these kinds of shorthand terms is common, it there some dictionary of them all someplace?

    Read the article

  • RoR model field without validators, has*, delegates, etc

    - by jackr
    How can I declare a field, in the Rails model, when it doesn't have any "has_" relations, or validations, or delegations? I just need to ensure its existence and column width in the schema. Currently, I have no mention of the field in the "schema section" of the model file, but it's referenced in various methods that use it, and this seems to work. However, depending on my exact creation workflow, the underlying database table may be created as t.binary "field_name", :limit => 32 or t.binary "field_name", :limit => 255 This is not a restriction on the value (any binary value is valid, even NULL), only on the table column declaration. As it happens, 32 is enough -- it never receives any larger value, it's only ever written to like this: self.field_name = SecureRandom.random_bytes(32)

    Read the article

  • how to build and run core apps of ics like settings, camera etc on windows

    - by user1495186
    I have downloaded ics 4.0.3 source code, want to modify native settings, what i have to do is 1) add custom modifications to the settings 2) recompile native settings with added modifications 3) build the source code 4) generate a customized build to work on all android devices. How can I achieve the above thing? Every suggestion is appreciated. Thanks in advance. FYI: Using win7,4gb ram, intel i5 processor. Installed cygwin,git.

    Read the article

  • HTML5 localStorage for assets (stylesheets, JavaScript, images etc)

    - by Sam
    To save both client download time and network usage, is it possible to use the localStorage feature of HTML5 to store contents of linked stylesheets, javascript files and binary data (e.g. images), rather than hitting the server each time? Would that just complicate things - since I assume you would have to add the linked asset via JavaScript rather than just a script or link element, breaking the page for those without JavaScript enabled)? Unless you can parse the content (using HEAD requested to check last modified date and other headers) before the browser downloads it. Or best just to stick with 304 Not Modified and eTag headers?

    Read the article

  • Format String become 0001, 0010 etc

    - by trycatch4j
    Hi all.., I have number : 1, 2, 3, 4, 10 But I wanna print that number 0001 0002 0003 0004 0010 I have search in google, the keyword is number format. but I've got nothing, I just get, frmat decimal such ass 1,000,000.00. hope you can suggest me a reference or give me some problem solving. Thanks,

    Read the article

  • Self-contained python installation with executable tools included (pip, orbited, etc)

    - by Tristan
    I'm trying deploy a Python application on Windows as a folder that includes a full python 2.6 folder. I don't need/want a fancy solution like py2exe, I'm just trying to automate deployment of a web application. So long as I include python26.dll and set the PYTHONHOME correctly, things seem to work if I just include the Python26 folder in its entirety. However a number of the Python26/Script files don't work. For instance, pip.exe, orbited.exe, and morbid.exe all do nothing (complete with no output) when I try to run them on a system that doesn't have a real Python26 installation. I've run out of ideas. Suggestions?

    Read the article

  • Problem getting response from server using cURL, file_get_contents, etc

    - by shyam
    I am trying to get the response from a server, which is now not giving any response. I tried file_get_contents(), cURL, and tried getting the headers, but apparently the server is not responding. There are no headers returned or any response of any kind. Also, this happens when I try from my web server - it works fine in my local machine. The server I'm calling is an sms server, to use which they've given a url. The problem is only with this particular server. I get response while trying Google. So may be it's caused by the called server. What I wanna know is what could be (or how to find out) the reasons... Any advices?

    Read the article

  • Jquery with & , + and etc signs

    - by Loon Yew
    function testing() { $.ajax({ type: "POST", url: "testing.php", data: "call="+$("#abc").val(), success: function(msg){ alert( msg ); } }); } I want to post the data to testing.php but if i got special characters like & sign. it will create the problem. How do i go about it? Thank You

    Read the article

  • Webrick:: Access to public folders (css, js etc)

    - by Nikita Kuhta
    Webrick serves "/" path, but I want to have direct access to css, js and other public folders. if I use DocumentRoot, will handle all public paths too (like css/style.css), because it hadles root path: server = WEBrick::HTTPServer.new( :DocumentRoot => Dir::pwd, :Port=>8080 ) I need to mount_proc my root: server.mount_proc('/') {|req,resp| ...... How to give access to public folders?

    Read the article

  • URL decoding Japanese characters etc. in Java

    - by DanieL
    I have a servlet that receives some POST data. Because this data is x-www-form-urlencoded, a string such as ???? would be encoded to &#12469;&#12508;&#12486;&#12531;. How would I unencode this string back to the correct characters? I have tried using URLDecoder.decode("encoded string", "UTF-8"); but it doesn't make a difference. The reason I would like to unencode them, is because, before I display this data on a webpage, I escape & to &amp; and at the moment, it is escaping the &s in the encoded string so the characters are not showing up properly.

    Read the article

  • Format String become xxx1, xx10 or 1****, 10*** etc

    - by trycatch4j
    Hi all, I have following numbers : 1, 2, 3, 4, 10 But I want to print those numbers like this: 0001 0002 0003 0004 0010 I have searched in Google. the keyword is number format. But I've got nothing, I just get, format decimal such ass 1,000,000.00. I hope you can suggest me a reference or give me something to solve this problem. Thanks Edit, we can use NumberFormat, or String.format("%4d", somevalue); but it just for adding 0 character before integer. How If I wanna use character such as x, # or maybe whitespace. So the character become: xxxx1 xxx10 or ####1 ###10 or 1#### 10###

    Read the article

  • Free US sales-tax lookup (per zip etc.)?

    - by Shimmy
    I am creating a pricing program. I need to calculate the amounts according to the current tax list in the US (in various places). I want to have a button 'Update taxes' in the administrative settings of the application, so when the user clicks it, it should download from somewhere the active tax amounts. So I actually want to have a function decimal GetTax(string zip). Does anyone knows about a free downloadable xml, or RSS accessible or even a website that I can crawle in and get this info from?

    Read the article

< Previous Page | 12 13 14 15 16 17 18 19 20 21 22 23  | Next Page >