Search Results

Search found 13011 results on 521 pages for 'catch block'.

Page 186/521 | < Previous Page | 182 183 184 185 186 187 188 189 190 191 192 193  | Next Page >

  • How should a site respond to automated login attempts with phony usernames?

    - by qntmfred
    For the last couple weeks I've been seeing a consistent stream of 15-30 invalid login attempts per hours on my site. Many of them are non-sensical usernames that nobody would ever register for real, and often contain typical spam-related keywords. They all come from different IP addresses so I can't just IP block/throttle the requests. I'm not worried about unauthorized access to real accounts since they aren't using real usernames. And if it were a member of my site trying to brute force logins, they could easily scrape the valid usernames from the site, so I'm not worried about that kind of malicious behavior either. But what's the point of this type of activity? What would whichever bot operator is doing this have to gain by attempting all these logins?

    Read the article

  • Multithreading for a mixed-genre game in Python?

    - by arrogantc
    So here's the situation. I'm making a game that mixes two genres; arcade shooter and puzzler. They don't intertwine TOO much; all the interaction that really goes on is that every time an enemy is destroyed, a block is created. The blocks aren't even a part of the main collision detection system; they have their own more suited to their needs. What I want to ask is this; might it be a good idea to have the arcade shooter portion run on one thread, and the puzzle game portion run on another?

    Read the article

  • Website falsely blocked because of spam. Does anyone know how we should proceed?

    - by Thomas Crepain
    I'm responsible for ICT at FOS Open Scouting, a belgian scouting organisation. Our website was hacked a few years back and blocked by Facebook as a result. After we regained control over the site Facebook continued to block our domain and this is causing us a number of problems. We have tried many times in the past year to contact Facebook using their 'I am blocked from adding content' form (https://www.facebook.com/help/contact.php?show_form=block_appeal) to no avail. The blocked URLs are: http://www.fos.be and http://www.fosopenscouting.be Does anyone know how we should/could proceed?

    Read the article

  • Powershell Run-As Script

    - by marc dekeyser
    Disclaimer: This script is not of my own making. I found it on a share somewhere and it is so handy I started using in a bunch of scripts. To the writer: If you're out there, somewhere, when you see this, thank you! Check if script is running as Adminstrator and if not use RunAs    # Use Check Switch to check if admin        param([Switch]$Check)        $IsAdmin = ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()`        ).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator")            if ($Check) { return $IsAdmin }        if ($MyInvocation.ScriptName -ne "")    {         if (-not $IsAdmin)         {             try            {                 $arg = "-file `"$($MyInvocation.ScriptName)`""                Start-Process "$psHome\powershell.exe" -Verb Runas -ArgumentList $arg -ErrorAction 'stop'             }            catch            {                Write-Warning "Error - Failed to restart script with runas"                 break                          }            exit # Quit this session of powershell        }     }     else     {         Write-Warning "Error - Script must be saved as a .ps1 file first"         break     } write-host "Script Running As Administrator" -foregroundcolor redWrite-host ""

    Read the article

  • MCP 1.7.10 Java class navigation

    - by Elias Benevedes
    So, I'm new to the Minecraft modding community and trying to understand where to start. I've attempted to do it before, but dropped it to the complexity of starting and the lack of a site like this to help (Mind that I'm also semi-new to Java, but have worked extensively in Javascript and Python. I understand how Java is different from the two). I have downloaded MCP 9.08 (Decompiles 1.7.10), and decompiled Minecraft. I'm looking to mod client, so I didn't supply it with a server jar. Everything seemed to work fine in decompile (Only error was it couldn't find the server jar). I can find my files in /mcp908/src/minecraft/net/minecraft. However, if I open up one of the classes in, say, block, I see a bunch of variables starting with p_ and ending with _. Is there any way to make these variables more decipherable, to understand what's going on so I can learn by example? Thank you.

    Read the article

  • Objects won't render when Texture Compression + Mipmapping is Enabled

    - by felipedrl
    I'm optimizing my game and I've just implemented compressed (DXTn) texture loading in OpenGL. I've worked my way removing bugs but I can't figure out this one: objects w/ DXTn + mipmapped textures are not being rendered. It's not like they are appearing with a flat color, they just don't appear at all. DXTn textured objs render and mipmapped non-compressed textures render just fine. The texture in question is 256x256 I generate the mips all the way down 4x4, i.e 1 block. I've checked on gDebugger and it display all the levels (7) just fine. I'm using GL_LINEAR_MIPMAP_NEAREST for min filter and GL_LINEAR for mag one. The texture is being compressed and mipmaps being created offline with Paint.NET tool using super sampling method. (I also tried bilinear just in case) Source follow: [SNIPPET 1: Loading DDS into sys memory + Initializing Object] // Read header DDSHeader header; file.read(reinterpret_cast<char*>(&header), sizeof(DDSHeader)); uint pos = static_cast<uint>(file.tellg()); file.seekg(0, std::ios_base::end); uint dataSizeInBytes = static_cast<uint>(file.tellg()) - pos; file.seekg(pos, std::ios_base::beg); // Read file data mData = new unsigned char[dataSizeInBytes]; file.read(reinterpret_cast<char*>(mData), dataSizeInBytes); file.close(); mMipmapCount = header.mipmapcount; mHeight = header.height; mWidth = header.width; mCompressionType = header.pf.fourCC; // Only support files divisible by 4 (for compression blocks algorithms) massert(mWidth % 4 == 0 && mHeight % 4 == 0); massert(mCompressionType == NO_COMPRESSION || mCompressionType == COMPRESSION_DXT1 || mCompressionType == COMPRESSION_DXT3 || mCompressionType == COMPRESSION_DXT5); // Allow textures up to 65536x65536 massert(header.mipmapcount <= MAX_MIPMAP_LEVELS); mTextureFilter = TextureFilter::LINEAR; if (mMipmapCount > 0) { mMipmapFilter = MipmapFilter::NEAREST; } else { mMipmapFilter = MipmapFilter::NO_MIPMAP; } mBitsPerPixel = header.pf.bitcount; if (mCompressionType == NO_COMPRESSION) { if (header.pf.flags & DDPF_ALPHAPIXELS) { // The only format supported w/ alpha is A8R8G8B8 massert(header.pf.amask == 0xFF000000 && header.pf.rmask == 0xFF0000 && header.pf.gmask == 0xFF00 && header.pf.bmask == 0xFF); mInternalFormat = GL_RGBA8; mFormat = GL_BGRA; mDataType = GL_UNSIGNED_BYTE; } else { massert(header.pf.rmask == 0xFF0000 && header.pf.gmask == 0xFF00 && header.pf.bmask == 0xFF); mInternalFormat = GL_RGB8; mFormat = GL_BGR; mDataType = GL_UNSIGNED_BYTE; } } else { uint blockSizeInBytes = 16; switch (mCompressionType) { case COMPRESSION_DXT1: blockSizeInBytes = 8; if (header.pf.flags & DDPF_ALPHAPIXELS) { mInternalFormat = GL_COMPRESSED_RGBA_S3TC_DXT1_EXT; } else { mInternalFormat = GL_COMPRESSED_RGB_S3TC_DXT1_EXT; } break; case COMPRESSION_DXT3: mInternalFormat = GL_COMPRESSED_RGBA_S3TC_DXT3_EXT; break; case COMPRESSION_DXT5: mInternalFormat = GL_COMPRESSED_RGBA_S3TC_DXT5_EXT; break; default: // Not Supported (DXT2, DXT4 or any compression format) massert(false); } } [SNIPPET 2: Uploading into video memory] massert(mData != NULL); glGenTextures(1, &mHandle); massert(mHandle!=0); glBindTexture(GL_TEXTURE_2D, mHandle); commitFiltering(); uint offset = 0; Renderer* renderer = Renderer::getInstance(); switch (mInternalFormat) { case GL_RGB: case GL_RGBA: case GL_RGB8: case GL_RGBA8: for (uint i = 0; i < mMipmapCount + 1; ++i) { uint width = std::max(1U, mWidth >> i); uint height = std::max(1U, mHeight >> i); glTexImage2D(GL_TEXTURE_2D, i, mInternalFormat, width, height, mHasBorder, mFormat, mDataType, &mData[offset]); offset += width * height * (mBitsPerPixel / 8); } break; case GL_COMPRESSED_RGB_S3TC_DXT1_EXT: case GL_COMPRESSED_RGBA_S3TC_DXT1_EXT: case GL_COMPRESSED_RGBA_S3TC_DXT3_EXT: case GL_COMPRESSED_RGBA_S3TC_DXT5_EXT: { uint blockSize = 16; if (mInternalFormat == GL_COMPRESSED_RGB_S3TC_DXT1_EXT || mInternalFormat == GL_COMPRESSED_RGBA_S3TC_DXT1_EXT) { blockSize = 8; } uint width = mWidth; uint height = mHeight; for (uint i = 0; i < mMipmapCount + 1; ++i) { uint nBlocks = ((width + 3) / 4) * ((height + 3) / 4); // Only POT textures allowed for mipmapping massert(width % 4 == 0 && height % 4 == 0); glCompressedTexImage2D(GL_TEXTURE_2D, i, mInternalFormat, width, height, mHasBorder, nBlocks * blockSize, &mData[offset]); offset += nBlocks * blockSize; if (width <= 4 && height <= 4) { break; } width = std::max(4U, width / 2); height = std::max(4U, height / 2); } break; } default: // Not Supported massert(false); } Also I don't understand the "+3" in the block size computation but looking for a solution for my problema I've encountered people defining it as that. I guess it won't make a differente for POT textures but I put just in case. Thanks.

    Read the article

  • How to make an internet server as firewall using ubuntu 11.10

    - by Sumant
    i have one static broadband connection which is coming to my Ubuntu server with 2 lan cards, there are 10 more PC's to which i need to provide internet connection through Ubuntu server as well as i have to block social networking websites access during office hours. Now i am getting confuse with the way i should follow i should go for sharing internet connection & firewall building or should configure DHCP server,router & firewall. which will be easiest setup and what i should do for that. coz its first time i will be doing.

    Read the article

  • Improving exception handling ?

    - by n00b
    Hello, I am a newbie programmer and I recently started learning about exception handling in Java. I know what try, catch and finally blocks do, but I really need to understand how to use them well and where to handle something in the call stack... I have a project right now that involves I/O and all I'm doing is handling the exception in the lowest possible method in the call stack. I'm sure my exception handling can be improved, so I'm asking you guys how you think of exception handling? How did you guys get good at this and how can I better wrap my head around this idea?

    Read the article

  • Declarative Transactions in Node.js

    - by James Kingsbery
    Back in the day, it was common to manage database transactions in Java by writing code that did it. Something like this: Transaction tx = session.startTransaction(); ... try { tx.commit(); } catch (SomeException e){ tx.rollback(); } at the beginning and end of every method. This had some obvious problems - it's redundant, hides the intent of what's happening, etc. So, along came annotation-driven transactions: @Transaction public SomeResultObj getResult(...){ ... } Is there any support for declarative transaction management in node.js?

    Read the article

  • Different ways to pass Textures into HLSL shaders

    - by codymanix
    The GraphicsDevice class of xna 4 has the properties Textures and VertexTextures. What is the exact difference? I don't really understand what MSDN tells me about this. I usually use Effect parameters to pass textures to my HLSL shaders. What are the differences between these methods, which is faster? My Scenario: I am working on a minecraft like game, which means lots of separate DrawPrimitives calls and change current Texture often since I have lots of different block types. Since I use an Octtree to organize the world, I cannot easily sort by texture.

    Read the article

  • How to prevent a specific website from linking to our domain?

    - by Edward
    We have a landing page which is used only for running an ad campaign. There is a website that has found this link somehow and is linking to it. I've been told by marketing they don't want that website linking to the landing page. How can I prevent a specific website from linking to our domain? I don't want to block all websites from linking to it, just this specific one. Is there solution something to do with .htaccess? If so, please provide an example of doing this or a link to example because I've been unable to find one.

    Read the article

  • Mounting ntfs windows drive and retrieving its data

    - by Sarmad
    Hej, A friend gave me his laptop which had problems with booting (windows). He claims his data on the drive to be retrieved and saved. I have Linux Ubuntu Server to mount its hard drive and check the contents. Now when I have mounted it I see only boot.sdi, sources, System Volume Information I have no idea why is it so? How can I access and retrieve the contents? results of sudo fdisk -l are as follows: Enhet Start Början Slut Block Id System /dev/sdb1 2048 3074047 1536000 27 Hidden NTFS WinRE /dev/sdb2 * 3074048 246945791 121935872 7 HPFS/NTFS/exFAT /dev/sdb3 246945792 416354295 84704252 7 HPFS/NTFS/exFAT /dev/sdb4 416354304 488394751 36020224 f W95 Utökad (LBA) /dev/sdb5 416356352 488394751 36019200 7 HPFS/NTFS/exFAT Please help me in this regard.

    Read the article

  • Database Insider Newsletter: February 2011 Edition Available

    - by jenny.gelhausen
    The February edition of the Database Insider Newsletter is now available. This edition covers the upcoming IOUG's Day of Real World Performance Tour What's coming for Collaborate 2011 How Oracle helps you steer clear of security pitfalls and much more... Enjoy! var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www."); document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E")); try { var pageTracker = _gat._getTracker("UA-13185312-1"); pageTracker._trackPageview(); } catch(err) {}

    Read the article

  • Is there a class or id that will cause an ad to be blocked by most major adblockers?

    - by Moak
    Is there a general class or ID for a html element that a high majority of popular adblockers will block on a website it has no information for. My intention is to have my advertisement blocked, avoiding automatic blocking is easy enough... I was thinking of maybe lending some ids or classes from big advertisment companies that area already being fought off quite actively. right now my html <ul id=partners> <li class=advertisment><a href=# class=sponsor><img class=banner></a></li> </ul> Will this work or is there a more solid approach?

    Read the article

  • Free LINQPad is a great way to learn LINQ!

    - by CatherineRussell
    LINQPad is a great way to learn LINQ: it comes loaded with 500 examples from the book, C# 4.0 in a Nutshell.  There's no better way to experience the coolness of LINQ and functional programming. LINQPad is more than just a LINQ tool: it's an ergonomic C#/VB scratchpad that instantly executes any C#/VB expression, statement block or program with rich output formatting – the ultimate in dynamic development. Put an end to those hundreds of Visual Studio Console projects cluttering your source folder! Best of all, LINQPad standard edition is free and can run without installation (or with a low-impact setup). The executable is 3MB and is self-updating. To get it, go to: http://www.linqpad.net/

    Read the article

  • Find Out Which Websites are Tracking You Across the Web

    - by Taylor Gibb
    Have you ever wondered where the websites you visit send your information? Well, if you have, read on to find out about this new extension from Mozilla that will tell you how you are tracked across websites. Editor’s Note: Most websites use cookies of some type, and all online advertisers do, including the advertisers on this site. You’re welcome to block cookies if that’s a worry. How to Banish Duplicate Photos with VisiPic How to Make Your Laptop Choose a Wired Connection Instead of Wireless HTG Explains: What Is Two-Factor Authentication and Should I Be Using It?

    Read the article

  • I am getting an error while writing my first app as shown in developer get-started tutorial

    - by TrickyJ
    I am trying to learn to develop apps in ubuntu and currently i am going through this tutorial. As shown in the video I am writing the below given codes: self.refreshbutton = self.builder.get_object("refreshbutton") def on_refreshbutton_clicked(self, widget): print "Refresh" As soon as I try to run my application it is giving me an error : I type this command to run my application : quickly run (trickybrowser:4418): Gtk-WARNING **: Theme parsing error: gtk-widgets.css:1971:11: Not using units is deprecated. Assuming 'px'. (trickybrowser:4418): Gtk-WARNING **: Failed to parse /usr/share/themes/mac-os-lion-theme-v2/gtk-3.0/settings.ini: Key file contains line '/* ' which is not a key-value pair, group, or comment Traceback (most recent call last): File "bin/trickybrowser", line 32, in <module> import trickybrowser File "/home/tricky/trickybrowser/trickybrowser/__init__.py", line 14, in <module> from trickybrowser import TrickybrowserWindow File "/home/tricky/trickybrowser/trickybrowser/TrickybrowserWindow.py", line 32 print "Refresh" ^ IndentationError: expected an indented block

    Read the article

  • Crappy school, what to do? [closed]

    - by zhenka
    I started programming fairly late. I am 24 years old and about to graduate from a local public university with a really poorly designed curriculum and teachers. Most of the work felt like busy work, and no matter how much I try, it all feels like a waste. I know what a good curriculum looks like. I know what books I should read, but alas it's not so in my university. There is no way at this point that I can catch up to those graduating from places like MIT. My question and this is a serious one: what do I do? Do I just postpone learning the theory I would have learned until later and focus on software engineering skills? How important is the theory in terms of landing a job in New York? Any particular things I should focus on to land a software engineer job? I am very motivated and I just wish someone would give me the time and a chance.

    Read the article

  • Ask the Readers: Have You Cut the Cable Cord?

    - by Jason Fitzpatrick
    The proliferation of streaming services and diverse media content has made cutting the cable cord an appetizing option for many people. Have you cut the cord, stuck with traditional services, or mixed the two together? It’s easier than ever to ditch the cable subscription and still keep watching your favorite TV shows and movies (but still tricky to catch live events and television without a cable subscription). This week we’re interested in hearing all about your media arrangements: Do you have a traditional cable bundle? Ditched it for a Netflix-only experience? Pay for both because you just can’t get enough of live TV and streaming content? Sounds off in the comments with the state of your media setup, the more detailed the better, and then check back in on Friday for the What You Said roundup. 6 Ways Windows 8 Is More Secure Than Windows 7 HTG Explains: Why It’s Good That Your Computer’s RAM Is Full 10 Awesome Improvements For Desktop Users in Windows 8

    Read the article

  • brackets in php templates

    - by Othman
    I have a script, and now it's the perfect time to have an option to change theme templates. I was looking forward to store these files in php files, or html files. with CSS file. I looked over some codes and I found that they use brackets to refer to the variable. Here's an example of a template block: <div class='block_div'> <center>{title}</center> {content} </div> I know that I can use PHP vars usering <?=$var;?>. However, I think the one above is better, and I looked over the web to find anything about it but I couldn't. My Question is how I can use these brackets in my php or html code. to let the user changing the template only not the code!

    Read the article

  • How to use rel=canonical with Sitecore aliases?

    - by Mike G
    I have inherited a Sitecore architecture that is a mess from an SEO duplicate content POV. There are multiple aliases that have been created (and indexed by the search engines) for many of the 2nd tier pages of the site. Due to server issues, I am not able to 301 redirect these duped pages, so I would like to use the rel=canonical tag in an attempt to try and get Google/Bing to recognize the correct pages I would like to appear in the index. I have blocked the most extraneous duped pages with a robots.txt file, however, since Google/Bing have already spidered many of the duped pages, I need to keep them accessible to the spiders, BUT removed from the index. The catch is, since the duped pages are aliases (and don't really physically exist in Sitecore that I can find), I am not sure how to go about using rel=canonical - or if I even can in this situation..?

    Read the article

  • How do I prevent a KActor from changing the orientation of its Z-Axis?

    - by Almo
    So I have an object that inherits from KActor that I would like to behave as a dynamic physics object, but I want its Z-Axis to remain upright, but very stiffly. I've tried the bStayUpright that triggers the "Stay Upright Spring". The problem is, it's a spring, and the object in question oscillates into position when I want it to remain oriented properly without wobbling. In the image above, the yellow block has fallen onto the gray box, and it is currently pivoting about the contact point as it tries to right itself. Should I be tweaking the StayUprightMaxTorque and StayUprightTorqueFactor parameters, or should I be using a Constraint of some sort?

    Read the article

  • Lenovo e530 no wireless Ubuntu 13.04

    - by Sam
    For some reason my wireless will not work on my Lenovo e530. I am dual booting ubuntu and windows 8 and my wireless works in windows. I saw online that I should run rfkill. I did that but only bluetooth shows up. There is no difference when I press the wireless fn key either, but it does block bluetooth (as it should). I'm really wanting to get into Ubuntu but this is holding me back. To clarify the wireless device does not show at all after running rfkill.

    Read the article

  • How to deal with transactions when creating a database connection for each query

    - by webnoob
    In line with this post here I am going to change my website to create a connection per query to take advantage of .NET's connection pooling. With this in mind, I don't know how I should deal with transactions. At the moment I do something like (psuedo code): GlobalTransaction = GlobalDBConnection.BeginTransaction(); try { ExecSQL("insert into table ..") ExecSQL("update some_table ..") .... GlobalTransaction.Commit(); }catch{ GlobalTransaction.Rollback(); throw; } ExecSQL would be like this: using (SqlCommand Command = GlobalDBConnection.CreateCommand()) { Command.Connection = GlobalDBConnection; Command.Transaction = GlobalTransaction; Command.CommandText = SQLStr; Command.ExecuteNonQuery(); } I'm not quite sure how to change this concept to deal with transactions if the connection is created within ExecSQL because I would want the transaction to be shared between both the insert and update routines.

    Read the article

  • How can I solve this SAT direct corner intersection edge case?

    - by ssb
    I have a working SAT implementation, but I am running into a problem where direct collisions at a corner do not work for tiled surfaces. That is, it clips on the surface when going in a certain direction because it gets hung up on one of the tiles, and so, for example, if I walk across a floor while holding both down and left, the player will stop when meeting the next shape because the player will be colliding with the right side rather than with the top of the floor tile. This illustration shows what I mean: The top block will translate right first and then up. I have checked here and here which are helpful, but this does not address what I should do in a situation where I don't have a tile-based world. My usage of the term "tile" before isn't really accurate since what I'm doing here is manually placing square obstacles next to each other, not assigning them spots on a grid. What can I do to fix this?

    Read the article

< Previous Page | 182 183 184 185 186 187 188 189 190 191 192 193  | Next Page >