Search Results

Search found 2922 results on 117 pages for 'raw noob'.

Page 7/117 | < Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >

  • Noob Droid Question regarding random number

    - by Pete Herbert Penito
    Brand new to droid programming, but would love to learn as much as possible, so I finally got my emulator working correctly, I even got a hello world button to work, I'm attempting to make this button display a random number, I've googled this and came up with this code: Random generator = new Random(); int n = generator.nextInt(n); I fixed the Random function by including some Random java utility. I'm assuming this code above goes in the .java file of the project, so my button code looks as follows (tested and works): PopUpText.makeText(v.getContext(), "Hello World", PopUpText.LENGTH_LONG).show(); I figured I could replace "Hello World" with n to display the number in the box, however the following error is stopping the compile: The local variable n may not have been initialized Any ideas why this is happening? Any advice would be hugely appreciated.

    Read the article

  • Flex noob questions

    - by Jerry
    Hi all I was wondering how to copy files (like my images files) into my flex 4 src folder from windows explorer. There is no such folder called src when I look at my project folder. Thanks.

    Read the article

  • Are raw C++ pointers first class objects?

    - by Shailesh Kumar
    According to Wikipedia: An object is first-class when it: can be stored in variables and data structures can be passed as a parameter to a subroutine can be returned as the result of a subroutine can be constructed at runtime has intrinsic identity (independent of any given name) Somebody had once told me that raw pointers are not first class objects while smart pointers like std::auto_ptr are. But to me, a raw pointer (to an object or to a function) in C++ does seem to me to satisfy the conditions stated above to qualify as a first class object. Am I missing something?

    Read the article

  • C#- Console Program Ideas for Noob

    - by user335932
    So, Im a beginning C# programmer. I know basic syntax and simple things like if statements and loops(methods and classes too). I've only used console apps right now havent bothered with windows forms yet. So any simple app ideas that introduce new things important for C# programming. Also, NO tutorials. I want to make all by myself.

    Read the article

  • iPhone noob - different method types?

    - by codemonkey
    My apologies in advance for what is probably a really dumb question. I'm familiar (or at least getting familiar) with instance and class methods in objective-c, but have also seen method implementations that look like this: #import "Utilities.h" #import "CHAPPAppDelegate.h" #import "AppState.h" @implementation Utilities CHAPPAppDelegate* GetAppDelegate() { return (CHAPPAppDelegate *)[UIApplication sharedApplication].delegate; } AppState* GetAppState() { return [GetAppDelegate() appState]; } @end What are these? While I'm sure this is documented somewhere, I don't know what term to use in searching for an explanation of what's being done here. I like the syntax methods like this let me use when calling them, but I'm not sure exactly what I'm doing, what the implications are, how to send parameters to these types of functions, etc? To clarify how I ended up in this position, I started using these methods in a "utilities" class of mine after reading some online blog describing the author's preference for declaring these functions this way. Now I can't seem to track down a more detailed explanation of what exactly the differences are, etc.

    Read the article

  • RAW key generation in IOS with AES

    - by sudheer
    I am novice to the cryptography in ios . I got a requirement to convert android encryption code into IOS . Below is the android code part. I need that in IOS . Can any one please help me out in this . I need this below android code in IOS. private static byte[] getRawKey(byte[] seed) throws Exception { KeyGenerator kgen = KeyGenerator.getInstance("AES"); SecureRandom sr = SecureRandom.getInstance("SHA1PRNG"); sr.setSeed(seed); kgen.init(256, sr); SecretKey skey = kgen.generateKey(); byte[] raw = skey.getEncoded(); return raw; }

    Read the article

  • noob iPhone "count" frustrations!?!?!

    - by codemonkey
    Okay, I know I must be doing something incredibly stupid here. Here's the sample code (which, when executed within a viewDidLoad block silently crashes... no error output to debug console). NSMutableArray *bs = [NSMutableArray arrayWithCapacity:10]; [bs addObject:[NSNumber numberWithInteger: 2]]; NSLog(@"%@", [bs count]); [bs release]; What am I missing? Oh... and in case anyone is wondering, this code is just me trying to figure out why I can't get the count of an NSMutableArray that actually matters somewhere else in the program.

    Read the article

  • relative path issue (noob)

    - by tim roberts
    I am using the following code to check existence of a file before publishing an image in my erb file. <% @imagename = @place.name + ".jpg" %> <% if FileTest.exist?( "/Users/Tim/projects/game/public/" + @imagename ) %> <p><img src= '<%= @imagename %>' width="400" height="300" /> </p> <% end %> And when I publish this to Heroku, it obviously wont work. I tried using a relative path, but not able to get it to work. <% if FileTest.exist?( "/" + @imagename ) % any help appreciated.

    Read the article

  • Sockets: RAW or STREAM

    - by user1415536
    May be the question is a bit stupid, but I'll ask it. I read a lot about raw sockets in network, have seen several examples. So, basically with raw sockets it's possible to build own stack of headers, like stack = IP + TCP/UDP + OWN_HEADER. My question is, is it possible to get some kind of ready frame of first two(IP + TCP/UDP) from the linux kernel and then just append own header to them? The operating system in question is linux and the language is C. I cannot find any function which can do such a thing, but may be I'm digging in a wrong direction.

    Read the article

  • Multi table Triggers ms sql noob

    - by Chin
    I have a load of tables all with the same 2 datetime columns (lastModDate, dateAdded). I am wondering if I can set up global Insert Update trigger for these tables to set the datetime values. Or if not, what approaches are there? Any pointers much appreciated

    Read the article

  • jQuery noob: transfer not transferring..

    - by Kyle Sevenoaks
    I made an example, I copied it straight from the jQuery website yet, it doesn't transfer.. HTML: <div class="addToCart"> BLAHHHH </div> <br> <br> <br> <br> <div class="handelv"> MORE BLAAAHH </div>? jQuery: $(document).ready(function() { $(".addToCart").click(function () { var i = 1 - $(".addToCart").index(this); $(this).effect("transfer", { to: $(".handelv").eq(i) }, 1000); }); });? What have I gotten wrong?

    Read the article

  • Noob Capistrano question on preserving upload directories

    - by jaycode
    Hi all, In response to this blog post: http://www.simonecarletti.com/blog/2009/02/capistrano-uploads-folder/ I have three questions: Can anyone confirm if the recipe there works? Where and how do I put that recipe? I have two folders to be retained: /products and /public/images what do I need to change in the recipe? Thank you

    Read the article

  • Multi table Triggers SQL Server noob

    - by Chin
    I have a load of tables all with the same 2 datetime columns (lastModDate, dateAdded). I am wondering if I can set up global Insert Update trigger for these tables to set the datetime values. Or if not, what approaches are there? Any pointers much appreciated

    Read the article

  • Noob tab widget example not running

    - by michbeck
    hey all, i'm trying to reproduce the tabwidget example (http://developer.android.com/resources/tutorials/views/hello-tabwidget.html). i'm not really sure what's the problem, i've git no errors while compiling, but i cannot see the application on emulators screen :-/ would be excellent if maybe anyone could have a look at my classes and tell me what's my mistake? I've packed my project here: http://etanto.com/TabTest.zip thanx a lot in advance, folks! michbeck here's the console dump while the run: [2010-06-10 09:18:34 - TabTest] Launching a new emulator with Virtual Device 'Virtual1' [2010-06-10 09:18:35 - TabTest] New emulator found: emulator-5554 [2010-06-10 09:18:35 - TabTest] Waiting for HOME ('android.process.acore') to be launched... [2010-06-10 09:19:05 - TabTest] WARNING: Application does not specify an API level requirement! [2010-06-10 09:19:05 - TabTest] Device API version is 8 (Android 2.2) [2010-06-10 09:19:05 - TabTest] HOME is up on device 'emulator-5554' [2010-06-10 09:19:05 - TabTest] Uploading TabTest.apk onto device 'emulator-5554' [2010-06-10 09:19:05 - TabTest] Installing TabTest.apk... [2010-06-10 09:19:22 - TabTest] Success! [2010-06-10 09:19:22 - TabTest] \TabTest\bin\TabTest.apk installed on device [2010-06-10 09:19:22 - TabTest] Done!

    Read the article

  • Please help me understand this PHP script.Noob here

    - by NissGTR
    I'm learning PHP,MySQL and came across this function today function get_director($director_id) { global $db; $query = 'SELECT people_fullname FROM people WHERE people_id = ' . $director_id; $result = mysql_query($query, $db) or die(mysql_error($db)); $row = mysql_fetch_assoc($result); extract($row); return $people_fullname; } I understand what functions are and I've created a few while learning PHP.But this one is a bit more complicated.I can't understand the WHERE people_id = ' . $director_id I'm new to MySQL.I guess the single quote ends the MySQL statement?And then it is concatenated with the argument? Please help me out.

    Read the article

  • C++ STL: Array vs Vector: Raw element accessing performance

    - by oh boy
    I'm building an interpreter and as I'm aiming for raw speed this time, every clock cycle matters for me in this (raw) case. Do you have any experience or information what of the both is faster: Vector or Array? All what matters is the speed I can access an element (opcode receiving), I don't care about inserting, allocation, sorting, etc. I'm going to lean myself out of the window now and say: Arrays are at least a bit faster than vectors in terms of accessing an element i. It seems really logical for me. With vectors you have all those security and controlling overhead which doesn't exist for arrays. (Why) Am I wrong? No, I can't ignore the performance difference - even if it is so small - I have already optimized and minimized every other part of the VM which executes the opcodes :)

    Read the article

  • Noob question about hibernate criteria

    - by Dimitri
    Hello, I have a class called User which has 2 properties : login/password. I am trying to authenticate a user in my application using hibernate criteria but my request doesn't work. [EDIT] The returned value is NULL. I have two users in my database for testing. Here is my code : @Override public User authenticate(String login, String password) throws NullPointerException { Session session = this.getSession(); User user = (User) session .createCriteria(User.class) .add( Restrictions.and( Property.forName("login").eq(login), Property.forName("password").eq(password) )).uniqueResult(); if (user == null){ throw new NullPointerException("User not found"); } return user; } Can someone tells me what is wrong with my code? Happy new Year 2011 !!

    Read the article

  • Noob Python Question: List Confusion

    - by potatocubed
    I'm trying to transfer the contents of one list to another, but it's not working and I don't know why not. My code looks like this: list1 = [1, 2, 3, 4, 5, 6] list2 = [] for item in list1: list2.append(item) list1.remove(item) But if I run it my output looks like this: >>> list1 [2, 4, 6] >>> list2 [1, 3, 5] My question is threefold, I guess: Why is this happening, how do I make it work, and am I overlooking an incredibly simple solution like a 'move' statement or something?

    Read the article

  • How to make my SanDisk Cruzer Blade 4GB disk back to normal?

    - by Jack
    Currently, my SanDisk Cruzer Blade 4GB have become a 64MB Firebird RAW flash drive (thumb drive). I don't know why it become like this but when I plug it into a PC, it suddenly transform itself to become a 64MB flash drive. (From 4 GB to 64 MB, that is a huge change!) I read the following articles: http://forums.sandisk.com/t5/All-SanDisk-USB-Flash-Drives/Cruzer-Blade-will-not-format/td-p/214932 http://forums.whirlpool.net.au/archive/1691847 http://forum.hddguru.com/sandiskfirebird-64mb-t23539.html and notice that their solutions does not work at all. Some of their solution is as follows: Using the HP USB Disk Storage Format Tool (http://files.extremeoverclocking.com/file.php?f=1970), which did not work for me as it could not format. Using the h2testw to see if it is genuine, which did not work for me because it is a RAW partition. Return to the vendor, which I doubt since the product only have 1 year warranty and it has expired. I also notice that the flash drive is very fragile as after a few use, the flash drive have become something like the following: (The upper cover of the USB connector was broken or torn) So, wondering if someone have any good solution to fix it back so that at least I can retrieve my data on the fragile thumb drive.

    Read the article

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