Search Results

Search found 7418 results on 297 pages for 'argument passing'.

Page 93/297 | < Previous Page | 89 90 91 92 93 94 95 96 97 98 99 100  | Next Page >

  • Content theft - Where can I go from here?

    - by Toby
    I am the webmaster of a very successful blog in a fairly small niche. Recently our success has started to bite us with people copying posts on the site without consent and trying to pass them off as their own work. Most sites stop as soon as you contact them but there is one in particular that is a blogger site which persists in passing off our content as their own. Every post we find we report to Google and they have been fairly good at taking the posts offline within a day or two but this isn't good enough or a long term solution. Given the nature of what is being blogged about after 24 hours the post is pretty much useless so I need some way to just stop them from taking our content? Any ideas? I don't want to go down the route of using a third party for people to get our RSS feed but I guess that is one option?

    Read the article

  • PowerShell, Start-Job, -ScriptBlock = sad panda face

    - by AaronBertrand
    I am working on a project where I am using PowerShell to collect a lot of performance counters from a lot of servers. More on that later. For now I wanted to highlight an important lesson I learned when trying to use Start-Job to call a PS script using -ScriptBlock and passing in parameters. This could be a comedy of errors if you haven't come across it before, so I thought it might be useful to throw up a quick post about it. To keep things simple, let's say I am calling a script with two parameters,...(read more)

    Read the article

  • Optimistic work sharing on sparsely distributed systems

    - by Asti
    What would a system like BOINC look like if it were written today? At the time BOINC was written, databases were the primary choice for maintaining a shared state and concurrency among nodes. Since then, many approaches have been developed for tasking with optimistic concurrency (OT, partial synchronization primitives, shared iterators etc.) Is there an optimal paradigm for optimistically distributing units of work on sparsely distributing systems which communicate through message passing? Sorry if this is a bit vague. P.S. The concept of Tuple-spaces is great, but locking is inherent to its definition. Edit: I already have a federation system which works very well. I have a reactive OT system is implemented on top of it. I'm looking to extend it to get clients to do units of work.

    Read the article

  • Should I ditch AJAX in client side web development when I've got a web-socket open?

    - by jt0dd
    I was thinking that maybe I should forget AJAX (HTTP) requests when I've got a web-socket open between client and server, but I decided I should ask here to check if this could be a bad practice for some reason that I'm not thinking of. Once the socket is open, there's less syntax (often meaning simpler error handling) involved in passing information between client and server with Socket.io (just one example of a web-socket). Is there some obvious situation where a web-socket (Socket.io for example) isn't going to be capable of handling a functionality that an AJAX request could do easily?

    Read the article

  • Is it possible to run the GNOME user manager from XFCE4?

    - by Chris Moore
    If I run 'gnome-control-center' and click on the 'User Accounts' icon, the gnome-control-center crashes. I built it from source to see what's going on, and it turns out it's doing a if (strcmp(getenv("XDG_CURRENT_DESKTOP"), "GNOME")) in panels/user-accounts/um-password-dialog.c, line 690. I don't have an environment variable "XDG_CURRENT_DESKTOP", so the getenv is returning NULL, and the strcmp is segfaulting Where is XDG_CURRENT_DESKTOP meant to be defined? And shouldn't gnome-control-center check the pointer returned by getenv before passing it to strcmp? Does xfce4 have its own 'User Accounts' tool for creating new users?

    Read the article

  • Interacting with scene from controller/app delegate cocos2d

    - by cjroebuck
    I'm attempting to make my first cocos2d (for iphone) multiplayer game and having difficulty understanding how to interact with a scene once it is running. The game is a simple turn-based one and so I have a GameController class which co-ordinates the rounds. I also have a GameScene class which is the actual scene that is displayed during a round of the game. The basic interaction I need is for the GameController to be able to pass messages to the GameScene class.. such as StartRound/StopRound etc. The thing that complicates this is that I am loading the GameScene with a LoadingScene class which simply initialises the scene and replaces the current scene with this one, so there is no reference from GameController to GameScene, so passing messages is quite tricky. Does anyone have any ways to get around this, ideally I would still like to use a Loading class as it smooths out the memory hit when replacing scenes.

    Read the article

  • Managing .NET Deployment Configuration With Rake

    - by Liam McLennan
    Rake is a ruby internal DSL for build scripting. With (or without) the help of albacore rake makes an excellent build scripting tool for .NET projects. The albacore documentation does a good job of explaining how to build solutions with rake but there is nothing to assist with another common build task – updating configuration files. The following ruby script provides some helper methods for performing common configuration changes that are required as part of a build process.  class ConfigTasks def self.set_app_setting(config_file, key, value) ovsd_element = config_file.root.elements['appSettings'].get_elements("add[@key='#{key}']")[0] ovsd_element.attributes['value'] = value end def self.set_connection_string(config_file, name, connection_string) conn_string_element = config_file.root.elements['connectionStrings'].get_elements("add[@name='#{name}']")[0] conn_string_element.attributes['connectionString'] = connection_string end def self.set_debug_compilation(config_file, debug_compilation) compilation_element = config_file.root.elements['system.web'].get_elements("compilation")[0] compilation_element.attributes['debug'] = false end private def self.write_xml_to_file(xml_document, file) File.open(file, 'w') do |config_file| formatter = REXML::Formatters::Default.new formatter.write(xml_document, config_file) end end end To use, require the file and call the class methods, passing the configuration file name and any other parameters. require 'config_tasks' ConfigTasks.set_app_setting 'web.config', 'enableCache', 'false'

    Read the article

  • What options are there for integrating with payment gateways?

    - by Rowland Shaw
    It seems that there are only two types of payment gateway service out there at the moment; Either that the entire cart logic is handled offsite (with something like Paypal's Standard option) or the other option being that you need to go through the certification for handling credit card numbers and doing pretty much everything yourself. Ideally, for the project I'm working on, I'm after a bit of middle ground such that I can handle the cart on-site, and only pass over to a payment gateway (with an order amount, billing & delivery details, and order ref) for them to handle the card details, before passing back. I'm sure that I've used e-commerce sites using this pattern before, but I cannot find any payment providers out there that offer this sort of option, so are there any? The only over requirement we have at present is that it must accept orders in Sterling.

    Read the article

  • Friday Fun: Snowmageddon

    - by Asian Angel
    Has it been a long week at work and your Friday is just not passing quickly enough? If you are in need of some stress relief today then get ready to battle evil mutant snowmen in Snowmageddon Latest Features How-To Geek ETC How to Integrate Dropbox with Pages, Keynote, and Numbers on iPad RGB? CMYK? Alpha? What Are Image Channels and What Do They Mean? How to Recover that Photo, Picture or File You Deleted Accidentally How To Colorize Black and White Vintage Photographs in Photoshop How To Get SSH Command-Line Access to Windows 7 Using Cygwin The How-To Geek Video Guide to Using Windows 7 Speech Recognition Stylebot Customizes Web Pages in Chrome, Now Has Downloadable Styles Blackberry, Dell, Apple, and Motorola Tablets Compared [Infographic] Encrypt Your Google Search Queries Vintage Posters Showcase the History of Tech Advertising Google Cloud Print Extension Lets You Print Doc/PDF/Txt Files from Web Sites Hack a $10 Flashlight into an Ultra-bright Premium One

    Read the article

  • How can I convert an image from raw data in Android without any munging?

    - by stephelton
    I have raw image data (may be png, jpg, ...) and I want it converted in Android without changing its pixel depth (bpp). In particular, when I load a grayscale (8 bpp) image that I want to use as alpha (glTexImage() with GL_ALPHA), it converts it to 16 bpp (presumably 5_6_5). While I do have a plan b (actually, I'm probably on plan 'e' by now, this is really becoming annoying) I would really like to discover an easy way to do this using what is readily available in the api. So far, I'm using BitmapFactory.decodeByteArray(). While I'm at it. I'm doing this from a native environment via jni (passing the buffer in from C, and a new buffer back to C from Java). Any portable solution in C/C++ would be preferable, but I don't want to introduce anything that might break in future versions of Android, etc.

    Read the article

  • What is a generalized form creator that runs on .NET / Windows?

    - by Josh
    At the institution that I'm at, we've been looking for web applications that enable users to create and deploy their own forms. Similar applications are Wufoo, and google forms. Unfortunately, those solutions will not work for us, because we are required to host all data and information on our own servers. I've found a few solutions that are written in PHP, but at this point, it doesn't appear that this is acceptable. I've tried searching for ".net form creator" but unfortunately, when you search for ".net forms" you get a lot of results relating to created asp.net webforms, which is not what we're looking for at all. I've been told that finding a solution that runs on .NET and windows servers with either Oracle or MSSQL databases would be much more acceptable. I've found a few, but they are open source, and the IS Security people are not kind to those solutions, despite my attempts to show otherwise. If anyone knows of some solution out there, I would greatly appreciate you passing on the names of those applications!

    Read the article

  • Solving 2D Collision Detection Issues with Relative Velocities

    - by Jengerer
    Imagine you have a situation where two objects are moving parallel to one-another and are both within range to collide with a static wall, like this: A common method used in dynamic collision detection is to loop through all objects in arbitrary order, solve for pair-wise collision detection using relative velocities, and then move the object to the nearest collision, if any. However, in this case, if the red object is checked first against the blue one, it would see that the relative velocity to the blue object is -20 m/s (and would thereby not collide this time frame). Then it would see that the red object would collide with the static wall, and the solution would be: And the red object passes through the blue one. So it appears to be a matter of choosing the right order in which you check collisions; but how can you determine which order is correct? How can this passing through of objects be avoided? Is ignoring relative velocity and considering every object as static during pair-wise checks a better idea for this reason?

    Read the article

  • Method flags as arguments or as member variables?

    - by Martin
    I think the title "Method flags as arguments or as member variables?" may be suboptimal, but as I'm missing any better terminology atm., here goes: I'm currently trying to get my head around the problem of whether flags for a given class (private) method should be passed as function arguments or via member variable and/or whether there is some pattern or name that covers this aspect and/or whether this hints at some other design problems. By example (language could be C++, Java, C#, doesn't really matter IMHO): class Thingamajig { private ResultType DoInternalStuff(FlagType calcSelect) { ResultType res; for (... some loop condition ...) { ... if (calcSelect == typeA) { ... } else if (calcSelect == typeX) { ... } else if ... } ... return res; } private void InteralStuffInvoker(FlagType calcSelect) { ... DoInternalStuff(calcSelect); ... } public void DoThisStuff() { ... some code ... InternalStuffInvoker(typeA); ... some more code ... } public ResultType DoThatStuff() { ... some code ... ResultType x = DoInternalStuff(typeX); ... some more code ... further process x ... return x; } } What we see above is that the method InternalStuffInvoker takes an argument that is not used inside this function at all but is only forwarded to the other private method DoInternalStuff. (Where DoInternalStuffwill be used privately at other places in this class, e.g. in the DoThatStuff (public) method.) An alternative solution would be to add a member variable that carries this information: class Thingamajig { private ResultType DoInternalStuff() { ResultType res; for (... some loop condition ...) { ... if (m_calcSelect == typeA) { ... } ... } ... return res; } private void InteralStuffInvoker() { ... DoInternalStuff(); ... } public void DoThisStuff() { ... some code ... m_calcSelect = typeA; InternalStuffInvoker(); ... some more code ... } public ResultType DoThatStuff() { ... some code ... m_calcSelect = typeX; ResultType x = DoInternalStuff(); ... some more code ... further process x ... return x; } } Especially for deep call chains where the selector-flag for the inner method is selected outside, using a member variable can make the intermediate functions cleaner, as they don't need to carry a pass-through parameter. On the other hand, this member variable isn't really representing any object state (as it's neither set nor available outside), but is really a hidden additional argument for the "inner" private method. What are the pros and cons of each approach?

    Read the article

  • Initramfs error during boot

    - by PoohJuice
    Boot from (hd0,0) ext3 238ac8ca-9576-443d-8e23-8dd836cd2683 Starting up ... mount: mounting /dev/disk/by-uuid/238ac8ca-9576-443d-8e23-8dd836cd2683 on /root failed: Invalid argument mount: mounting /dev on /root/dev failed: No such file or directory mount: mounting /sys on /root/sys failed: No such file or directory mount: mounting /proc on /root/proc failed: No such file or directory Target filesystem doesn't have requested /sbin/init. No init found. Try passing init= bootarg. BusyBox v1.15.3 (Ubuntu 1:1.15.3-1ubuntu5) built in shell (ash) Enter 'help' for a list of built-in commands.

    Read the article

  • 2D wave-like sprite movement XNA

    - by TheBroodian
    I'm trying to create a particle that will 'circle' my character. When the particle is created, it's given a random position in relation to my character, and a box to provide boundaries for how far left or right this particle should circle. When I use the phrase 'circle', I'm referring to a simulated circling, i.e., when moving to the right, the particle will appear in front of my character, when passing back to the left, the particle will appear behind my character. That may have been too much context, so let me cut to the chase: In essence, the path I would like my particle to follow would be akin to a sine wave, with the left and right sides of the provided rectangle being the apexes of the wave. The trouble I'm having is that the position of the particle will be random, so it will never be produced at the same place within the wave twice, but I have no idea how to create this sort of behavior procedurally.

    Read the article

  • Are all languages basically the same?

    - by Anirudh
    Recently, i had to understand the design of a small program written in a language i had no idea about (ABAP, if you must know). I could figure it out without too much difficulty. I realize that mastering a new language is a completely different ball game, but purely understanding the intent of code (specifically production standard code, which is not necessarily complex) in any language is straight forward, if you already know a couple of languages (preferably one procedural/OO and one functional). Is this generally true? Are all programming languages made up of similar constructs like loops, conditional statements and message passing between functions? Are there non-esoteric languages that a typical Java/Ruby/Haskell programmer would not be able to make sense of? Do all languages have a common origin?

    Read the article

  • How to make Unit Tests to make sure stored procedure is deleting row from the database?

    - by aspdotnetuser
    I'm new to unit testing and I need some help with the following. I have created a small project to help me learn how to make Unit Tests. The functionality for one of the forms in my application deletes a user from the User table (and other rows in mapping tables). Currently, the unit test I have created to test this sets up the required objects and then calls the business rules method (passing in the user id) which calls the data access method to execute the stored procedure that deletes the rows in the tables. Is this the correct method to test whether something is being deleted successfully? Should the unit test / setup method first insert some test data which the unit test then deletes?

    Read the article

  • Dependency injection and IOC containers in a closed project

    - by Puckl
    Does it make sense to assemble my project with dependency injection containers if I am the only one who will use the code of that project? The question came up when I read this IOC Article http://martinfowler.com/articles/injection.html The justification for using dependency injection in this article is that friends can reuse a class, and replace depending classes with their own classes because they get injected and not instantiated in the class. I would only use it to inject objects where they are needed instead of passing them through layers to their target. (Which is not so bad I learned here: Is it bad practice to pass instances through several layers?) (Maybe I will reuse parts of the project, who knows, but I don´t know if that is a good justification)

    Read the article

  • Field Trip Automatically Alerts You to Local Places of Interest

    - by Jason Fitzpatrick
    Android: Field Trip is a free mobile app that acts like a local tour guide, alerting you to landmarks, historical sites, and unique local attractions. A simple walk around your city’s down town can turn into a history lesson or lead to the discovery of a new hang out. To use Field Trip simply install it on your GPS-enabled Android smartphone and start it up. You can configure the app to notify you of certain types of things (historic places, outdoor art, food and drink, and more), refine the results over time by telling the app which tidbits you enjoyed, and more. Field Trip even has a driving mode where you can turn it on and, as you drive through a city or across the countryside, it will narrate your journey by telling you about interesting sites you’re passing. Field Trip is free, Android only. Hit up the link below to take it for a spin. Field Trip [via Geek News Central] 8 Deadly Commands You Should Never Run on Linux 14 Special Google Searches That Show Instant Answers How To Create a Customized Windows 7 Installation Disc With Integrated Updates

    Read the article

  • Is having a class have a handleAction(type) method bad practice?

    - by zhenka
    My web application became a little too complicated to do everything in a controller so I had to build large wrapper classes for ORM models. The possible actions a user can trigger are all similar and after a certain point I realized that the best way to go would be to just have constructor method receive action type as a parameter to take care of the small differences internally, as opposed to either passing many arguments or doing a lot of things in the controller. Is this a good practice? I can't really give details for privacy issues.

    Read the article

  • Beginner question about vertex arrays in OpenGL

    - by MrDatabase
    Is there a special order in which vertices are entered into a vertex array? Currently I'm drawing single textures like this: glBindTexture(GL_TEXTURE_2D, texName); glVertexPointer(2, GL_FLOAT, 0, vertices); glTexCoordPointer(2, GL_FLOAT, 0, coordinates); glDrawArrays(GL_TRIANGLE_STRIP, 0, 4); where vertices has four "xy pairs". This is working fine. As a test I doubled the sizes of the vertices and coordinates arrays and changed the last line above to: glDrawArrays(GL_TRIANGLE_STRIP, 0, 8); since vertices now contains eight "xy pairs". I do see two textures (the second is intentionally offset from the first). However the textures are now distorted. I've tried passing GL_TRIANGLES to glDrawArrays instead of GL_TRIANGLE_STRIP but this doesn't work either. I'm so new to OpenGL that I thought it's best to just ask here :-) Cheers!

    Read the article

  • Interacting with scene cocos2d

    - by cjroebuck
    I'm attempting to make my first cocos2d (for iphone) multiplayer game and having difficulty understanding how to interact with a scene once it is running. The game is a simple turn-based one and so I have a GameController class which co-ordinates the rounds. I also have a GameScene class which is the actual scene that is displayed during a round of the game. The basic interaction I need is for the GameController to be able to pass messages to the GameScene class.. such as StartRound/StopRound etc. The thing that complicates this is that I am loading the GameScene with a LoadingScene class which simply initialises the scene and replaces the current scene with this one, so there is no reference from GameController to GameScene, so passing messages is quite tricky. Does anyone have any ways to get around this, ideally I would still like to use a Loading class as it smooths out the memory hit when replacing scenes.

    Read the article

  • Basics of drawing in 2d with OpenGL 3 shaders

    - by davidism
    I am new to OpenGL 3 and graphics programming, and want to create some basic 2d graphics. I have the following scenario of how I might go about drawing a basic (but general) 2d rectangle. I'm not sure if this is the correct way to think about it, or, if it is, how to implement it. In my head, here's how I imagine doing it: t = make_rectangle(width, height) build general VBO, centered at 0, 0 optionally: t.set_scale(2) optionally: t.set_angle(30) t.draw_at(x, y) calculates some sort of scale/rotate/translate matrix (or matrices), passes the VBO and the matrix to a shader program Something happens to clip the world to the view visible on screen. I'm really unclear on how 4 and 5 will work. The main problem is that all the tutorials I find either: use fixed function pipeline, are for 3d, or are unclear how to do something this "simple". Can someone provide me with either a better way to think of / do this, or some concrete code detailing performing the transformations in a shader and constructing and passing the data required for this shader transformation?

    Read the article

  • Requriing 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. Thanks.

    Read the article

  • How come I can not install plugins on my local Wordpress install?

    - by classer
    Hello, I got WordPress up and running fine on Ubuntu 10.04 by using this source except that when I try to update and install themes/plugins I get this following error message in wp-admin page: Installing Plugin: WordPress.com Stats 1.8.1 Downloading install package from http://downloads.wordpress.org/plugin/stats.1.8.1.zip… Unpacking the package… Could not create directory. /var/www/wordpress/wp-content/upgrade/stats.tmp/stats Actions: Return to Plugin Installer At first I thought I had to setup an FTP account but searched more and I found some information that says that I need to change the permissions of the wp-content folder which is located in the directory: /var/www/wordpress/wp-content I tried changing it by doing: sudo chmod -R 777 wp-content/ but when I tried installing a plugin I got the same error message. I also tried passing it 755 as a permission but still got the same thing. I settled on 755 because it is more secure I have read. How can I solve this problem safely and securely?

    Read the article

< Previous Page | 89 90 91 92 93 94 95 96 97 98 99 100  | Next Page >