Search Results

Search found 5172 results on 207 pages for 'stackoverflow podcast'.

Page 47/207 | < Previous Page | 43 44 45 46 47 48 49 50 51 52 53 54  | Next Page >

  • Define "Validation in the Model"

    - by sunwukung
    There have been a couple of discussions regarding the location of user input validation: http://stackoverflow.com/questions/659950/should-validation-be-done-in-form-objects-or-the-model http://stackoverflow.com/questions/134388/where-do-you-do-your-validation-model-controller-or-view These discussions were quite old, so I wanted to ask the question again to see if anyone had any fresh input. If not, I apologise in advance. If you come from the Validation in the Model camp - does Model mean OOP representation of data (i.e. Active Record/Data Mapper) as "Entity" (to borrow the DDD terminology) - in which case you would, I assume, want all Model classes to inherit common validation constraints. Or can these rules simply be part of a Service in the Model - i.e. a Validation service? For example, could you consider Zend_Form and it's validation classes part of the Model? The concept of a Domain Model does not appear to be limited to Entities, and so validation may not necessarily need to be confined to this Entities. It seems that you would require a lot of potentially superfluous handing of values and responses back and forth between forms and "Entities" - and in some instances you may not persist the data recieved from user input, or recieve it from user input at all.

    Read the article

  • What is better: Developing a Web project in MVC or N -Tier Architecture?

    - by Starx
    I have asked a similar question before and got an convincing answer as well? http://stackoverflow.com/questions/2843311/what-is-difference-of-developing-a-website-in-mvc-and-3-tier-or-n-tier-architectu Due to the conclusion of this question I started developing projects in N-tier Architecture. Just about an hour ago, I asked another question, about what is the best design pattern to create interface? There the most voted answer is suggesting me to use MVC architecture. http://stackoverflow.com/questions/2930300/what-is-the-best-desing-pattern-to-design-the-interface-of-an-webpage Now I am confused, First post suggested me that both are similar, just a difference that in N-tier, the tier are physically and logically separated and one layer has access to the one above and below it but not all the layers. I think ASP.net used 3 Tier architecture while developing applications or Web applications. Where as frameworks like Zend, Symphony they use MVC. I just want to stick to a pattern that is best suitable for WebProject Development? May be this is a very silly confusion? But if someone could clear this confusion, that would be very greatful?

    Read the article

  • Guidance required: FIrst time gonna work with real high end database (size = 50GB).

    - by claws
    I got a project of designing a Database. This is going to be my first big scale project. Good thing about it is information is mostly organized & currently stored in text files. The size of this information is 50GB. There are going to be few millions of records in each Table. Its going to have around 50 tables. I need to provide a web interface for searching & browsing. I'm going to use MySQL DBMS. I've never worked with a database more than 200MB before. So, speed & performance was never a concern but I followed things like normalization & Indexes. I never used any kind of testing/benchmarking/queryOptimization/whatever because I never had to care about them. But here the purpose of creating a database is to make it quickly searchable. So, I need to consider all possible aspects in design. I was browsing archives & found: http://stackoverflow.com/questions/1981526/what-should-every-developer-know-about-databases http://stackoverflow.com/questions/621884/database-development-mistakes-made-by-app-developers I'm gonna keep the points mentioned in above answers in mind. What else should I know? What else should I keep in mind?

    Read the article

  • C++ struct, public data members and inheritance

    - by Marius
    Is it ok to have public data members in a C++ class/struct in certain particular situations? How would that go along with inheritance? I've read opinions on the matter, some stated already here http://stackoverflow.com/questions/952907/practices-on-when-to-implement-accessors-on-private-member-variables-rather-than http://stackoverflow.com/questions/670958/accessors-vs-public-members or in books/articles (Stroustrup, Meyers) but I'm still a little bit in the shade. I have some configuration blocks that I read from a file (integers, bools, floats) and I need to place them into a structure for later use. I don't want to expose these externally just use them inside another class (I actually do want to pass these config parameters to another class but don't want to expose them through a public API). The fact is that I have many such config parameters (15 or so) and writing getters and setters seems an unnecessary overhead. Also I have more than one configuration block and these are sharing some of the parameters. Making a struct with all the data members public and then subclassing does not feel right. What's the best way to tackle that situation? Does making a big struct to cover all parameters provide an acceptable compromise (I would have to leave some of these set to their default values for blocks that do not use them)?

    Read the article

  • Efficient (basic) regular expression implementation for streaming data

    - by Brendan Dolan-Gavitt
    I'm looking for an implementation of regular expression matching that operates on a stream of data -- i.e., it has an API that allows a user to pass in one character at a time and report when a match is found on the stream of characters seen so far. Only very basic (classic) regular expressions are needed, so a DFA/NFA based implementation seems like it would be well-suited to the problem. Based on the fact that it's possible to do regular expression matching using a DFA/NFA in a single linear sweep, it seems like a streaming implementation should be possible. Requirements: The library should try to wait until the full string has been read before performing the match. The data I have really is streaming; there is no way to know how much data will arrive, it's not possible to seek forward or backward. Implementing specific stream matching for a couple special cases is not an option, as I don't know in advance what patterns a user might want to look for. For the curious, my use case is the following: I have a system which intercepts memory writes inside a full system emulator, and I would like to have a way to identify memory writes that match a regular expression (e.g., one could use this to find the point in the system where a URL is written to memory). I have found (links de-linkified because I don't have enough reputation): stackoverflow.com/questions/1962220/apply-a-regex-on-stream stackoverflow.com/questions/716927/applying-a-regular-expression-to-a-java-i-o-stream www.codeguru.com/csharp/csharp/cs_data/searching/article.php/c14689/Building-a-Regular-Expression-Stream-Search-with-the-NET-Framework.htm But all of these attempt to convert the stream to a string first and then use a stock regular expression library. Another thought I had was to modify the RE2 library, but according to the author it is architected around the assumption that the entire string is in memory at the same time. If nothing's available, then I can start down the unhappy path of reinventing this wheel to fit my own needs, but I'd really rather not if I can avoid it. Any help would be greatly appreciated!

    Read the article

  • How to use Transaction in Entity FrameWork?

    - by programmerist
    How to use Transaction in Entity FrameWork? i read some links on Stackoverflow : http://stackoverflow.com/questions/815586/entity-framework-using-transactions-or-savechangesfalse-and-acceptallchanges BUT; i have 3 table so i have 3 entities: CREATE TABLE Personel (PersonelID integer PRIMARY KEY identity not null, Ad varchar(30), Soyad varchar(30), Meslek varchar(100), DogumTarihi datetime, DogumYeri nvarchar(100), PirimToplami float); Go create TABLE Prim (PrimID integer PRIMARY KEY identity not null, PersonelID integer Foreign KEY references Personel(PersonelID), SatisTutari int, Prim float, SatisTarihi Datetime); Go CREATE TABLE Finans (ID integer PRIMARY KEY identity not null, Tutar float); Personel, Prim,Finans my tables. if you look Prim table you can see Prim value float value if i write a textbox not float value my transaction must run. using (TestEntities testCtx = new TestEntities()) { using (TransactionScope scope = new TransactionScope()) { // do someyihng... testCtx.Personel.SaveChanges(); // do someyihng... testCtx.Prim.SaveChanges(); // do someyihng... testCtx.Finans.SaveChanges(); scope .Complete(); success = true; } } How can i do that?

    Read the article

  • PHP SDK for Facebook: Uploading an Image for an Event created using the Graph API

    - by wenbert
    Can anyone shed some light on my problem? <?php $config = array(); $config['appId'] = "foo"; $config['secret'] = "bar"; $config['cookie'] = true; $config['fileUpload'] = true; $facebook = new Facebook($config); $eventParams = array( "privacy_type" => $this->request->data['Event']['privacy'], "name" => $this->request->data['Event']['event'], "description" => $this->request->data['Event']['details'], "start_time" => $this->request->data['Event']['when'], "country" => "NZ" ); //around 300x300 pixels //I have set the permissions to Everyone $imgpath = "C:\\Yes\\Windows\\Path\\Photo_for_the_event_app.jpg"; $eventParams["@file.jpg"] = "@".$imgpath; $fbEvent = $facebook->api("me/events", "POST", $eventParams); var_dump($fbEvent); //I get the event id I also have this in my "scope" when the user is asked to Allow the app to post on his behalf: user_about_me,email,publish_stream,create_event,photo_upload This works. It creates the event with all the details I have specified. EXCEPT for the event image. I have been to most of Stackoverflow posts related to my problem but all of them are not working for me. (EG: http://stackoverflow.com/a/4245260/66767) I also do not get any error. Any ideas? THanks!

    Read the article

  • IIS6 throws error for jquery.

    - by user309557
    Hi, on my master page, I have referenced jquery file. I am doing simple hover function. When mouse hover, I change the css and when hover out, change the css back to originial. Nothing fancy. but my page throws jquery error when I run in IIS6 on server 2003. When I run on IIS5.1 on local xp machine, it works perfectly fine. Any idea? I access both pages from my machine so IE settings is not the problem. I opened the both js file and the error line is nothing but the end of the file ( i.e last line of the js file) Webpage error details User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; OfficeLiveConnector.1.4; OfficeLivePatch.1.3) Timestamp: Mon, 5 Apr 2010 21:59:18 UTC Message: Syntax error Line: 4377 Char: 2 Code: 0 URI: server-test/myapplication/Scripts/jquery-1.3.2.js (removed the link because stackoverflow does not allow me to put more than one link) Message: Syntax error Line: 6183 Char: 2 Code: 0 URI: server-test/myapplication/Scripts/jquery-1.3.2-vsdoc.js (removed the link because stackoverflow does not allow me to put more than one link) Message: Object expected Line: 189 Char: 9 Code: 0 URI: http://server-test/myapplication/

    Read the article

  • Using Cucumber or RSpec+Selenium to create end user documentation?

    - by carolclarinet
    Has anyone tried creating end user (potentially online, potentially to be printed) help/documentation out of your cucumber scenarios? Or taken screenshots for use in documentation using RSpec and Selenium RC's ability to do so? For Cucumber, I'm imagining something like: Scenario: If you want to add a link Given I am on the edit blog post page When I press the "add link" button And I type in a link URL "http://stackoverflow.com" And I click "OK" Then the blog post should have 1 link Translating to the documentation: If you want to add a link, go to the edit blog post page. Press the "add link" button and type a URL, like "http://stackoverflow.com", into the link URL field. Click "OK". Would it be worth my time to try and, for one, write something to parse my Cucumber features into documentation, and two, to write/structure my Cucumber features in such a way as to create good documentation? Would the resulting documentation end up sounding really boring without much variation in the structure? Is there anything else out there like this idea? Doxygen looks like it's more for code documentation than end-user documentation. What about automatically taking screenshots? This seems like a more fruitful path-- just reuse the code that takes a screenshot when an RSpec test fails and have it take one in prescribed situations. Is there a better way to do this?

    Read the article

  • Setting Icon for wpf application (VS 08)

    - by baron
    Hi everyone, Before going much further i'll mention I have tried solutions in following: http://stackoverflow.com/questions/320677/how-do-i-set-the-icon-for-my-application-in-visual-studio-2008 http://stackoverflow.com/questions/198848/set-application-icon-from-resources-in-vs-05 I am trying to set an icon for my application. AFAIK, I need potentially 3 images? 1 image is the actual image in explorer when clicking on the .exe (thumbnail for the exe) 1 image (tiny) in the top left corner (16 x 16? Not entirely sure) 1 image in the start menu dock, to the left of the app (maybe 32x32? again not sure) So thats fine. Now I have selected an Icon. How do I use it in one of above situations? I have tried adding it in resources, nothing seems to happen. Following that first SO solution, "First go to Resource View (from menu: View -- Other Window -- Resource View). Then in Resource View navigate through resources, if any. If there is already a resource of Icon type, added by Visual Studio, then open and edit it. Otherwise right-click and select Add Resource, and then add a new icon." The resource view is empty, and I cannot right click in this view. If I right click on the solution properties resources I can add the icon image, but it doesn't show in either of the locations listed above. (or anywhere that I can see) What am I doing wrong?

    Read the article

  • Laravel4: Checking many-to-many relationship attribute even when it does not exist

    - by Simo A.
    This is my first time with Laravel and also Stackoverflow... I am developing a simple course management system. The main objects are User and Course, with a many-to-many relationship between them. The pivot table has an additional attribute, participant_role, which defines whether the user is a student or an instructor within that particular course. class Course extends Eloquent { public function users() { return $this->belongsToMany('User')->withPivot('participant_role')->withTimestamps(); } } However, there is an additional role, system admin, which can be defined on the User object. And this brings me mucho headache. In my blade view I have the following: @if ($course->pivot->participant_role == 'instructor') { // do something here... } This works fine when the user has been assigned to that particular $course and there is an entry for this user-course combination in the pivot table. However, the problem is the system administrator, who also should be able to access course details. The if-clause above gives Trying to get property of non-object error, apparently because there is no entry in the pivot table for system administrator (as the role is defined within the User object). I could probably solve the problem by using some off-the-shelf bundle for handling role-based permissions. Or I could (but don't want to) do something like this with two internal if-clauses: if (!empty($course->pivot)) { if ($course->pivot->participant_role == 'instructor') { // do something... } } Other options (suggested in partially similar entries in Stackoverflow) would include 1) reading all the pivot table entries to an array, and use in_array to check if a role exists, or even 2) SQL left join to do this on database level. However, ultimately I am looking for a compact one-line solution? Can I do anything similar to this, which unfortunately does not seem to work? if (! empty ($course->pivot->participant_role == 'instructor') ) { // do something... } The shorter the answer, the better :-). Thanks a lot!

    Read the article

  • Question regarding filesystems true or false?

    - by Avon
    Hello all, though I'm familiar with stackoverflow , and loving it , i've actually got a couple of questions myself about something other then programming. Here are my question Is it true that in FAT filesystems the maximum number of files per filesystem equals the number of entries in the FAT table. And is it also true that in indexed filesystems the maximum number of files per filesystem equals the number of indexblocks – 1. I'm reading some stuff and am trying to get a good understanding of it.

    Read the article

  • Load-Module equivalient in PowerShell v1

    - by friism
    (Cross-post from Stackoverflow) For reasons of script portability, I need to dynamically load snap-ins in a PowerShell script (ie. I don't want to actually install it). This is easily accomplished in PowerShell v2 with the Load-Module function. I need to run this particular script on a machine where I, for various reasons, do not want to install PowerShell v2, but have v1. Is there a Load-Module equivalent in PowerShell v1?

    Read the article

  • python-imaging and libjpeg on FreeBSD

    - by valya
    Hello! I had a problem with image uploading to Django with FreeBSD, so I asked on SO: http://stackoverflow.com/questions/1959447/django-uploading-image-error and got an answer. Our admin can't install these libraries, he don't know how. Neither do I. It's FreeBSD, kinda unfamiliar system. So, how do we install PIL with JPEG support and whatever needed for image uploading?

    Read the article

  • creating email forwarding accounts on the fly using

    - by Phil Jackson
    I've recently asked a question on Stack Overflow; http://stackoverflow.com/questions/2637137/creating-email-forwarding-accounts-on-the-fly-using-php and was I would find the solution here. first instruction was: Ask on the serverfault what operations you have have to perform. what config file to edit or something. Any help would be much appreciated. regards, phil

    Read the article

  • How to retrieve names of all private MSMQ queues - efficiently?

    - by Damian Powell
    How can I retrieve the names of all of the private MSMQ queues on the local machine, without using System.Messaging.MessageQueue.GetPrivateQueuesByMachine(".")? I'm using PowerShell so any solution using COM, WMI, or .NET is acceptable, although the latter is preferable. Note that this StackOverflow question has a solution that returns all of the queue objects. I don't want the objects (it's too slow and a little flakey when there are lots of queues), I just want their names.

    Read the article

  • Client A can ping server S, but client B cannot

    - by Soundar Rajan
    I moved the question to here from stackoverflow.com http://stackoverflow.com/questions/2917569/unable-to-ping-server-from-client-b-but-able-to-ping-from-client-a-please-help I am trying to configure a IIS 6.0/Windows Server 2003 web server with a ASP.net application. When I try to ping the server from client computer A I get the following: PING 74.208.192.xxx ==> Ping fails PING 74.208.192.xxx:80 ==> Ping succeeds! From client computer B, BOTH the pings fail. PING 74.208.192.xxx ==> Ping fails PING 74.208.192.xxx:80 ==> Ping fails with a message "Ping request could not find host 74.208.192.xxx:80" Both clients A and B are on the same subnet. The server is outside (a virtual server hosted by an ISP) I have an ASP.NET application in a virtual directory on the server. In IE or firefox, if I enter http://74.208.192.xxx/subdir/subdir/../Default.aspx, it works from both the clients! The server has default firewall settings but web server enabled (Port 80 is open). From client A (note the different 'reply to' address when the ping succeeds. C:\Program Files\Microsoft Visual Studio 9.0\VC>ping 74.208.192.xx Pinging 74.208.192.xx with 32 bytes of data: Request timed out. ... Request timed out. Ping statistics for 74.208.192.xx: Packets: Sent = 4, Received = 0, Lost = 4 (100% loss), C:\Program Files\Microsoft Visual Studio 9.0\VC>ping 74.208.192.xx:80 Pinging 74.208.192.xx:80 [208.67.216.xxx] with 32 bytes of data: Reply from 208.67.216.xxx: bytes=32 time=35ms TTL=54 ... Reply from 208.67.216.xxx: bytes=32 time=33ms TTL=54 Ping statistics for 208.67.216.xxx: Packets: Sent = 4, Received = 4, Lost = 0 (0% loss), Approximate round trip times in milli-seconds: Minimum = 32ms, Maximum = 54ms, Average = 38ms From client B C:\Documents and Settings\user>ping 74.208.192.81 Pinging 74.208.192.81 with 32 bytes of data: Request timed out. ... Request timed out. Ping statistics for 74.208.192.81: Packets: Sent = 4, Received = 0, Lost = 4 (100% loss), C:\Documents and Settings\user>ping 74.208.192.81:80 Ping request could not find host 74.208.192.81:80. Please check the name and try again. My main problem is I have a web service (asmx) file and the web service client program is not able to access it from client B, but able to access it from client A. I am trying to find out why and thought this ping issue may shed some light. I can ping yahoo.com both the computers.

    Read the article

  • List of freely available system administrator books

    - by Sharjeel Sayed
    On the lines of http://stackoverflow.com/questions/194812/list-of-freely-available-programming-books, I'm trying to create a wiki of system administrator books with open source licenses, like Creative Commons, GPL, etc. Feel free to pour in your recommendations. Linux Linux Network Administrator's Guide, 2nd Edition Bash Advanced Bash-Scripting Guide MySQL MySQL Documentation Apache Apache Dektop Reference Networking TCP/IP Tutorial and Technical Overview

    Read the article

  • Iptables -gw parameter

    - by schoen
    I want to copy tcp traffic. i want to use these commands " iptables -A PREROUTING -t mangle -p tcp --dport 7 -j ROUTE --gw 1.2.3.4 --tee iptables -A POSTROUTING -t mangle -p tcp --sport 7 -j ROUTE --gw 1.2.3.4 --tee" like stated here http://stackoverflow.com/questions/7247668/duplicate-tcp-traffic-with-a-proxy but iptables keeps telling me "iptables v1.4.8: unknown option '--gw'" What can I do to fix this? With Kind Regards

    Read the article

  • Email: X-Authentication-Warning

    - by stef
    We're sending out 1000's of mails per day from our site (mainly "click here to verify your subscription") and too many are getting flagged by spam (mainly hotmail). One of the things I noticed in the headers is X-Authentication-Warning: srv01.site.com: www-data set sender to [email protected] using -f Is this something I should be worried about, that may cause spam flags to raise? (I'm already checking various issues that have been mentioned regarding spam flagging over at stackoverflow, I know there are many factors in play)

    Read the article

  • How to configure nginx so it works with Express?

    - by Michal Stefanow
    I'm trying to configure nginx so it proxy_pass requests to my node apps. Question on StackOverflow got many upvotes: http://stackoverflow.com/questions/5009324/node-js-nginx-and-now and I'm using config from there. (but since question is about server configuration it is supposed to be on ServerFault) Here is the nginx configuration: server { listen 80; listen [::]:80; root /var/www/services.stefanow.net/public_html; index index.html index.htm; server_name services.stefanow.net; location / { try_files $uri $uri/ =404; } location /test-express { proxy_pass http://127.0.0.1:3002; } location /test-http { proxy_pass http://127.0.0.1:3003; } } Using plain node: var http = require('http'); http.createServer(function (req, res) { res.writeHead(200, {'Content-Type': 'text/plain'}); res.end('Hello World\n'); }).listen(3003, '127.0.0.1'); console.log('Server running at http://127.0.0.1:3003/'); It works! Check: http://services.stefanow.net/test-http Using express: var express = require('express'); var app = express(); // app.get('/', function(req, res) { res.redirect('/index.html'); }); app.get('/index.html', function(req, res) { res.send("blah blah index.html"); }); app.listen(3002, "127.0.0.1"); console.log('Server running at http://127.0.0.1:3002/'); It doesn't work :( See: http://services.stefanow.net/test-express I know that something is going on. a) test-express is NOT running b) text-express is running (and I can confirm it is running via command line while ssh on the server) root@stefanow:~# service nginx restart * Restarting nginx nginx [ OK ] root@stefanow:~# curl localhost:3002 Moved Temporarily. Redirecting to /index.html root@stefanow:~# curl localhost:3002/index.html blah blah index.html I tried setting headers as described here: http://www.nginxtips.com/how-to-setup-nginx-as-proxy-for-nodejs/ (still doesn't work) proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Host $http_host; proxy_set_header X-NginX-Proxy true; I also tried replacing '127.0.0.1' with 'localhost' and vice versa Please advise. I'm pretty sure I miss some obvious detail and I would like to learn more. Thank you.

    Read the article

  • MDB2, Pear, Mysql error

    - by Kyle Hudson
    ORIGINALLY POSTED ON http://stackoverflow.com/questions/2682332/mdb2-pear-mysql-error however as its a server issue thought i may have more luck here. Hi Guys, I have PEAR, MDB2 and Mysql Driver installed however I keep getting: Fatal error: Call to undefined function: MDB2_Driver_mysql::_isNewLinkSet(). in /home/**/PEAR/MDB2.php on line 1937. The Server is CentOS I am stuck, any help would be appriciated. Thanks :)

    Read the article

  • Privoxy-like proxy that handles multiple parallel connections?

    - by overtherainbow
    Hello I use Privoxy on my XP host to filter/rewrite web pages, but it's slower because all connections go through Privoxy's single port. According to this post on StackOverflow, by default, browsers support more than one simultaneous connection, which would explain why going through Privoxy is slower. Does someone know of a similar application that could handle more than one connection? Thank you.

    Read the article

< Previous Page | 43 44 45 46 47 48 49 50 51 52 53 54  | Next Page >