Daily Archives

Articles indexed Tuesday July 2 2013

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

  • Do logged in users need to browse a site over https?

    - by Luke
    I've never thought it was necessary, but a client has requested that all webpages served to logged in users be delivered over HTTPS. Aside from the implementation standpoint, which I don't think I'm going to pursue is there any real reason for this request ? For clarity, the login / logout process, account settings, registration preferences and all user related scripts are served over https. but I can't see the point in my news articles, press releases, events etc... being served in this manner? Am I missing something ?

    Read the article

  • Unit test SHA256 wrapper queries

    - by Sam Leach
    I am just beginning to write unit tests. So please bear with me. I have the following SHA256 wrapper. public static string SHA256(string plainText) { StringBuilder sb = new StringBuilder(); SHA256CryptoServiceProvider provider = new SHA256CryptoServiceProvider(); var hashedBytes = provider.ComputeHash(Encoding.UTF8.GetBytes(plainText)); for (int i = 0; i < hashedBytes.Length; i++) { sb.Append(hashedBytes[i].ToString("x2").ToLower()); } return sb.ToString(); } Do I want to be testing it? If so, what do you recommend? My thought process is as follows: What logic is there here. The answer is my for loop and ToString("x2") so from my understanding I want to be testing this part? I can assume Encoding.UTF8.GetBytes(plainText) works. Correct assumption? I can assume SHA256CryptoServiceProvider.ComputeHash() works. Correct assumption? I want to be only testing my logic. In this case is limited to the printing of hex encoded hash. Correct? Thanks.

    Read the article

  • Coding standards in programming?

    - by vicky
    I am an WordPress Plugin Developer. I am not sure how to follow the coding standard while creating a plugin of wordpress. I check with some of the plugins like woocommerce and All in one SEO Plugin in that they are maintaining the proper coding standard. Basically I am Using the NetBeans IDE. Is it possible to make the proper space and coding standards in that IDE. I am Wondering to View his code is very neat and clean. How can i do this or how they are maintaining this. Anyone suggest me to make the wordpress plugin with well coding standards. Thanks, vicky

    Read the article

  • Are the technologies used in an application part of the architecture, or do they represent implementation/detailed design details?

    - by m3th0dman
    When designing and writing documentation for a project an architecture needs to be clearly defined: what are the high-level modules of the system, what are their responsibilities, how do they communicate with each other, what protocols are used etc. But in this list, should the concrete technologies be specified or this is actually an implementation detail and need to be specified at a lower level? For example, consider a distributed application that has two modules which communicate asynchronously via AMQP protocol, mediated by a message broker. The fact that these modules use the Spring AMQP library for sending and receiving messages is a fact that needs to be specified in the architecture or is a lower-level detailed design/implementation detail?

    Read the article

  • How to familiarize myself with Python

    - by Zel
    I am Python beginner. Started Python 1.5 months back. I downloaded the Python docs and read some part of the tutorial. I have been programming on codechef.com and solving problems of projecteuler. I am thinking of reading Introduction to algorithms and following this course on MIT opencourse ware as I haven't been getting much improvement in programming and I am wasting much time thinking just what should I do when faced with any programming problem. But I think that I still don't know the correct way to learn the language itself. Should I start the library reference or continue with Python tutorial? Is learning algorithms useful for language such as C and not so much for Python as it has "batteries included"? Are there some other resources for familiarization with the language and in general for learning to solve programming problems? Or do I need to just devote some more time?

    Read the article

  • How you choose your first job as a programmer? [on hold]

    - by sliter
    For Brief I am a recently graduated CS student. I am looking for a job these days, but I have no idea what kind of software development jobs I like(embedded system,web development or else...). And I am looking for your advice. Here is a little more While I was a student, I had an one year internship experience as a system engineer in a semi-conductor company where I wrote Linux driver, tuned system performance, etc.. I was happy about this experience as it allowed me to deepen my understanding of the operating system and different low level things. And I thought "Em, I will continue in the embedded area after I graduate". At the end of my study, I am doing an another internship in web development, both front-end and back-end. And I also enjoys a lot the process of learning new things and making it work (Backbone, Node, socketio, etc..). Now, when I am looking for a software development position, I do not know what to apply! All I know is that I want a job which allows me to keep up with the trends instead of repeating. But besides this, I've no idea what specific type of job I want to do. Turn back to embedded system? Continue with web development? Change to other promising areas(data mining)? All these development positions makes no big difference to me. But I think this is not good and I need some criteria at choosing. So I am looking for advice and I would really appreciate if you can share your experience.

    Read the article

  • How do I know when should I package my classes in Ruby?

    - by Omega
    In Ruby, I'm creating a small game development framework. Just some personal project - a very small group of friends helping. Now I am in need of handling geometric concepts. Rectangles, Circles, Polygons, Vectors, Lines, etc. So I made a class for each of these. I'm stuck deciding whether I should package such classes in a module, such as Geometry. So I'd access them like Geometry::Rectangle, or just Rectangle if I include the module. Now then, my question isn't about this specific scenario. I'd like to know, when is it suitable to package similar classes into one module in Ruby? What factors should I consider? Amount of classes? Usage frequency? Complexity?

    Read the article

  • Why do we use networking libraries instead of plain NSURLRequests and NSURLConnection ?

    - by Amogh Talpallikar
    in iOS development, I have often seen people creating a networking module to interact with their APIs. This module generally sits on top of a networking framework like MKNetWorkKit or AFNetWorking. In most of the cases, It's all about sending GET,POST request and parsing the response which is in most cases JSON. What extra practical benefits that these libraries provide that an iOS developer should be leveraging which the plain Cocoa Networking APIs lack ? I can understand RESTKit as one exception where it takes care of the conversion of JSON to native objects and also interfaces with Core Data but what about others ?

    Read the article

  • Is OpenStack suitable as a fault tolerant DB host?

    - by Jit B
    I am trying to design a fault tolerant DB cluster (schema does not matter) that would not require much maintenance. After looking at almost everything from MySQL to MongoDB to HBase I still find that no DB is easily scalable - Cassandra comes close but it has its own set of problems. So I was thinking what if I run something like MySQL or OrientDB on top of a large openstack VM. The VM would be fault tolerant by itself so I dont need to do it st DB level. Is it viable? Has it been done before? If not then what are the possible problems with this approach?

    Read the article

  • Implementing MVC pattern in SWT application

    - by Pradeep Simha
    I am developing an SWT application (it's basically an Eclipse plugin, so I need to use SWT). Currently my design is as follows: Model: In model, I have POJOs which represents the actual fields in views. View: It is a dumb layer, it contains just UI and contains no logic (not even event handlers) Controller: It acts as a mediator b/w those two layers. Also it is responsible for creating view layer, handling events etc. Basically I have created all of the controls in view as a static like this public static Button btnLogin and in controller I have a code like this: public void createLoginView(Composite comp) { LoginFormView.createView(comp); //This createView method is in view layer ie LoginFormView LoginFormView.btnLogin.addSelectionListener(new SelectionListener() { //Code goes here }); } Similalrly I have done for other views and controls. So that in main class and other classes I am calling just createLoginView of controller. I am doing similar thing for other views. So my question, is what I am doing is correct? Is this design good? Or I should have followed any other approach. Since I am new to SWT and Eclipse plugin development (basically I am Java EE developer having 4+ years of exp). Any tips/pointers would be appreciated.

    Read the article

  • How to make creating viewmodels at runtime less painful

    - by Mr Happy
    I apologize for the long question, it reads a bit as a rant, but I promise it's not! I've summarized my question(s) below In the MVC world, things are straightforward. The Model has state, the View shows the Model, and the Controller does stuff to/with the Model (basically), a controller has no state. To do stuff the Controller has some dependencies on web services, repository, the lot. When you instantiate a controller you care about supplying those dependencies, nothing else. When you execute an action (method on Controller), you use those dependencies to retrieve or update the Model or calling some other domain service. If there's any context, say like some user wants to see the details of a particular item, you pass the Id of that item as parameter to the Action. Nowhere in the Controller is there any reference to any state. So far so good. Enter MVVM. I love WPF, I love data binding. I love frameworks that make data binding to ViewModels even easier (using Caliburn Micro a.t.m.). I feel things are less straightforward in this world though. Let's do the exercise again: the Model has state, the View shows the ViewModel, and the ViewModel does stuff to/with the Model (basically), a ViewModel does have state! (to clarify; maybe it delegates all the properties to one or more Models, but that means it must have a reference to the model one way or another, which is state in itself) To do stuff the ViewModel has some dependencies on web services, repository, the lot. When you instantiate a ViewModel you care about supplying those dependencies, but also the state. And this, ladies and gentlemen, annoys me to no end. Whenever you need to instantiate a ProductDetailsViewModel from the ProductSearchViewModel (from which you called the ProductSearchWebService which in turn returned IEnumerable<ProductDTO>, everybody still with me?), you can do one of these things: call new ProductDetailsViewModel(productDTO, _shoppingCartWebService /* dependcy */);, this is bad, imagine 3 more dependencies, this means the ProductSearchViewModel needs to take on those dependencies as well. Also changing the constructor is painful. call _myInjectedProductDetailsViewModelFactory.Create().Initialize(productDTO);, the factory is just a Func, they are easily generated by most IoC frameworks. I think this is bad because Init methods are a leaky abstraction. You also can't use the readonly keyword for fields that are set in the Init method. I'm sure there are a few more reasons. call _myInjectedProductDetailsViewModelAbstractFactory.Create(productDTO); So... this is the pattern (abstract factory) that is usually recommended for this type of problem. I though it was genius since it satisfies my craving for static typing, until I actually started using it. The amount of boilerplate code is I think too much (you know, apart from the ridiculous variable names I get use). For each ViewModel that needs runtime parameters you'll get two extra files (factory interface and implementation), and you need to type the non-runtime dependencies like 4 extra times. And each time the dependencies change, you get to change it in the factory as well. It feels like I don't even use a DI container anymore. (I think Castle Windsor has some kind of solution for this [with it's own drawbacks, correct me if I'm wrong]). do something with anonymous types or dictionary. I like my static typing. So, yeah. Mixing state and behavior in this way creates a problem which don't exist at all in MVC. And I feel like there currently isn't a really adequate solution for this problem. Now I'd like to observe some things: People actually use MVVM. So they either don't care about all of the above, or they have some brilliant other solution. I haven't found an in-depth example of MVVM with WPF. For example, the NDDD-sample project immensely helped me understand some DDD concepts. I'd really like it if someone could point me in the direction of something similar for MVVM/WPF. Maybe I'm doing MVVM all wrong and I should turn my design upside down. Maybe I shouldn't have this problem at all. Well I know other people have asked the same question so I think I'm not the only one. To summarize Am I correct to conclude that having the ViewModel being an integration point for both state and behavior is the reason for some difficulties with the MVVM pattern as a whole? Is using the abstract factory pattern the only/best way to instantiate a ViewModel in a statically typed way? Is there something like an in depth reference implementation available? Is having a lot of ViewModels with both state/behavior a design smell?

    Read the article

  • Change language encoding for file uploading

    - by jc.yin
    Previously we were running a Wordpress site on a Mac OS Server machine. We had several hundred images with Chinese characters for the image names. Now we're trying to migrate to a Ubuntu system and everything is fine except the images. Every time I try to upload an image with a Chinese name via FTP, I get the following message: "MyImage contains illegal characters. Please choose an appropriate text encoding" I have no idea how to solve this issue, do I need to somehow change the system language encoding in Ubuntu to allow for image uploading? Thanks

    Read the article

  • Failed to download repository information (Maveric)

    - by Rhiannon
    I have been through most of the duplicates for this question, and still can't find an answer. I may have missed one but hopefully this isn't a duplicate! Having a problem with updates. I get the "failed to download..."message followed by "Check your internet connection", which is clearing working fine as I am on it now. I click details and get the following **W:Failed to fetch http://archive.ubuntu.com/ubuntu/dists/maverick-updates/multiverse/source/Sources 404 Not Found [IP: 91.189.92.202 80] , W:Failed to fetch http://archive.ubuntu.com/ubuntu/dists/maverick-updates/universe/source/Sources 404 Not Found [IP: 91.189.92.202 80] , W:Failed to fetch http:// archive.ubuntu.com/ubuntu/dists/maverick-updates/multiverse/binary-i386/Packages 404 Not Found [IP: 91.189.92.202 80] , W:Failed to fetch http:// archive.ubuntu.com/ubuntu/dists/maverick-updates/universe/binary-i386/Packages 404 Not Found [IP: 91.189.92.202 80] , W:Failed to fetch http:// archive.ubuntu.com/ubuntu/dists/maverick-security/multiverse/source/Sources 404 Not Found [IP: 91.189.92.202 80] , W:Failed to fetch http:// archive.ubuntu.com/ubuntu/dists/maverick-security/universe/source/Sources 404 Not Found [IP: 91.189.92.202 80] , W:Failed to fetch http:// archive.ubuntu.com/ubuntu/dists/maverick-security/multiverse/binary-i386/Packages 404 Not Found [IP: 91.189.92.202 80] , W:Failed to fetch http:// archive.ubuntu.com/ubuntu/dists/maverick-security/universe/binary-i386/Packages 404 Not Found [IP: 91.189.92.202 80] , E:Some index files failed to download. They have been ignored, or old ones used instead.** All the faults have "maveric" somewhere in them, so I have gone to settings and unticked all the Mavarics I can find, but this problem is still happening. Any ideas? Many thanks

    Read the article

  • Transmission torrent client very inconsistent speeds

    - by mark kirby
    I have inconsistent download speed using the transmission bit torrent client. The speed will vary greatly between 400kb and 1kb per second (My internet is crap 400kb is a acceptable maximum). I also noticed that even though hundreds of peers are available Transmission will only connect to about 20 at any time (I have set the connection limit to 200 per torrent and 500 max). I hope someone know a fix.

    Read the article

  • Log incoming requests

    - by Maxim Eliseev
    We have Tomcat running on Ubuntu server. It runs a web service, open to the internet. Sometimes it has sudden spike of traffic and goes down. There is nothing unusual in Tomcat access logs. I guess because some of the requests are so 'heavy' that they never finish and hence are not recorded to Tomcat access logs. Is there a way to configure Ubuntu to log incoming requests in the following format (below)? Date, Time, URL (with query string params), IP address (of client) There should be one line per request. Each request should be logged before it is executed. Only incoming requests to ports 80 and 443 should be logged.

    Read the article

  • Change libcups to repository version

    - by Lerp
    I upgraded my libcups package to 1.6 in hopes to fix something but I just buggered things up more. So I want to reinstall it to the version on the repository (1.5.3 I think). I've tried to do a reinstall using ~#: apt-get install --reinstall libcups2 but that tells me it cannot be downloaded so refuses to upgrade. I can't just do: ~#: apt-get remove libcups2 ~#: apt-get install libcups2 as that wants to remove 299 packages along with it. Totaling 668MB so I am hesitant as that will probably take 6 hours to download on my connection.

    Read the article

  • Ubuntu 12.10 - Dual monitors

    - by crazy coder
    I'm trying to set up a dual monitor with my laptop (Dell XPS L502X) and a monitor that I recently bought (Dell U2312HM). The cable are alright, because I tried this on Windows and all is fine. In Ubuntu 12.10 doesn't work. If I go to System Settings-Displays, button Detect Displays doesn't do anything. I may also say that I use Bumblebee, and my sudo nvidia-settings command only shows a windows with only nvidia-setting Configuration option.

    Read the article

  • Script to email files content

    - by Tarun
    I have created a shell script that takes backups everyday and emails its execution as successfull or unsuccessfull. Now I want that it send the contents of log file it creates with the mail as well. I have seen how to send file as attachement but I want to send the contents of the file as email message and not the file. Please Help. Its code is like #Email Settings Message_Success="Database Backup generated successfully" Message_Failure="Problem occured while generating Database Backup please verify" Subject="Database Backup Status Mail" Recipients="[email protected]" #Verify Backup Created if [ -f "$Path_Mysql_Dump" ]; then echo "Database Backup Created" >> $Path_Log_File echo "$Message_Success" | mail -s "$Subject" "$Recipients" else echo "Database Backup not created please verify the process will terminate" >> $Path_Log_File echo "$Message_Failure" | mail -s "$Subject" "$Recipients" exit -1 fi

    Read the article

  • Installed Ubuntu on a Intel I5 3330 (over a dh 77eb motherboard), networking fails

    - by Siddharth
    To my surprise network fails after Ubuntu installs. modprobe e1000, did not get networking to kick off modprobe e1000e, too did not load Searched for the drivers on the intel site, no linux drivers listed. lspci reports 00:19.0 Ethernet controller [0200]: Intel Corporation Device [8086:1503] (rev 04) Any idea on how to proceed ? Is there a place where I can map driver names (like e1000, e1000e) with the model numbers ?

    Read the article

  • Ubuntu 13.04 not detecting operating system Windows 8

    - by hualur
    I have a Samsung NP740U3E with pre-installed Windows 8 (boots with UEFI). I installed Ubuntu 13.04 without problems. Later, Windows 8 did a BIOS update which messed up everything, nothing would boot. I recovered everything and went back to fabric settings. Now Windows 8 works fine, but when I try to install Ubuntu it does not detect any operating system, so I can`t install Ubuntu alongside Windows. I`ve googled as much as I can, ran a boot-repair, disabled fast- and secure-boot. I have a GPT disc, been looking into gdisk without luck. Here`s my boot-repair summary http://paste.ubuntu.com/5835719/ Is it necessary to convert the GPT disc to MBR? Is it possible to hard-reset the disc "even more" than fabric settings? Thanks in advance.

    Read the article

  • bash command for each file in a folder

    - by Robert
    I have a set of files on which I would like to apply the same command and the output should contain the same name as the processed file but with a different extension. Currently I am doing rename /my/data/Andrew.doc to /my/data/Andrew.txt I would like to do this for all the .doc files from the /my/data/ folder and to preserve the name. I tried several versions but I guess I have something wrong in the syntax as I an new to linux.

    Read the article

  • How to get the revision history of a branch with bzrlib

    - by David Planella
    I'm trying to get a list of committers to a bzr branch. I know I can get it through the command line with something along these lines: bzr log -n0 | grep committer | sed -e 's/^[[:space:]]*committer: //' | uniq However, I'd like to get that list programmatically with bzrlib. After having looked at the bzrlib documentation, I can't manage to find out how I would even get the full list of revisions from my branch. Any hints on how to get the full history of revisions from a branch with bzrlib, or ultimately, the list of committers?

    Read the article

  • USB drives not recognized all of a sudden (module usb_storage not loading)

    - by Siddharth
    I am very close to the solution, just need to know how to get usb-storage to load I have tried most of the advice on askubuntu and other sites, usb_storage enable to fdisk -l. But I am unable to find steps to get it working again. sudo lsusb results Bus.... skipped 4 lines Bus 004 Device 002: ID 413c:3012 Dell Computer Corp. Optical Wheel Mouse Bus 005 Device 002: ID 413c:2105 Dell Computer Corp. Model L100 Keyboard Bus 001 Device 005: ID 8564:1000 sudo dmseg | tail reports [ 69.567948] usb 1-4: USB disconnect, device number 4 [ 74.084041] usb 1-6: new high-speed USB device number 5 using ehci_hcd [ 74.240484] Initializing USB Mass Storage driver... [ 74.256033] scsi5 : usb-storage 1-6:1.0 [ 74.256145] usbcore: registered new interface driver usb-storage [ 74.256147] USB Mass Storage support registered. [ 74.257290] usbcore: deregistering interface driver usb-storage fdisk -l reports Device Boot Start End Blocks Id System /dev/sda1 * 2048 972656639 486327296 83 Linux /dev/sda2 972658686 976771071 2056193 5 Extended /dev/sda5 972658688 976771071 2056192 82 Linux swap / Solaris I think I need steps to install and get usb_storage module working. Edit : I tried sudo modprobe -v usb-storage reports sudo modprobe -v usb-storage insmod /lib/modules/3.2.0-48-generic-pae/kernel/drivers/usb/storage/usb-storage.ko Edit : jsiddharth@siddharth-desktop:~$ sudo udevadm monitor --udev monitor will print the received events for: UDEV - the event which udev sends out after rule processing UDEV [4757.144372] add /module/usb_storage (module) UDEV [4757.146558] remove /module/usb_storage (module) UDEV [4757.148707] add /devices/pci0000:00/0000:00:1d.7/usb1/1-6 (usb) UDEV [4757.149699] add /bus/usb/drivers/usb-storage (drivers) UDEV [4757.151214] remove /bus/usb/drivers/usb-storage (drivers) UDEV [4757.156873] add /devices/pci0000:00/0000:00:1d.7/usb1/1-6/1-6:1.0 (usb) UDEV [4757.160903] add /devices/pci0000:00/0000:00:1d.7/usb1/1-6/1-6:1.0/host9 (scsi) UDEV [4757.164672] add /devices/pci0000:00/0000:00:1d.7/usb1/1-6/1-6:1.0/host9/scsi_host/host9 (scsi_host) UDEV [4757.165163] remove /devices/pci0000:00/0000:00:1d.7/usb1/1-6/1-6:1.0/host9/scsi_host/host9 (scsi_host) UDEV [4757.165440] remove /devices/pci0000:00/0000:00:1d.7/usb1/1-6/1-6:1.0/host9 (scsi) Narrowing down more : Seems like I need usb_storage to load as a module jsiddharth@siddharth-desktop:~$ lsmod | grep usb usbserial 37201 0 usbhid 41937 0 hid 77428 1 usbhid Still no usb driver mounted. Nor does a device show up in /dev. Any step by step process to debug and fix this will be really helpful.

    Read the article

  • Change order of monitors without changing fullscreen"size"

    - by user171489
    I have a dual monitor setup. My primary monitor is a 22" with a max resolution of 1680x1050 and my secondary is a 19" with a max resolution of 1280x1024. The secondary is standing on the left side of the primary one. My problem now is, that, if I change the order of the monitors in my nvidia x-server settings, so that my secondary is the first one (or the one on the left), the fullscreen mode in flash in scaled up to my secondary monitor, even if it´s displayed on my primary one. Meaning that i get a 1280x1024 "fullscreen" window on my bigger primary monitor. When I configure my x-server settings so the secondary monitor is the one on the right, I don´t have this problem. The only thing then is, that I have to scroll out on the right to get to my monitor on the right. I can´t move my secondary monitor on the right side of my primary due to lack of space and my belief that there must be a software solution. ;) Thanks in advance.

    Read the article

  • Issue with wired network

    - by Shiju Nambiar
    I have ubuntu 12.10 (downgraded from 13.04 when I faced this issue). I am a newbee and don't know much of technical side like commandline on the terminal. I have a wired internet connection and it was working just fine for last few months since I installed ubuntu. my OS got upgraded to 13.04 and it was still fine. Since last 3 days, network shows connected, connection stays for few seconds and then websites stop loading. Connection shows as connected, but pages don't load. I have to reconnect again to access a website and the connection goes off again in say about 10 to 15 seconds. So I use my internet by connecting and disconnecting every few seconds.

    Read the article

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