Daily Archives

Articles indexed Friday May 7 2010

Page 30/110 | < Previous Page | 26 27 28 29 30 31 32 33 34 35 36 37  | Next Page >

  • json webservice security

    - by crisgomez
    I have a problem regarding json web service security. I tried to developed a sample web application using json webservice,but the problem is the url was exposed on the client side.So from there,anybody can make a program and call the service for a thousand times. Please take note, that the web service will be using for a registration page, in which checks if the user was exist on the database.So there is no authentication happened on this process. What are the approach to secure the calling of the exposed web service?

    Read the article

  • OpenSSH SFTP: chrooted user with access to other chrooted users' files

    - by HannesFostie
    Decided to re-phrase the question entirely in order to not have to make a new one. I currently have an SFTP server set up using OpenSSH's SFTP functionality. All my users are chrooted, and everything works. What I need most right now is for one user, which is not root (because this user can't have any real SSH powers!), to have access to all other users' chrooted dirs. This user's job is to fetch all uploaded documents every once in a while. Directory structure as of now is: /home |_ /home/user1 |_ /home/user2 |_ /home/user3 With ChrootDirectory set as /home/%u User "adminuser" should have access to user1, user2 and user3's directories without having access to /home or at the very least not to anything but /home. Bonus points for the one who can tell me how to let users write inside /home/%u without having to make a new directory inside that dir which they own themselves, and not root as is the case with /home/%u (openssh chroot prerequisite).

    Read the article

  • Fluxbox startup file not working

    - by Jack
    I am placing apps into my fluxbox startup file as per the instructions, however nothing starts up except fluxbox. It doesn't matter what app I try, so it isn't an app problem. here is my startup file: #!/bin/sh # # fluxbox startup-script: # # Lines starting with a '#' are ignored. # Change your keymap: xmodmap "/home/josh/.Xmodmap" # Applications you want to run with fluxbox. # MAKE SURE THAT APPS THAT KEEP RUNNING HAVE AN ''&'' AT THE END. tint2 & tilda & # And last but not least we start fluxbox. # Because it is the last app you have to run it with ''exec'' before it. exec fluxbox # or if you want to keep a log: # exec fluxbox -log "/home/josh/.fluxbox/log" I have also tried tests such as "touch ~/testwoked" and such, nothing works. It makes no difference if the file is executable or not.

    Read the article

  • Complete Adblock in Google Chrome

    - by James
    I use a MAC and I want to completely block ads on my Google Chrome browse. What I mean by completely is that I don't want the ads to be just hidden. I understand that Google Chrome adblock addons currently hide ads, but can't prevent them from downloading. Is there a work around to this problem? Also, I use Firefox as my primary browser and I am on a proxy server on a Local network.

    Read the article

  • MySQL Grouping of data

    - by text
    I want to group my data by Age and by gender: like this sample data: Age: 1 Male: 2 Female: 3 Age 1 Total: 5 Age: 2 Male: 6 Female: 3 Age 2 Total: 9 How can I group the data according to age and count all the male and females in that age from mysql database?

    Read the article

  • phrase split algorithm in PHP

    - by Eric Sim
    Not sure how to explain. Let's use an example. Say I want to split the sentence "Today is a great day." into today today is today is a today is a great today is a great day is is a is a great is a great day a a great a great day great great day day The idea is to get all the sequential combination in a sentence. I have been thinking what's the best way to do it in PHP. Any idea is welcome.

    Read the article

  • RESTFul, statelesness and sessions

    - by Per Arneng
    RESTFul service has a rule that it should be stateless. By beeing that it does not allow a session to be created and maintained by sending a session key between the client and the server and then holding a session state on the server. If i look at the definition in wikipedia of stateless server http://en.wikipedia.org/wiki/Stateless_server "A stateless server is a server that treats each request as an independent transaction that is unrelated to any previous request" It states that it should be unrelated to any previous request. In practice this means that any type of authentication will be comparing the credentials of a user to a state on the server that was created by a previous operation. So a service called login is related to and dependent on the state that has been created by previous requests (ex: create_user and/or change_password). In my view you are breaking statelessnes by doing authentication. My point is that people are complaining about having sessions in RESTFul is breaking statelesness but doing authentication is also breaking the same rule. What do you think?

    Read the article

  • JavaScript's Associative Array / Object can't be read in functions

    - by Matrym
    At the very beginning of the javascript file, I have: var lbp = {}; lbp.defaults = { minLength: 40 }; I can successfully alert it afterwards, with: alert(lbp.defaults.minLength); But as soon as I put it inside a function, when I alert, I get "Undefined". What gives, and how do I avoid this? Is it absolutely necessary to pass this variable into each function, for example, by doing: function(lbp) { alert(lbp.defaults.minLength); } I would have thought that defining it first, it would attain global scope and not be required to be passed in? Thanks in advance for enlightening me :)

    Read the article

  • Coding guidelines + Best Practises?

    - by Chathuranga Chandrasekara
    I couldn't find any question that directly applies to my query so I am posting this as a new question. If there is any existing discussion that may help me, please point it out and close the question. Question: I am going to do a presentation on C# coding guidelines but it is not supposed to limit to coding standards. So I have a rough idea but I think I need to address good programing practices. So the contents will be something like this. Basic coding standards - Casing, Formatting etc. Good practices - Usage of Hashset over other data structures, String vs String Builder, String's immutability and using them effectively etc Really I would like to add more good practices (Especially to improve the performance.) So like to hear some more good practices to be used with C#. Any suggestions??? (No need of large descriptions :) Just the idea is sufficient.)

    Read the article

  • R Tree 50,000 foot overview?

    - by roufamatic
    I'm working on a school project that involves taking a lat/long point and finding the top five closest points in a known list of places. The list is to be stored in memory, with the caveat that we must choose an "appropriate data structure" -- that is, we cannot simply store all the places in an array and compare distances one-by-one in a linear fashion. The teacher suggested grouping the place data by US State to prevent calculating the distance for places that are obviously too far away. I think I can do better. From my research online it seems like an R-Tree or one of its variants might be a neat solution. Unfortunately, that sentence is as far as I've gotten with understanding the actual technique, as the literature is simply too dense for my non-academic head. Can somebody give me a really high overview of what the process is for populating an R-Tree with lat/long data, and then traversing the tree to find those 5 nearest neighbors of a given point? Additionally the project is in C, and I don't have to reinvent the wheel on this, so if you've used an existing open source C implementation of an R Tree I'd be interested in your experiences.

    Read the article

  • Plotting data with meshgrid

    - by Ruby
    When you use meshgrid to plot data (using meshgrid itself not one of the other plotting functions), how do you change the color to grayscale or black and white? Also, how do you get rid of the "meshy" look of the image?

    Read the article

  • Jquery First Column Select Problem

    - by oraclee
    Hi all; Jquery Code: $("[id$=gridvv] tr").filter(function() { return $('td', this).length && !$('table', this).length }).click(function() { Alert('test'); }); i need "td = .locked" click <table> <tr> <td class="locked">Blabla<td> <td>test1</td> <td>test2</td> </tr> </table>

    Read the article

  • PHP file upload issue

    - by Varun
    I am working on a PHP based, ticket management system. While creating a ticket, one can upload an attachment. I want to put a limit (say 10 MB) per file upload. To implement this I plan the following- 1. In php.ini set post_max_size = 10M 2.In PHP script which receives the POST- Since the file is larger than post_max_size, $_FILES[] will be empty. But I can still check the content-length header and discard the upload, if size more than 10M. While testing this I tried uploading a file of 1 GB and analysed the http traffic and this is what I found. - the entire 1 GB data is first uploaded to a to the server temporarily and discarded once the http request completes. Though I couldn't exactly find out where the file was getting saved(as it was not there in the temporary directory in the server.), but my http traffic analyzer showed that the browser did send 1 GB data to the server. - the PHP script execution started only after completion of the http request(i.e after uploading the entire 1 GB) Now I have 2 concerns: a) People may exploit my server bandwidth by trying to upload large file, which I will have to discard anyways. b) Even worse, if someone starts uploading a huge file (say 100 GB), entire 100 GB data is first uploaded to the server temporarily, that means for that period, it will consume that much of memory on my server. What's the common solution for this. Am I missing something here?

    Read the article

  • Posting an image and textual based data to a wcf service

    - by James Hay
    I have a requirement to write a web service that allows me to post an image to a server along with some additional information about that image. I'm completely new to developing web services (normally client side dev) so I'm a little stumped as to what I need to look into and try. How do you post binary data and plain text into a servic? What RequestFormat should I use? It looks like my options are xml or json. Can I use either of these? Bit of a waffly question but I just need some direction rather than a solution as I can't seem to find much online.

    Read the article

  • Is it compulsory to learn about Data Structures if you want to be a Java/C++ programmer ?

    - by happysoul
    So do I like really need to learn about them ? Isn't there an interesting way to learn about stacks, linked lists, heaps ,etc ? I found it a boring subject. **While posting this question it showed some warning.Am I not allowed to post such a question ? Admins please clarify and I will delete it :/ Warning :: The question you're asking appears subjective and is likely to be closed.

    Read the article

  • TurboPower Abbrevia in C++Builder2009

    - by Fintch
    I want install TurboPower Abbrevia 3.05 from http://sourceforge.net/projects/tpabbrevia/ but its not working. :( docu says: _4. Open & compile the runtime package specific to the IDE being used (e.g. B305vr2007.dpk for Delphi2007) Start C++Builder2009 - "Open Project..", select "B305vr2009.dpk" and click "open", but nothing happen. What is my mistake?

    Read the article

  • hibernate empty collection in component

    - by Jurgen H
    I have a component mapped using Hibernate. If all fields in the component in the database are null, the component itself is set to null by hibernate. This is the expected behavior and also what I need. The problem I have, is that when I add a bag to that component, the bag is initialized to an empty list. This means the component has a non null value... resulting in the component being created. Any idea how to fix this? <class name="foo.bar.Entity" table="Entity"> <id name="id" column="id"> <generator class="native" /> </id> <property name="departure" column="departure_time" /> <property name="arrival" column="arrival_time" /> <component name="statistics"> <bag name="linkStatistics" lazy="false" cascade="all" > <key column="entity_id" not-null="true" /> <one-to-many class="foo.bar.LinkStatistics" /> </bag> <property name="loggedTime" column="logged_time" /> ... </component> A criteria with Restirctions.isNull("statistics") does return the expected values.

    Read the article

  • Skia Decoder fails to decode remote Stream

    - by Samuh
    I am trying to open a remote Stream of a JPEG image and convert it into a Bitmap object: BitmapFactory.decodeStream( new URL("http://some.url.to/source/image.jpg") .openStream()); The decoder returns null and in the logs I get the following message: DEBUG/skia(xxxx): --- decoder->decode returned false Note: 1. the content length is non-zero and content type is image/jpeg 2. When I open the URL in browser I can see the image. What is that I am missing here? Please help. Thanks.

    Read the article

  • Mirror/Backup from SSH/SFTP to Windows

    - by Andrew Russell
    What I am trying to do is mirror a directory (recursively) from a server I can SSH/SFTP to, to a Windows machine. I want to do this as part of a script, so it can be automated. I only want to copy new or modified files. I don't want to have to download all the files every time the script runs. In other words, I'm trying to get the equivalent of RoboCopy /MIR that will work using SFTP as a source. What would you recommend?

    Read the article

< Previous Page | 26 27 28 29 30 31 32 33 34 35 36 37  | Next Page >