Daily Archives

Articles indexed Monday October 21 2013

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

  • Choosing a new programming language to learn [on hold]

    - by Xelom
    I'm a Microsoft Stack(ASP.NET, C#) developer. Mainly, I develop server side software, windows services, restful apis etc. My client side interaction is really really low. So aside from C# I want to learn a new language. Time is precious and I want to give my focus to a language which have a future. My language list is: Scala (Powerful usage in Twitter) Go (Getting popular and channels are pretty awesome) Erlang (Stable server side programs. Used at Whatsapp) You can give advice for the above or you can give me a better option. My only exception is Objective-C. I don't want to get in that one. Thanks

    Read the article

  • Is implementing an interface defined in a subpackage an anti-pattern?

    - by Michael Kjörling
    Let's say I have the following: package me.my.pkg; public interface Something { /* ... couple of methods go here ... */ } and: package me.my; import me.my.pkg.Something; public class SomeClass implements Something { /* ... implementation of Something goes here ... */ /* ... some more method implementations go here too ... */ } That is, the class implementing an interface lives closer to the package hierarchy root than does the interface it implements but they both belong in the same package hierarchy. The reason for this in the particular case I have in mind is that there is a previously-existing package that groups functionality which the Something interface logically belongs to, and the logical (as in both "the one you'd expect" and "the one where it needs to go given the current architecture") implementation class exists previously and lives one level "up" from the logical placement of the interface. The implementing class does not logically belong anywhere under me.my.pkg. In my particular case, the class in question implements several interfaces, but that feels like it doesn't make any (or at least no significant) difference here. I can't decide if this is an acceptable pattern or not. Is it or is it not, and why?

    Read the article

  • Checking whether php script was resolved by optimal way

    - by user2135931
    Can anybody give some advise how to check the arbitrary php code on optimal solution. For example I create a simple algorithm and sent it on the special resource. After proccessing my algorithm this resource give me result whether my code is nice. If no it give me some advice and tell what is wrong (maybe I forgot check devision by zero etc). I looked for php code analyzer but could't find any variants. Maybe someone give me a resource where I can research this problem. Thanks in advance!

    Read the article

  • SQL Error: ORA-00936: missing expression

    - by user2901548
    Qns: Item Description and the treatment date of all treatments for any patients named Jessie Stange (ie GivenName is Jessie & FamilyName is Stange) What i wrote: SELECT DISTINCT Description, Date as treatmentDate WHERE doothey.Patient P, doothey.Account A, doothey.AccountLine AL, doothey.Item.I AND P.PatientID = A.PatientID AND A.AccountNo = AL.AccountNo AND AL.ItemNo = I.ItemNo AND (p.FamilyName = 'Stange' AND p.GivenName = 'Jessie'); error: Error at Command Line:1 Column:30 Error report: SQL Error: ORA-00936: missing expression 00936. 00000 - "missing expression" *Cause: *Action: What is the missing expression???

    Read the article

  • Designing a single look up entity

    - by altsyset
    In almost every application you have this look up entity that provides a dynamic references. This are things like type, category, etc. These entities will always have id, name, desc So at first I designed different entities for each look up. Like education_type, education_level, degree_type.... But on a second thought I decided to have on entity for each of these kinds of entities. But when I am done with the design and check the relation this entity will be referenced by almost all entities in the system and I don't believe that is appropriate. So What is your take on this? Can you give me some clear pros and cons?

    Read the article

  • What is the disadvantage of using abstract class as a database connectivity in zend framework 2 instead of service locator

    - by arslaan ejaz
    If I use database by creating adapter with drivers, initialize it in some abstract class and extend that abstract class to required model. Then use simple query statement. Like this: namespace My-Model\Model\DB; abstract class MysqliDB { protected $adapter; public function __construct(){ $this->adapter = new \Zend\Db\Adapter\Adapter(array( 'driver' => 'Mysqli', 'database' => 'my-database', 'username' => 'root', 'password' => '' )); } } And use abstract class of database like this in my models: class States extends DB\MysqliDB{ public function __construct(){ parent::__construct(); } protected $states = array(); public function select_all_states(){ $data = $this->adapter->query('select * from states'); foreach ($data->execute() as $row){ $this->states[] = $row; } return $this->states; } } I am new to zend framework, before i have experience of working in YII and Codeigniter. I like the object oriented in zend so i want to use it like this. And don't want to use it through service locater something like this: public function getServiceConfig(){ return array( 'factories' => array( 'addserver-mysqli' => new Model\MyAdapterFactory('addserver-mysqli'), 'loginDB' => function ($sm){ $adapter = $sm->get('addserver-mysqli'); return new LoginDB($adapter); } ) ); } In module. Am i Ok with this approach?

    Read the article

  • Writing and Understanding code

    - by Kitex
    I can write code. I can read code but I can't implement good code. How to develop deep understanding of any framework or stuff that we are working on? Is it looking into documentation and working on it? I have seen in this form that people that have great understanding of things they are working on. How is this possible? How to not scrape on the surface only? How to manage time vs learning vs productivity?

    Read the article

  • Can anybody help me in designing my UITableView into MVC Pattern ?

    - by user2877880
    I have written a ViewController in which i get data from the internet and display it in a UItableview using a json parser which uses object for key to identify its objects. What i would like your help in is to convert it into MVC pattern to make it less clumsy instead of including everything in the same controller class. Please try explaining it to me in terms of my code. THANKS IN ADVANCE. The code is as given below #import "ViewController.h" #import "AFNetworking.h" #import "ModelTableArray.h" @implementation ViewController @synthesize tableView = _tableView, activityIndicatorView = _activityIndicatorView, movies = _movies; - (void)viewDidLoad { [super viewDidLoad]; // Setting Up Table View self.tableView = [[UITableView alloc] initWithFrame:CGRectMake(0.0, 0.0, self.view.bounds.size.width, self.view.bounds.size.height) style:UITableViewStylePlain]; self.tableView.dataSource = self; self.tableView.delegate = self; self.tableView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight; self.tableView.hidden = YES; [self.view addSubview:self.tableView]; // Setting Up Activity Indicator View self.activityIndicatorView = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleGray]; self.activityIndicatorView.hidesWhenStopped = YES; self.activityIndicatorView.center = self.view.center; [self.view addSubview:self.activityIndicatorView]; [self.activityIndicatorView startAnimating]; // Initializing Data Source self.movies = [[NSArray alloc] init]; NSURL *url = [[NSURL alloc] initWithString:@"http://itunes.apple.com/search?term=rocky&country=us&entity=movie"]; NSURLRequest *request = [[NSURLRequest alloc] initWithURL:url]; UIRefreshControl *refreshControl = [[UIRefreshControl alloc] init]; [refreshControl addTarget:self action:@selector(refresh:) forControlEvents:UIControlEventValueChanged]; [self.tableView addSubview:refreshControl]; [refreshControl endRefreshing]; AFJSONRequestOperation *operation = [AFJSONRequestOperation JSONRequestOperationWithRequest:request success:^(NSURLRequest *request, NSHTTPURLResponse *response, id JSON) { self.movies = [JSON objectForKey:@"results"]; [self.activityIndicatorView stopAnimating]; [self.tableView setHidden:NO]; [self.tableView reloadData]; } failure:^(NSURLRequest *request, NSHTTPURLResponse *response, NSError *error, id JSON) { NSLog(@"Request Failed with Error: %@, %@", error, error.userInfo); }]; [operation start]; } - (void)refresh:(UIRefreshControl *)sender { NSURL *url = [[NSURL alloc] initWithString:@"http://itunes.apple.com/search?term=rambo&country=us&entity=movie"]; NSURLRequest *request = [[NSURLRequest alloc] initWithURL:url]; AFJSONRequestOperation *operation = [AFJSONRequestOperation JSONRequestOperationWithRequest:request success:^(NSURLRequest *request, NSHTTPURLResponse *response, id JSON) { self.movies = [JSON objectForKey:@"results"]; [self.activityIndicatorView stopAnimating]; [self.tableView setHidden:NO]; [self.tableView reloadData]; } failure:^(NSURLRequest *request, NSHTTPURLResponse *response, NSError *error, id JSON) { NSLog(@"Request Failed with Error: %@, %@", error, error.userInfo); }]; [operation start]; [sender endRefreshing]; } - (void)viewDidUnload { [super viewDidUnload]; } - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { return YES; } // Table View Data Source Methods - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { if (self.movies && self.movies.count) { return self.movies.count; } else { return 0; } } - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *cellID = @"Cell Identifier"; UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:cellID]; if (!cell) { cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:cellID]; } NSDictionary *movie = [self.movies objectAtIndex:indexPath.row]; cell.textLabel.text = [movie objectForKey:@"trackName"]; cell.detailTextLabel.text = [movie objectForKey:@"artistName"]; NSURL *url = [[NSURL alloc] initWithString:[movie objectForKey:@"artworkUrl100"]]; [cell.imageView setImageWithURL:url placeholderImage:[UIImage imageNamed:@"placeholder"]]; return cell; } @end

    Read the article

  • Requring static class setter to be called before constructor, bad design?

    - by roverred
    I have a class, say Foo, and every instance of Foo will need and contain the same List object, myList. Since every class instance will share the same List Object, I thought it would be good to make myList static and use a static function to set myList before the constructor is called. I was wondering if this was bad, because this requires the setter to be called before the constructor? If the person doesn't, the program will crash. Alternative way would be passing myList every time.

    Read the article

  • I've been told that Exceptions should only be used in exceptional cases. How do I know if my case is exceptional?

    - by tieTYT
    My specific case here is that the user can pass in a string into the application, the application parses it and assigns it to structured objects. Sometimes the user may type in something invalid. For example, their input may describe a person but they may say their age is "apple". Correct behavior in that case is roll back the transaction and to tell the user an error occurred and they'll have to try again. There may be a requirement to report on every error we can find in the input, not just the first. In this case, I argued we should throw an exception. He disagreed, saying, "Exceptions should be exceptional: It's expected that the user may input invalid data, so this isn't an exceptional case" I didn't really know how to argue that point, because by definition of the word, he seems to be right. But, it's my understanding that this is why Exceptions were invented in the first place. It used to be you had to inspect the result to see if an error occurred. If you failed to check, bad things could happen without you noticing. Without exceptions every level of the stack needs to check the result of the methods they call and if a programmer forgets to check in one of these levels, the code could accidentally proceed and save invalid data (for example). Seems more error prone that way. Anyway, feel free to correct anything I've said here. My main question is if someone says Exceptions should be exceptional, how do I know if my case is exceptional?

    Read the article

  • What command are my volume keys running?

    - by user2787904
    In Unity I use my ThinkPad hot keys to change the volume. I need to know the command that these keys run so that I can bind it in my window manager. I have tried using amixer but could not change the volume through command line amixer set Master 10%- amixer: Unable to find simple control 'Master',0 amixer scontrols: Simple mixer control 'IEC958',0 amixer set 'IEC958' 50%- amixer: Invalid command! So obviously this is not what Unity is running. I have tried changing the default sound card as well but that didn't help.

    Read the article

  • Ubuntu / FileZilla FTP Set Up

    - by Dean Mark Anthony
    I have successfully installed VSFTPD and I have configured it to allow FTP connection from my Windows laptop running FileZilla. FileZilla is pointing at the directory srv/ftp on my server; the files that are stored in srv/ftp are showing in the Remote Site section of FileZilla. This indicates that it is connecting to my FTP server. What I need to do is point FileZilla toward the directory var/www so that all files that I transfer are visible on my self-hosted website. I cannot find out how to do this. Do I need to perform some updates to the vsftpd.conf file, and if so what do I change? Do I need to perform updates to my FileZilla console? I am comfortable in terms of changing .conf files, port forwarding and setting permissions etc. I just need to know what precisely needs to be changed. Much love...

    Read the article

  • language problem ubuntu 13.10

    - by Dennis Rasmussen
    I just installed Ubuntu 13.10, and really enjoy it. I am from Denmark, and use the supported Danish keyboard-layout (and chose it as default in the install), but whenever i reboot Ubuntu switches back to English keyboard-layout, though the little icon in the panel says it's in Danish. I have to click on the icon every time to change it back to Danish. I tried removing the English keyboard-layout, but it didn't help. Any suggestions?

    Read the article

  • USB gets disabled when i boot in linux (ubuntu 3.5.7)

    - by Gaurav Vyas
    I have connected USB keyboard & mouse to core i7 intel processor.When i boot my system in ubuntu with kernel 3.2.21 it runs properly i.e usb keyboard & usb mouse works satisfactorily. ISSUE When i boot my system in linux(ubuntu 3.5.7) USB keyboard & usb Mouse stops working.i have to boot my system by pressing "e" and then "Enter" i.e it directly links with the hardware.Mouse doesnt get power i.e LED under my optical mouse doesnt glow. kindly help me.

    Read the article

  • Online accounts advanced setting with Empathy (13.10)

    - by uruloke
    the new online accounts doesn't have the advanced settings as the empathy accounts had. How do i change the google server to connect to? i read here: https://wiki.gnome.org/Empathy/FAQ I can't connect to my Google Talk account Your router is probably blocking DNS SRV requests. If possible you should try to fix it. If you can't, the easiest work around is to set "talk.google.com" in the "Server" field of the advanced section of the account. So i think this might fix my problem, or maybe just an option to shift the port it connects to. and is there anyone that knows how to use join any IRC channels with Empathy? i have installed the plugin, but i don't know how to join a channel.

    Read the article

  • Dependencies lib32asound2 [duplicate]

    - by The Mini John
    This question already has an answer here: 'teamviewer depends on (…)' while trying to install TeamViewer 4 answers I was trying to install Teamviewer, but i was getting a dependencies error. I tried to install them but with no luck.. I think Mod's are not reading the questions trough when they mark as duplicate I'm getting this Error: Unpacking teamviewer (from teamviewer_linux_x64.deb) ... dpkg: dependency problems prevent configuration of teamviewer: teamviewer depends on lib32asound2; however: Package lib32asound2 is not installed. teamviewer depends on lib32z1; however: Package lib32z1 is not installed. teamviewer depends on ia32-libs; however: Package ia32-libs is not installed. dpkg: error processing teamviewer (--install): dependency problems - leaving unconfigured Errors were encountered while processing: teamviewer I tried sudo apt-get -f install but getting Package ia32-libs is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source However the following packages replace it: lib32z1 lib32ncurses5 lib32bz2-1.0 Package lib32asound2 is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source E: Package 'lib32asound2' has no installation candidate E: Package 'ia32-libs' has no installation candidate i cant even get to the sudo dpkg -i teamviewer_linux_x64.deb If i force installation sudo dpkg --force-depends -i teamviewer_linux_x64.deb Although it's "Setting up Temviewer" it gives me this I'm fairly new to ubuntu, can anyone help me out ? I'm on Ubuntu 13.10

    Read the article

  • How to fix splash screen in Ubuntu 13.10!

    - by Nolt
    This is soultion how to fix no splash screen in Ubuntu after nvidia proprietary driver installation. Open your terminal and type sudo apt-get install v86d Then sudo gedit /etc/default/grub Find this line #GRUB_GFXMODE=640x480 and chagne for this one (of course choose your resolution) GRUB_GFXMODE=1440x900x24 GRUB_GFXPAYLOAD_LINUX=keep Save file and type in terminal echo FRAMEBUFFER=y | sudo tee /etc/initramfs-tools/conf.d/splash sudo update-initramfs -u sudo update-grub2 It's worked for me in all Ubuntu versions. Give it a try :)

    Read the article

  • Ralink Bluetooth not working in Ubuntu 13.04

    - by Sourabh
    My Bluetooth is not working in Ubuntu 13.04. I am unable to turn it on and also, Bluetooth icon doesn't show up in the top bar. I asked about this on #ubuntu IRC and they said that I am missing the proprietary drivers for it. There is nothing under Additional Drivers in Software and Updates Bluetooth does work 'Try Ubuntu mode' when I boot Ubuntu from DVD/USB. How can I get the required drivers?

    Read the article

  • Lost power during upgrade, how do I recover?

    - by Ryan McClure
    I was attempting to update my 11.10 install to 12.04beta. During the install step, I accidentally lost power to my laptop (the power cable came unplugged) and it shut down. Whenever I go to boot now, I can select my install via Grub and it loads up to where the sign-in should happen, but I get a display that looks like what you see as soon as you shut down. It looks like it locks after checking for the battery. Is there anyway, with or without Live media, to restore my machine's install/update to 12.04 but still keep my settings/applications/files?

    Read the article

  • How do I remap the buttons on an Apple Mighty Mouse?

    - by Jonathan.
    I just started using Ubuntu instead of Windows, my initial reaction was "omg this is awful", but after a while it grew on me, and I don't plan on going back to Windows. However I have an Apple Mighty Mouse which I was given today, and the buttons on it don't quite work. Left and right click work, so does scrolling right and down, also the back button works. However the forward button goes back, and the scroll up button sometimes scrolls down, scrolling left just doesn't work. Is there a way to fix this? Like remap the buttons? I'm not entirely sure how the driver thing works in Ubuntu?

    Read the article

  • Grapeshot crawler ignoring robots.txt

    - by QF_Developer
    Has anyone come across a crawler called Grapeshot? They are hammering the same page repeatedly on our website. I believe they are looking for ad related keywords, based on previous content ad campaigns. The odd thing is we never ran any such campaigns on the page they are so interested in. We do have only a few pages running AdSense, is this what has attracted Grapeshot? I've added the following declaration to my robots.txt, but they don't seem to be honouring it? User-agent: grapeshot Disallow: / Any ideas on how to block this nuisance crawler? I'm starting to think the best way is by setting up IP rules in IIS?

    Read the article

  • How to structure well my adwords campaign?

    - by Romain Dorange
    I am starting an adwords campaigns and I will measure conversion rates using the Adwords conversion tracking pixel. Conversion might be account creation or a concrete sale. As it will be a test campaign to have some insights on CTR, CR, etc... on the future, I am likely to try several configurations. two differents ads with different landing URL and messages : one with a focus on the product / the other will contains a discount embedded in the URL 4 differents groups/thematics of keywords I guess I have to build 4 ads groups based on the keywords 2 ads with the different messages assign the two ads to each ads groups follow the campaign precisely in the ads tabs where I can see the effectiveness of each Ads per Ads Groups (for a total of 8 lines of reporting) Am I right ? Also, what are the KPI I can have from an adwords campaign tu measure global effectiveness? measure of ROI from concrete sales (tracking pixel with e-commerce tag on confirmation page) measure of ROI from leads acquisition (tracking pixel on account creation) measure of traffic increase with the campaign Thanks a lot.

    Read the article

  • How to reduce the CPU load on a hosting with WordPress installed as a CMS? [on hold]

    - by Akky Awesøme
    I have been using hostgators hatchling plan for three months. I got an email from the hosting that my website is creating an over load on CPU. They said that I am eating up their processor and as a precaution, they have temporarily suspended my account. When I contacted their customer support, they said: You have to optimize your database and use some sort of caching mechanism, where the script does not need to generate a new page with every request, helps to lower the over load that a script will cause. I am not a technical geek, I am wondering how I will do this thing. I don't have any resource to hire a web developer to do this job. My website is down for 48hours. I was using wp super cache along with cloudfare's free support. Now I have intalled optimize-db plugin and optimized my database. Please provide me with some more tips on how to optimize my database to reduce CPU usage. Any help would be appreciated.

    Read the article

  • Monitoring JSON requests sent/received from the browser?

    - by Uwe Keim
    Having a website that generates and receives JSON requests via AJAX, I failed to find a tool that shows me live the communication including the content of the JSON calls. I thought that the Google Chrome developer tools or the IE 9 developer tools do have such a feature, but again, I failed. Searching Google, I failed too. So my question is: Is there a client-side tool to monitor the content of JSON requests that a website sends to the server?

    Read the article

  • Would it be more efficient to handle 2D collision detection with polygons, rather than both squares/polygons?

    - by KleptoKat
    I'm working on a 2D game engine and I'm trying to get collision detection as efficient as possible. One thing I've noted is that I have a Rectangle Collision collider, a Shape (polygon) collider and a circle collider. Would it be more efficient (either dev-time wise or runtime wise) to have just one shape collider, rather than have that and everything else? I feel it would optimize my code in the back end, but how much would it affect my game at runtime? Should I be concerned with this at all, as 3D games generally have tens of thousands of polygons?

    Read the article

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