Search Results

Search found 2956 results on 119 pages for 'alex coder'.

Page 3/119 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Business person turned into coder? How and why? Inspire the non-technical.

    - by huisjames
    I graduated with a Business degree. Two years later, I finally realized the power of programming - the power to "invent." I wish I realized this in high school. Nevertheless, I tried to self-teach C# but found it difficult. Then I pivoted to learn PHP two months ago and I have been able to build things I thought was beyond my abilities. Has anyone had the same experience? Or self-taught programming? What lessons did you learn?

    Read the article

  • How to serialize object containing NSData?

    - by AO
    I'm trying to serialize an object containing a number of data fields...where one of the fields is of datatype NSData which won't serialize. I've followed instructions at http://www.isolated.se but my code (see below) results in the error "[NSConcreteData data]: unrecognized selector sent to instance...". How do I serialize my object? Header file: @interface Donkey : NSObject<NSCoding> { NSString* s; NSData* d; } @property (nonatomic, retain) NSString* s; @property (nonatomic, retain) NSData* d; - (NSData*) serialize; @end Implementation file: @implementation Donkey @synthesize s, d; static NSString* const KEY_S = @"string"; static NSString* const KEY_D = @"data"; - (void) encodeWithCoder:(NSCoder*)coder { [coder encodeObject:self.s forKey:KEY_S]; [coder encodeObject:self.d forKey:KEY_D]; } - (id) initWithCoder:(NSCoder*)coder; { if(self = [super init]) { self.s = [coder decodeObjectForKey:KEY_STRING]; self.d [coder decodeObjectForKey:KEY_DATA]; } return self; } - (NSData*) serialize { return [NSKeyedArchiver archivedDataWithRootObject:self]; } @end

    Read the article

  • Storing arrays in NSUserDefaultsController

    - by neoneye
    Currently I use NSUserDefaults and I'm interested in using NSUserDefaultsController, so that I get notifications when things change. Below is my current code. items = /* NSArray of MYItem's */; NSData* data = [NSKeyedArchiver archivedDataWithRootObject:items]; [[NSUserDefaults standardUserDefaults] setObject:data forKey:kMYItems]; How should I rework my code to store items in NSUserDefaultsController ? Is NSKeyedArchiver the smartest way to store arrays? @interface MYItem : NSObject <NSCoding> { NSString* name; NSString* path; } @property (copy) NSString* name; @property (copy) NSString* path; @end @implementation MYItem @synthesize name, path; -(void)encodeWithCoder:(NSCoder*)coder { [coder encodeObject:name forKey:@"name"]; [coder encodeObject:path forKey:@"path"]; } -(id)initWithCoder:(NSCoder*)coder { [super init]; [self setName:[coder decodeObjectForKey:@"name"]]; [self setPath:[coder decodeObjectForKey:@"path"]]; return self; } @end

    Read the article

  • IPv6 address is not working in Ubuntu

    - by Alex Farber
    Telnet connection with echo service succeeds for localhost and 127.0.0.1 host names, but fails with ::1 host name: alex@u120432:~$ telnet localhost 7 Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. 123 123 ^] telnet q Connection closed. alex@u120432:~$ telnet ::1 7 Trying ::1... telnet: Unable to connect to remote host: Connection refused alex@u120432:~$ My own program trying to talk using IPv6 address fails as well. Why IPv6 address is rejected? OS: Ubuntu 12.04 32 bit.

    Read the article

  • Quickly, syntax error: media_grid.show()

    - by Alex
    i run the app and get this error. the little arrow points to the 'd', dont know what that means. plus i had the same error just before but on this line: from quickly.widgets.dictionary grid import DictionaryGrid the arrow pointed to the 'd' in grid as well. then i changed it to this: from quickly.widgets.dictionary_grid import DictionaryGrid i added a '_' in the middle. and now i have the syntax error in the question. Thanks for any help that is given! Traceback (most recent call last): File "bin/simple-player", line 32, in <module> import simple_player File "/home/alex/simple-player/simple_player/__init__.py", line 14, in <module> from simple_player import SimplePlayerWindow File "/home/alex/simple-player/simple_player/SimplePlayerWindow.py", line 51 media_grid.show() ^ SyntaxError: invalid syntax

    Read the article

  • Fix overlapping partitions

    - by Alex
    I have problem with overlapping partitions. GParted shows me all my disk as unallocated area, output of fdisk below: alex@alex-ThinkPad-SL510:~$ sudo fdisk -l /dev/sda Disk /dev/sda: 320.1 GB, 320072933376 bytes 255 heads, 63 sectors/track, 38913 cylinders, total 625142448 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0xfb4b9b90 Device Boot Start End Blocks Id System /dev/sda1 * 2048 2457599 1227776 7 HPFS/NTFS/exFAT /dev/sda2 2457600 571351724 284447062+ 7 HPFS/NTFS/exFAT /dev/sda3 571342846 604661759 16659457 5 Extended /dev/sda4 604661760 625137663 10237952 7 HPFS/NTFS/exFAT /dev/sda5 598650880 604661759 3005440 82 Linux swap / Solaris /dev/sda6 571342848 598650879 13654016 83 Linux Partition table entries are not in disk order Do I understand correctly that overlapping partitions are sda2 and sda3 (sda2 and sda6 overlaps too, because sda6 is the first chunk of sda3, sda3 has type "extended")? Are sda2 and sda3 the cause of problem? How can i fix it without deleting partitions? My OS is Ubuntu 12.04, 64 bit. Thanks in advance.

    Read the article

  • How to install new Intel Ethernet driver

    - by Alex Farber
    Ubuntu 12.04 x64 doesn't recognize newest Intel Ethernet adapter on my desktop (Intel Ethernet Connection i217-V). I downloaded required driver from Intel and compiled it using make. Now I have: alex@alex64-six:~$ find / -name 'e1000e.ko' 2>/dev/null /home/alex/Documents/IntelEthernetDriver/e1000e-3.0.4/src/e1000e.ko /lib/modules/3.2.0-64-generic/kernel/drivers/net/ethernet/intel/e1000e/e1000e.ko The first line is new driver compiled from Intel sources. The second line is probably existing driver from Ubuntu distribution, which doesn't recognize new Ethernet adapter. How can I apply the new driver instead of existing one? Any other solution is welcome. For now, I cannot upgrade to latest Ubuntu release, because I use some third-party products.

    Read the article

  • game state singleton cocos2d, initWithEncoder always returns null

    - by taber
    Hi, I'm trying to write a basic test "game state" singleton in cocos2d, but for some reason upon loading the app, initWithCoder is never called. Any help would be much appreciated, thanks. Here's my singleton GameState.h: #import "cocos2d.h" @interface GameState : NSObject <NSCoding> { NSInteger level, score; Boolean seenInstructions; } @property (readwrite) NSInteger level; @property (readwrite) NSInteger score; @property (readwrite) Boolean seenInstructions; +(GameState *) sharedState; +(void) loadState; +(void) saveState; @end ... and GameState.m: #import "GameState.h" #import "Constants.h" @implementation GameState static GameState *sharedState = nil; @synthesize level, score, seenInstructions; -(void)dealloc { [super dealloc]; } -(id)init { if(!(self = [super init])) return nil; level = 1; score = 0; seenInstructions = NO; return self; } +(void)loadState { @synchronized([GameState class]) { NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSString *documentsDirectory = [paths objectAtIndex:0]; NSString *saveFile = [documentsDirectory stringByAppendingPathComponent:kSaveFileName]; Boolean saveFileExists = [[NSFileManager defaultManager] fileExistsAtPath:saveFile]; if(!sharedState) { sharedState = [GameState sharedState]; } if(saveFileExists == YES) { [sharedState release]; sharedState = [[NSKeyedUnarchiver unarchiveObjectWithFile:saveFile] retain]; } // at this point, sharedState is null, saveFileExists is 1 if(sharedState == nil) { // this always occurs CCLOG(@"Couldn't load game state, so initialized with defaults"); sharedState = [self sharedState]; } } } +(void)saveState { NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSString *documentsDirectory = [paths objectAtIndex:0]; NSString *saveFile = [documentsDirectory stringByAppendingPathComponent:kSaveFileName]; [NSKeyedArchiver archiveRootObject:[GameState sharedState] toFile:saveFile]; } +(GameState *)sharedState { @synchronized([GameState class]) { if(!sharedState) { [[GameState alloc] init]; } return sharedState; } return nil; } +(id)alloc { @synchronized([GameState class]) { NSAssert(sharedState == nil, @"Attempted to allocate a second instance of a singleton."); sharedState = [super alloc]; return sharedState; } return nil; } +(id)allocWithZone:(NSZone *)zone { @synchronized([GameState class]) { if(!sharedState) { sharedState = [super allocWithZone:zone]; return sharedState; } } return nil; } ... -(void)encodeWithCoder:(NSCoder *)coder { [coder encodeInt:level forKey:@"level"]; [coder encodeInt:score forKey:@"score"]; [coder encodeBool:seenInstructions forKey:@"seenInstructions"]; } -(id)initWithCoder:(NSCoder *)coder { CCLOG(@"initWithCoder called"); self = [super init]; if(self != nil) { CCLOG(@"initWithCoder self exists"); level = [coder decodeIntForKey:@"level"]; score = [coder decodeIntForKey:@"score"]; seenInstructions = [coder decodeBoolForKey:@"seenInstructions"]; } return self; } @end ... I'm saving the state on app exit, like this: - (void)applicationWillTerminate:(UIApplication *)application { [GameState saveState]; [[CCDirector sharedDirector] end]; } ... and loading the state when the app finishes loading, like this: - (BOOL) application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { ... [GameState loadState]; ... } I've tried moving around where I call loadState too, for example in my main CCScene, but that didn't seem to work either. Thanks again in advance.

    Read the article

  • how get validation messages from mangomapper using rails console ?

    - by Alex
    Hi, I am basically teaching myself how to use RoR and MongoDB at the same time. I am following the very good book / tutorial : http://railstutorial.org/ I decided to replace Sqlite3 by MongoDB using the mongomapper gem. Everything works out about alright, but I am having some non-blocking little issues that I truly wish I could get rid of. In chapter 6, when working with validation I got 2 issues: - I don't know how to get the validations messages back like with Sqlite3. The "standard" code is: $ rails console --sandbox >> user = User.new(:name => "", :email => "[email protected]") >> user.save => false >> user.valid? => false >> user.errors.full_messages => ["Name can't be blank"] but if I try to do the same with MongoMapper, it throws an error saying that errors is undefined function. So does it mean that this is simply not implemented in mongomapper / mongo driver ? Or is there some other clever way to do this that I could not figure ? Additional, 2 things here: - I following the exemple in the book to the line, so I was expecting to be able to use the console in sandbox mode, but apparently that does not work either: (...)ruby-1.9.2-p136@rails3/gems/railties-3.0.3/lib/rails/console/sandbox.rb:1:in `<top (required)>': uninitialized constant ActiveRecord (NameError) from /Users/Alex/.rvm/gems/ruby-1.9.2-p136@rails3/gems/railties-3.0.3/lib/rails/application.rb:226:in `initialize_console' from /Users/Alex/.rvm/gems/ruby-1.9.2-p136@rails3/gems/railties-3.0.3/lib/rails/application.rb:153:in `load_console' from /Users/Alex/.rvm/gems/ruby-1.9.2-p136@rails3/gems/railties-3.0.3/lib/rails/commands/console.rb:26:in `start' from /Users/Alex/.rvm/gems/ruby-1.9.2-p136@rails3/gems/railties-3.0.3/lib/rails/commands/console.rb:8:in `start' from /Users/Alex/.rvm/gems/ruby-1.9.2-p136@rails3/gems/railties-3.0.3/lib/rails/commands.rb:23:in `<top (required)>' from script/rails:6:in `require' from script/rails:6:in `<main>' Also, in the book they call "user" but I need to call "User" (note the capital U) why is that ? Is it like mangomapper does not follow the Ruby naming convention or something ? And finally, I am trying to validate the field email with a regex as shown in the tutorial. It does not throws any errors at the code, but whenever I try to insert it just won't ever accept it unless I comment out the :format option... class User include MongoMapper::Document key :name, String, :required => true, :length => { :maximum => 50 } key :email, String, :required => true, # :format => { :with => email_regex }, :uniqueness => { :case_sentitive => false} timestamps! end Any advices you can provide on those topics would help me a lot ! Thanks, Alex

    Read the article

  • Silverlight Cream for December 28, 2010 -- #1017

    - by Dave Campbell
    In this Issue: Davide Zordan, Alex Golesh, Michael S. Scherotter, Andrej Tozon, Alex Knight, Jeff Blankenburg(-2-), Jeremy Likness, and Laurent Bugnion. Above the Fold: Silverlight: "My “What’s new in Silverlight 4 demo” app" Andrej Tozon WP7: "Taking a screenshot from within a Silverlight #WP7 application" Laurent Bugnion Expression Blend: "PathListBox: getting started" Alex Knight Shoutouts: If you haven't seen this SurfCube app demo on YouTube yet... check it out now: SurfCube V1.0 Windows Phone 7 Browser Want to get a free WP7 class from Shawn Wildermuth? Check this out: Webinar: Writing your first Windows Phone 7 Application Koen Zwikstra announed the next preview of his great tool: Silverlight Spy Preview 2 From SilverlightCream.com: Using the Multi-Touch Behavior in a Windows Phone 7 Multi-Page application Davide Zordan has a post up responding to questions he receives about multi-touch on WP7 in applications spanning more than one page. Silverlight for Windows Phone 7 Quick Tip: Fix missing icons while using DatePicker/TimePicker controls Alex Golesh discusses the use of the DatePicker control from the WP7 toolkit and found an unpleasant surprise associated with the Done/Cancel icons in the ApplicationBar, and has a solution for us. Updated SMF Thumbnail Scrubbing Sample Code Michael S. Scherotter has a post up about an update he's done to Silverlight 4 of code that allows thumbnail views of a video while 'scrubbing' ... don't know what that is? read the post :) My “What’s new in Silverlight 4 demo” app Andrej Tozon admits he's a little behind with this post, but as he points out, it might be a good time to review Silverlight 4 features, on the eve of 5. PathListBox: getting started One half the Knight team -- Alex Knight this time, has the first post of a series on the PathListBox up ... some real Expression Blend goodness. What I Learned in WP7 – Issue #9 Two more from Jeff Blankenburg today, in his number 9, he starts off demonstrating passing data between pages when navigating and fnishes up with some excellent info for submitting apps to the marketplace. What I Learned in WP7 – #Issue 10 Jeff Blankenburg's number 10 elaborates on the query string data he discussed in number 9. Using Sterling in Windows Phone 7 Applications Who better than the author?? Jeremy Likness has an end-to-end WP7/Sterling app up on his blog... begin with downloading Sterling, discuss what's needed to support Tombstoning, even custom serialization. Taking a screenshot from within a Silverlight #WP7 application Laurent Bugnion has a post up describing something people have been looking for: getting a screenshot of a WP7 application's page. Stay in the 'Light! Twitter SilverlightNews | Twitter WynApse | WynApse.com | Tagged Posts | SilverlightCream Join me @ SilverlightCream | Phoenix Silverlight User Group Technorati Tags: Silverlight    Silverlight 3    Silverlight 4    Windows Phone MIX10

    Read the article

  • ubuntu 11.10 foreman error

    - by user1060759
    Like this post I am also trying to complete this heroku tutorial I have installed and used everything (node.js, npm, express) successfully until I got to Foreman. I installed Foreman by first installing Ruby: alex@ubuntu:~$ sudo apt-get install ruby1.9.1 then installing Foreman. I am a newbie to Unix so I "sudo" perhaps unnecessarily here, but I got confirmation in the terminal that it had installed but also some errors: alex@ubuntu:~/NodeHelloWorld$ sudo gem install foreman Invalid gemspec in [/var/lib/gems/1.8/specifications/foreman-0.26.1.gemspec]: invalid date format in specification: "2011-11-10 00:00:00.000000000Z" Invalid gemspec in [/var/lib/gems/1.8/specifications/term-ansicolor-1.0.7.gemspec]: invalid date format in specification: "2011-10-13 00:00:00.000000000Z" Invalid gemspec in [/var/lib/gems/1.8/specifications/foreman-0.26.1.gemspec]: invalid date format in specification: "2011-11-10 00:00:00.000000000Z" Invalid gemspec in [/var/lib/gems/1.8/specifications/term-ansicolor-1.0.7.gemspec]: invalid date format in specification: "2011-10-13 00:00:00.000000000Z" Successfully installed term-ansicolor-1.0.7 Successfully installed foreman-0.26.1 Then when I try to start foreman I get similar: alex@ubuntu:~/NodeHelloWorld$ foreman start Invalid gemspec in [/var/lib/gems/1.8/specifications/foreman-0.26.1.gemspec]: invalid date format in specification: "2011-11-10 00:00:00.000000000Z" Invalid gemspec in [/var/lib/gems/1.8/specifications/term-ansicolor-1.0.7.gemspec]: invalid date format in specification: "2011-10-13 00:00:00.000000000Z" /usr/lib/ruby/vendor_ruby/1.8/rubygems.rb:926:in `report_activate_error': Could not find RubyGem foreman (>= 0) (Gem::LoadError) from /usr/lib/ruby/vendor_ruby/1.8/rubygems.rb:244:in `activate_dep' from /usr/lib/ruby/vendor_ruby/1.8/rubygems.rb:236:in `activate' from /usr/lib/ruby/vendor_ruby/1.8/rubygems.rb:1307:in `gem' from /usr/local/bin/foreman:18 Can anyone help me? I am a newbie to Unix after finally dumping windows as I found I could not get foreman-windows to work for me either I have found this post from someone with apparently the same issue. Does this mean my version of ruby could be wrong? I am running 1.9.1, though again new to ruby as well; alex@ubuntu:~/NodeHelloWorld$ ruby1.9.1 -v ruby 1.9.2p290 (2011-07-09 revision 32553) [i686-linux] Thanks

    Read the article

  • Is there an high quality natural text reader for the mac?

    - by Another Registered User
    I'm reading about 150 pages of text on screen, every day. I will have to read about 15.000 in the next upcoming months. No joke. Well, the problem is this: I suffer from a sort of attention deficit hyperactivity disorder which forces me to read every sentence up to 10 times until I really get it. Mac OS X Snow Leopard has a built-in text reader with the name "Alex". Although it is already pretty good quality, I know there are far better natural sounding voices out there. I have heard already voices that are absolutely amazing compared to Alex. They're so good, that you can't tell anymore the difference between a real person or a computer. Alex still has this "metal factor" in its voice, which makes my ears hurt after 8 hours of listening. The next problem with Alex is, that he never makes a break after a sentence. Also, it's not possible to think about a sentence and then continue reading. It's also not possible to have him repeat a sentence, without tedious text selection and shortcut usage. Actually, the best tool I can imagine would have the option to read a sentence and move on to the next one after pressing a special key, OR repeating the previously one after pressing a special key. That would help so much! And if that's even with one of those bell lab / AT&T / whatever super-natural voices, even better! But it would be already a great relief if there was just a better tool to control Alex. To let him make breaks after sentences or let him speak big chunks of text sentence-by-sentence with fine-grained control over repetition and moving on. Is there anything?

    Read the article

  • Postfix SMTP-relay server against Gmail on CentOS 6.4

    - by Alex
    I'm currently trying to setup an SMTP-relay server to Gmail with Postfix on a CentOS 6.4 machine, so I can send e-mails from my PHP scripts. I followed this tutorial but I get this error output when trying to do a sendmail alex[email protected] Output: tail -f /var/log/maillog Apr 16 01:25:54 ext-server-dev01 postfix/cleanup[3646]: 86C2D3C05B0: message-id=<[email protected]> Apr 16 01:25:54 ext-server-dev01 postfix/qmgr[3643]: 86C2D3C05B0: from=<[email protected]>, size=297, nrcpt=1 (queue active) Apr 16 01:25:56 ext-server-dev01 postfix/smtp[3648]: 86C2D3C05B0: to=<[email protected]>, relay=smtp.gmail.com[173.194.79.108]:587, delay=4.8, delays=3.1/0.04/1.5/0.23, dsn=5.5.1, status=bounced (host smtp.gmail.com[173.194.79.108] said: 530-5.5.1 Authentication Required. Learn more at 530 5.5.1 http://support.google.com/mail/bin/answer.py?answer=14257 qh4sm3305629pac.8 - gsmtp (in reply to MAIL FROM command)) Here is my main.cf configuration, I tried a number of different options but nothing seems to work: alias_database = hash:/etc/aliases alias_maps = hash:/etc/aliases command_directory = /usr/sbin config_directory = /etc/postfix daemon_directory = /usr/libexec/postfix data_directory = /var/lib/postfix debug_peer_level = 2 html_directory = no inet_interfaces = localhost inet_protocols = ipv4 mail_owner = postfix mailq_path = /usr/bin/mailq.postfix manpage_directory = /usr/share/man mydestination = $myhostname, localhost.$mydomain, localhost myhostname = host.local.domain myorigin = $myhostname newaliases_path = /usr/bin/newaliases.postfix queue_directory = /var/spool/postfix readme_directory = /usr/share/doc/postfix-2.6.6/README_FILES relayhost = [smtp.gmail.com]:587 sample_directory = /usr/share/doc/postfix-2.6.6/samples sendmail_path = /usr/sbin/sendmail.postfix setgid_group = postdrop smtp_sasl_auth_enable = yes smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd smtp_sasl_security_options = noanonymous smtp_sasl_tls_security_options = noanonymous smtp_sasl_type = cyrus smtp_tls_CAfile = /etc/ssl/certs/ca-bundle.crt smtp_use_tls = yes smtpd_sasl_path = smtpd unknown_local_recipient_reject_code = 550 In the /etc/postfix/sasl_passwd files (sasl_passwd & sasl_passwd.db) I got the following (removed the real password, and replaced it with "password"): [smtp.google.com]:587 [email protected]:password To create the sasl_passwd.db file, I did that by running this command: postmap hash:/etc/postfix/sasl_passwd Do anybody got an idea why I can't seem to send an e-mail from the server? Kind Regards Alex

    Read the article

  • What's the best way to manage a multi-user project on github?

    - by Jim
    I'm looking to host a new project on github. This project will be worked on by two coders. One of these coders will also be the project manager who will have overall control over the github repo. I've followed the instructions regarding forking a github project at http://help.github.com/forking/. This all works fine and I'm working on the basis that the main repo is controlled by the lead coder, with the secondary coder working on a fork and submitting pull requests to the lead. A problem arises with this, however, when changes are made to the main branch and not pulled by the secondary coder into their fork. The secondary coder could then make changes to their own fork and submit a pull request to the lead, only for their patches to not match up with the main branch. What's the best way to manage this? I've not committed too much time to git/github, so I'm totally up for checking out other hosted solutions if they're better. Simplicity is the key!

    Read the article

  • Oracle Application Express (APEX) - Slides & Webcast replay

    - by Alex Blyth
    G'day everyone Thanks to those who attended yesterdays webcast on Oracle Application Express (APEX). A big thanks to Andrew Clarke for presenting on of Oracle's best kept secrets. You can download the slides here and the replay here.4. Oracle Application Express (APEX)View more presentations from Oracle Australia. Next time, Yasin Mohammed will talk to us about all things "Flashback". Details about this session will be posted in the next day or so. Regards Alex

    Read the article

  • Installing Sphinx on Ubuntu - install location

    - by Alex
    I have to install Sphinx on my Ubuntu 11.10 for it to work on a ruby app. I managed to install it through synaptics, however when I run my sphinx (rake ts:rebuild) I get an error message saying: Sphinx cannot be found on your system. You may need to configure the following settings in your config/sphinx.yml file: * bin_path * searchd_binary_name * indexer_binary_name I guess I just need to edit the sphinx.yml file with the right info but hey, i can't seem to find out where sphinx is. Any help? Thx Alex

    Read the article

  • No Android SDK, neither Java found

    - by Alex
    I have Java installed correctly, I did it by the manual http://www.wikihow.com/Install-Oracle-Java-on-Ubuntu-Linux I also installed Android SDK. However when I try to create a new Project IntelliJ Idea 12 and specify Project SDk choosing New - /home/alex/android-sdk-linux , it says me No Java SDK of appropriate version found. In addition to the Android SDK, you need to define a JSDK 1.5, 1.6 or 1.7 What did I miss?

    Read the article

  • Please help clean this loop

    - by Alex Angelini
    I do not code much in Javascript, but I have the following snippet which IMHO looks horrendous and I have to do this nested iteration quite often in my code. Does anyone have a prettier/easier to read solution? function addBrowse(data) { var list = $('<ul></ul>') for(i = 0; i < data.list.length; i++) { var file = list.append('<li class="toLeft">' + data.list[i].name + '</li>') for(j = 0; j < data.list[i].children.length; j++) { var db = file.append('<li>' + data.list[i].children[j].name + '</li>') for(k = 0; k < data.list[i].children[j].children.length; k++) db.append('<li class="toRight">' + data.list[i].children[j].children[k].name + '</li>') } } $('#browse').append(list).show()} Here is a sample data element {"file":"","db":"","tbl":"","page":"browse","list":[ { "name":"/home/alex/GoSource/test1.txt", "children":[ { "name":"go", "children":[ { "name":"validation1", "children":[ ] } ] } ] }, { "name":"/home/alex/GoSource/test2.txt", "children":[ { "name":"go", "children":[ { "name":"validation2", "children":[ ] } ] } ] }, { "name":"/home/alex/GoSource/test3.txt", "children":[ { "name":"go", "children":[ { "name":"validation3", "children":[ ] } ] } ] }]} Thanks a lot

    Read the article

  • How to configure emacs by using this file?

    - by Andy Leman
    From http://public.halogen-dg.com/browser/alex-emacs-settings/.emacs?rev=1346 I got: (setq load-path (cons "/home/alex/.emacs.d/" load-path)) (setq load-path (cons "/home/alex/.emacs.d/configs/" load-path)) (defconst emacs-config-dir "~/.emacs.d/configs/" "") (defun load-cfg-files (filelist) (dolist (file filelist) (load (expand-file-name (concat emacs-config-dir file))) (message "Loaded config file:%s" file) )) (load-cfg-files '("cfg_initsplit" "cfg_variables_and_faces" "cfg_keybindings" "cfg_site_gentoo" "cfg_conf-mode" "cfg_mail-mode" "cfg_region_hooks" "cfg_apache-mode" "cfg_crontab-mode" "cfg_gnuserv" "cfg_subversion" "cfg_css-mode" "cfg_php-mode" "cfg_tramp" "cfg_killbuffer" "cfg_color-theme" "cfg_uniquify" "cfg_tabbar" "cfg_python" "cfg_ack" "cfg_scpaste" "cfg_ido-mode" "cfg_javascript" "cfg_ange_ftp" "cfg_font-lock" "cfg_default_face" "cfg_ecb" "cfg_browser" "cfg_orgmode" ; "cfg_gnus" ; "cfg_cyrillic" )) ; enable disabled advanced features (put 'downcase-region 'disabled nil) (put 'scroll-left 'disabled nil) (put 'upcase-region 'disabled nil) ; narrow cursor ;(setq-default cursor-type 'hbar) (cua-mode) ; highlight current line (global-hl-line-mode 1) ; AV: non-aggressive scrolling (setq scroll-conservatively 100) (setq scroll-preserve-screen-position 't) (setq scroll-margin 0) (custom-set-variables ;; custom-set-variables was added by Custom. ;; If you edit it by hand, you could mess it up, so be careful. ;; Your init file should contain only one such instance. ;; If there is more than one, they won't work right. '(ange-ftp-passive-host-alist (quote (("redbus2.chalkface.com" . "on") ("zope.halogen-dg.com" . "on") ("85.119.217.50" . "on")))) '(blink-cursor-mode nil) '(browse-url-browser-function (quote browse-url-firefox)) '(browse-url-new-window-flag t) '(buffers-menu-max-size 30) '(buffers-menu-show-directories t) '(buffers-menu-show-status nil) '(case-fold-search t) '(column-number-mode t) '(cua-enable-cua-keys nil) '(user-mail-address "[email protected]") '(cua-mode t nil (cua-base)) '(current-language-environment "UTF-8") '(file-name-shadow-mode t) '(fill-column 79) '(grep-command "grep --color=never -nHr -e * | grep -v .svn --color=never") '(grep-use-null-device nil) '(inhibit-startup-screen t) '(initial-frame-alist (quote ((width . 80) (height . 40)))) '(initsplit-customizations-alist (quote (("tabbar" "configs/cfg_tabbar.el" t) ("ecb" "configs/cfg_ecb.el" t) ("ange\\-ftp" "configs/cfg_ange_ftp.el" t) ("planner" "configs/cfg_planner.el" t) ("dired" "configs/cfg_dired.el" t) ("font\\-lock" "configs/cfg_font-lock.el" t) ("speedbar" "configs/cfg_ecb.el" t) ("muse" "configs/cfg_muse.el" t) ("tramp" "configs/cfg_tramp.el" t) ("uniquify" "configs/cfg_uniquify.el" t) ("default" "configs/cfg_font-lock.el" t) ("ido" "configs/cfg_ido-mode.el" t) ("org" "configs/cfg_orgmode.el" t) ("gnus" "configs/cfg_gnus.el" t) ("nnmail" "configs/cfg_gnus.el" t)))) '(ispell-program-name "aspell") '(jabber-account-list (quote (("[email protected]")))) '(jabber-nickname "AVK") '(jabber-password nil) '(jabber-server "halogen-dg.com") '(jabber-username "alex") '(remember-data-file "~/Plans/remember.org") '(safe-local-variable-values (quote ((dtml-top-element . "body")))) '(save-place t nil (saveplace)) '(scroll-bar-mode (quote right)) '(semantic-idle-scheduler-idle-time 432000) '(show-paren-mode t) '(svn-status-hide-unmodified t) '(tool-bar-mode nil nil (tool-bar)) '(transient-mark-mode t) '(truncate-lines f) '(woman-use-own-frame nil)) ; ?? ????? ??????? y ??? n? (fset 'yes-or-no-p 'y-or-n-p) (custom-set-faces ;; custom-set-faces was added by Custom. ;; If you edit it by hand, you could mess it up, so be careful. ;; Your init file should contain only one such instance. ;; If there is more than one, they won't work right. '(compilation-error ((t (:foreground "tomato" :weight bold)))) '(cursor ((t (:background "red1")))) '(custom-variable-tag ((((class color) (background dark)) (:inherit variable-pitch :foreground "DarkOrange" :weight bold)))) '(hl-line ((t (:background "grey24")))) '(isearch ((t (:background "orange" :foreground "black")))) '(message-cited-text ((((class color) (background dark)) (:foreground "SandyBrown")))) '(message-header-name ((((class color) (background dark)) (:foreground "DarkGrey")))) '(message-header-other ((((class color) (background dark)) (:foreground "LightPink2")))) '(message-header-subject ((((class color) (background dark)) (:foreground "yellow2")))) '(message-separator ((((class color) (background dark)) (:foreground "thistle")))) '(region ((t (:background "brown")))) '(tooltip ((((class color)) (:inherit variable-pitch :background "IndianRed1" :foreground "black"))))) The above is a python emacs configure file. Where should I put it to use it? And, are there any other changes I need to make?

    Read the article

  • Linux Debian Security Breach - what now? [closed]

    - by user897075
    Possible Duplicate: My server's been hacked EMERGENCY I installed Debian (Squeeze) a while back in my home network to host some personal sites (thank god). During the installation it prompted me to enter a user other than root - so in a rush I used my name as user and pass (alex/alex for what its worth). I know it's horrible practice but during the setup of this server I'm always logged in as root to perform configurations, etc. Few days or a week passes and I forget to change the password. Then I finally get my web site finished and I open the port forwarding on my router and DynDNS to point to my server in my home. I've done this many times in the past never had issues but I use a cryptic root password and I guess disabled regular accounts. Today I reformat my Windows 7 and after spending all day tweaking and updating SP1 I look for cloning apps and find clonezilla and see it supports SSH cloning, so I go through the process only to discover I need a user, so I log into my web-server and see I have the user 'alex' already in and realize I don't know the password. So I change the password to something cryptic and visit the directory 'home' only to realize their are contents such as passfile, bengos, etc. My heart sinks, I've been hacked!!! Sure as hell there are all sort of scripts and password files. I run a 'last' command and it seems they last logged in april 3rd. Question: What can I do to see if they did anything destructive? Should I reformat and reinstall? How restrictive is Debian/Squeeze in terms of user permissions out of the box - all my personal website stuff was created using 'root' so changing files does not seem to have occured. How did they determine there was a user 'alex' on the machine? Can you query any machine and figure this out? What the users are? Looks like they tried to run a IP scan...other nodes on the network are running Windows 7. One of which seems a little wonky as of late - is it possible they buggered up that system? What corrective action can I take to avoid this from happening again? And figure out what might have changed or been hacked? I'm hoping debian out of box is fairly secure and at best he managed to read some of my source code. :p Regards, Alex

    Read the article

  • Good practices - database programming, unit testing

    - by Piotr Rodak
    Jason Brimhal wrote today on his blog that new book, Defensive Database Programming , written by Alex Kuznetsov ( blog ) is coming to bookstores. Alex writes about various techniques that make your code safer to run. SQL injection is not the only one vulnerability the code may be exposed to. Some other include inconsistent search patterns, unsupported character sets, locale settings, issues that may occur during high concurrency conditions, logic that breaks when certain conditions are not met. The...(read more)

    Read the article

  • Modifying Contiguous Time Periods in a History Table

    Alex Kuznetsov is credited with a clever technique for creating a history table for SQL that is designed to store contiguous time periods and check that these time periods really are contiguous, using nothing but constraints. This is now increasingly useful with the DATE data type in SQL Server. The modification of data in this type of table isn't always entirely intuitive so Alex is on hand to give a brief explanation of how to do it.

    Read the article

  • Which web site gives the most accurate indication of a programmer's capabilities?

    - by Jerry Coffin
    If you were hiring programmers, and could choose between one of (say) the top 100 coders on topcoder.com, or one of the top 100 on stackoverflow.com, which would you choose? At least to me, it would appear that topcoder.com gives a more objective evaluation of pure ability to solve problems and write code. At the same time, despite obvious technical capabilities, this person may lack any hint of social skills -- he may be purely a "lone coder", with little or no ability to help/work with others, may lack mentoring ability to help transfer his technical skills to others, etc. On the other hand, stackoverflow.com would at least appear to give a much better indication of peers' opinion of the coder in question, and the degree to which his presence and useful and helpful to others on the "team". At the same time, the scoring system is such that somebody who just throws up a lot of mediocre (or even poor answers) will almost inevitably accumulate a positive total of "reputation" points -- a single up-vote (perhaps just out of courtesy) will counteract the effects of no fewer than 5 down-votes, and others are discouraged (to some degree) from down-voting because they have to sacrifice their own reputation points to do so. At the same time, somebody who makes little or no technical contribution seems unlikely to accumulate a reputation that lands them (even close to) the top of the heap, so to speak. So, which provides a more useful indication of the degree to which this particular coder is likely to be useful to your organization? If you could choose between them, which set of coders would you rather have working on your team?

    Read the article

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