Daily Archives

Articles indexed Saturday December 25 2010

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

  • Accessing to Request object will lead to ReadEntityBody to return 0 (in a HttpHandler class)

    - by EBAG
    I created a httpHandler that successfully implements IHttpHandler for handling file uploads. It works perfectly fine. You send the file with the form, the class receives it and will save it to hard disk. It reads chunks of file with ReadEntityBody function of HttpWorkerRequest class. Here is the situation i'm faced with.If at any stage before trying to read the file with ReadEntityBody, I try to access Request object (even Request.InputStream.Length!) ReadEntityBody would return 0 means it won't read from file stream. After further testing I found out the reason behind it. Accessing to Context.Current.Request object will trigger some sort of functionality that will cause asp.net to handle file uploads at that moment by it's own! I believe this is a bug. for example exactly after this line of code, asp.net will upload the file completely, and so there will be no stream for ReadEntityBody to read from later. int FileSize = context.Request.InputStream.Length; Can anybody tell how to stop this?

    Read the article

  • Confused with the Isolated Storage with Multiple Assemblies Access

    - by Peter Lee
    I googled and searched a lot, but I got no luck. I have a WindowsFormsApplication.exe and ConsoleApplication.exe. I want both of them to access to the same IsolatedStorage, is it possible? I tried using this in ConsoleApplication.exe: IsolatedStorageFile isoStore = IsolatedStorageFile.GetMachineStoreForApplication(); but I got: IsolatedStorageException: Unable to determine application identity of the caller. How can I fix this? Or can I use this way? P.S.: This is NOT a ClickOnce app.

    Read the article

  • MonoDevelop: Addin generation issues

    - by calmcajun
    I am having problems creating the root.mrep file for a updated MonoDevelop Addin. The Addin was originally built for MonoDevelop 2.2. I am able to build the updated project but when I use mdrun.exe setup rep-build to generate the .mrep files(main and root) it only generates the main.mrep file and not the root.mrep file. Is there a new way of building the addin that I am missing? I used both setup pack and then setup rep-build. I have listed a snippet of the addin.xml file below: <Addin id = "Addin" namespace = "MonoDevelop" name = "Monobjc development" author = "Rob L" copyright = "" description = "Addin" category = "Mac Development" version = "1.0"> <Runtime> <Import assembly="MonoDevelop.Sample.dll" /> <Import assembly="MonoDevelop.MacDev.dll" /> <Import assembly="Sample.Tools.dll" /> </Runtime> <Dependencies> <Addin id="Core" version="2.4" /> <Addin id="Core.Gui" version="2.4" /> <Addin id="Projects" version="2.4" /> <Addin id="Projects.Gui" version="2.4" /> <Addin id="Ide" version="2.4" /> </Dependencies> <MoreStuffHere /> </Addin>

    Read the article

  • Problems with overriding OnPaint and grabbing mouse events in C# UserControl containing other controls

    - by MoreThanChaos
    I've made a control which contains few other controls like PictureBox, Label and TextBox. But I'm having two problems: 1. I tried to paint some things on top of my control and when I'm overriding OnPaint, it results that things I try to draw are under controls that my control contains. Areas on which I would like to draw intersect with controls in ways that are not easy to predict. I mean that it includes something drawn on controls inside as well as on base of control. Is there a simple way to draw something on top of all contents of my control? Setting ForeColor to Transparent isn't a solution that would help me much. 2. I have a problem with grabbing mouse click events when I place my control on a form and add click event handling. It only works when I click on an area not occupied by controls inside. I would like the whole control to react to clicks and other actions like it was one consistent control. How can I redirect/handle these clicks to make them work the way I want? Thanks in advance for any tips

    Read the article

  • Looking to replace Ghost with FSArchiver or Clonezilla, few questions about capabilities

    - by Daniel Wright
    I work for a PC Repair company and we are looking into setting up a dedicated machine with externally accessible SATA bays to clone harddrives as a safety net incase something goes wrong during a repair. We currently use a SATA/PATA to USB bridge called MagicBridge and Norton Ghost on any workstation, but we're looking to move away from Ghost. We have a computer with a large RAID5 array with Windows Server 2008 Standard currently installed, but this can be replaced with a flavour of *nix. I have some experience with Clonezilla, but FSArchiver also seems like a suitable replacment too. My Head Technician wants to know if my chosen solution (probably Clonezilla or FSArchiver, but I'm open to free suggestions) is capable of: Cloning a degraded RAID, such as a single drive from a RAID1 mirror without complaining Producing images that are easily mountable (he'd prefer them to be mountable in Windows, but if there is no other easy way, *nix should be fine) akin to Ghost Explorer so individual files can be restored as well as being able to do bare metal restores. My apologies for wordiness but I wanted to be thorough in my explaination. Thanks for any suggestions or tips :) EDIT: I've just found out that Clonezilla has a workaround for cloning RADI1 drives EDIT2: Found the answer to both of my questions, aparently I wasn't phrasing my searches right, could this question be deleted please?

    Read the article

  • PostgreSQL 9: Does Vacuuming a table on the primary replicate on the mirror?

    - by Scott Herbert
    Running PostgreSQL 9.0.1, with streaming replication keeping one read-only mirror instance up to date. Auto-vaccuum is on on the primary, except for a few tables which are not vacuumed by the auto-vacuum daemon, in an effort to reduce business-hour IO. These tables are "materialised views". Each night at midnight, we run a vacuum across the database in order to clean up those tables that are excluded from the auto-vacuum. I'm wondering if that process replicates across to the mirror, or if I need to set up vacuum on the mirror as well?

    Read the article

  • Slow ASP.NET site using IIS6

    - by lars
    Hi, I have two servers, one virtual and one physical, running the exact same site on both machines. Both machines are running on ~ 2% CPU load and very much RAM available for usage. Somehow the site, with cache turned off ofcourse, loads in ~ 500ms on the virtual machine (which is a dev-server by the way) but almost 3 full seconds on the physical machine. They're both running Server 2003, IIS6 aswell as asp.net version 2.0 Any ideas where I can start troubleshoot this? Best Regards LP

    Read the article

  • Cannot login to OpenManage Server Administrator

    - by ejel
    After freshly installed OpenManage Server Administrator from the CD that comes with my new server, Dell PowerEdge T110, I still could not figure out how to login successfully to the application. The server is running Windows 2008 SR2 Foundation and serves as a domain controller. I access its web interface locally using Firefox 3.6. On the login page and choose local system login. OMSA user's guide seems to state that I should be able to login using an Active Directory user. I tried Administrator, my_domain\Administrator, a a few combinations with the correct password. But none of them can logged in. Does Server Administrator requires any additional treatment to the user accounts, or what are the steps I missed here?

    Read the article

  • Is it safe to remove sysvinit package in Debian sid?

    - by ???
    Currently, I have some packages my own using upstart, they are working with the stable branch of Debian. I'm going to switch to sid/unstable, and then the warning comes: WARNING: The following essential packages will be removed. This should NOT be done unless you know exactly what you are doing sysvinit Is it safe to remove sysvinit? P.S. It's a clean base system setup by # debootstrap --variant=buildd sid /sid-root

    Read the article

  • Can Vista Windows Explorer be repaired/fixed?

    - by gurun8
    I'm running Windows Vista Home Premium on a Sony Vaio laptop. I think somehow my Windows Explorer has become corrupted. I don't recall any certain inciting incident like installing an unreputable 3rd party app or hardware failure but just recently my system won't wake after it's been left idle longer that 20 minutes and goes to sleep. I've also had problems launch certain apps, like Adobe InDesign CS3, that just basically freeze the system but leave mouse movements functioning for a short time before freezing the entire system which requires a hard reboot to resolve the freeze. The system seems to run normally when used but I fear there's a looming possibility that this is a house of cards and will all come crashing down soon. My question is this, can Windows Explorer be repaired/fixed? Before reformatting the system and starting over, which is most likely what I'm going to be forced to do, I'd like explore (no pun intended) my options in fixing the problem with a patch or reinstall or something of that nature. Reformatting my system will eat up a day or two of my time and I just don't have the time to spare right now.

    Read the article

  • How does Google geo location service work?

    - by heaosax
    I dont use google maps much, but I was using it today and I clicked the "Show my location" button for the first time, then firefox asked for permission and I clicked "share my location", google maps showed my location pretty accurate. But, how does this system really works? I mean how can google know where I live? I am connecting to the internet with a VPN, so my "public IP" is not from my country, but from sweden, also I use linux and I change the mac of my wireless device, but google still show my location. I know I can disable this feature setting firefox about:config geo.enabled to false, but I am curious about how google can know where I live even when I dont have a real mac address and my IP is not from my real country. Basically I'd like to know if this feature works only because of code that exists in chrome and firefox (which spies my system)? I am worried about anyone knowing where I live, I mean... where is my privacy? Part of the fun about the internet is remaining anonymous.

    Read the article

  • Getting dwl-g122 to work on ubuntu

    - by User1
    I have a USB WiFi adapter, D-Link dwl-g122. I'm running Ubuntu 10.4. My laptop has a built-in wireless card that is connecting fine to the router. I plug in the usb and it never really connects. Here are some details: iwconfig wlan1 IEEE 802.11bg ESSID:"\x0B\xE1..." Mode:Managed Frequency:2.457 GHz Access Point: Not-Associated Tx-Power=19 dBm Retry long limit:7 RTS thr:off Fragment thr:off Power Management:on lshw -c network: *-network:1 description: Wireless interface physical id: 3 logical name: wlan1 serial: 00:13:46:8b:xx:xx capabilities: ethernet physical wireless configuration: broadcast=yes multicast=yes wireless=IEEE 802.11bg dmesg [ 1096.814176] wlan1: direct probe to AP xxx (try 1) [ 1096.820960] wlan1: direct probe responded [ 1096.820969] wlan1: authenticate with AP xxx (try 1) [ 1096.823790] wlan1: authenticated [ 1096.823869] wlan1: associate with AP xxx (try 1) [ 1096.827667] wlan1: RX AssocResp from xxx (capab=0x411 status=0 aid=1) [ 1096.827674] wlan1: associated [ 1142.590912] wlan1: deauthenticating from xxx by local choice (reason=3) lsmod|rt2 rt2500usb 19643 0 rt2x00usb 11260 1 rt2500usb rt2x00lib 32133 2 rt2500usb,rt2x00usb mac80211 238896 3 ath5k,rt2x00usb,rt2x00lib cfg80211 148725 4 ath5k,ath,rt2x00lib,mac80211 led_class 3764 3 ath5k,rt2x00lib,sdhci It looks like the driver loads but it doesn't feel like connecting. The behavior is identical even if I blacklist the other wifi card (using an ath5k driver). It's almost like it is using the wrong password or something. Does anyone know what is happening? Is anyone using Ubuntu successful?

    Read the article

  • Joyeux Noël à tous de la part de Developpez.com ! Quels cadeaux Papa Noël vous a-t-il apporté cette année ?

    Joyeux Noël à tous de la part de Developpez.com ! Quels cadeaux Papa Noël vous a-t-il apporté cette année ? Chers lecteurs, au nom de toute l'équipe de Developpez.com, j'aimerais vous souhaiter un Joyeux Noël. Nous espérons sincèrement que cette journée aura été un régal pour vous, et que, entourés de vos proches, vous profitez pleinement de cette période de fêtes pour être heureux et recharger vos batteries. Mais, si vous venez traîner vos guêtres ici, vous êtes très probablement férus d'informatique. Et cela doit se ressentir, même dans votre façon de célébrer la nativité. Peut-être avez-vous craqué pour une boule de Noël high-tech à écran LCD ? [IMG]http://www.journaldugeek.com/images/2007_11...

    Read the article

  • Do ruby on rails programmers refactor?

    - by JoaoHornburg
    I'm a Java programmer who started programming Ruby on Rails one year ago. I like the language, rails itself and the principles behind them. But something that bothers me is that Ruby programmers don't seem to refactor. I noticed that there is a big lack of tools for refactoring in Ruby / Rails. Some IDE's, like Aptana and RubyMine seem to offer some very basic refactoring, but nothing really big compared to Eclipse's Java refactorings. Then there is another fact: most railers (even the pros) prefer some lightweight editors, like VIM or TextMate, instead of IDEs. Well, with these tools you just get zero refactoring (only regex with find/replace). This leaves me this impression that rails programmers don't refactor. It might be just a false impression, of course, but I would like to hear the opinion of people who work professionally with ruby on rails. Do you refactor? If you do, how do you do it,with which tools? If not, why not?

    Read the article

  • [Ext.tree.TreePanel] getNodeById does not work

    - by Moon
    Hi, I have a ext treepanel with json. var tree = new Ext.tree.TreePanel({ renderTo:'tree-container', title: 'Category', height: 300, width: 400, useArrows:true, autoScroll:true, animate:true, enableDD:true, containerScroll: true, rootVisible: false, frame: true, root: { text: 'Category', draggable: false, id: '0' }, // auto create TreeLoader dataUrl: $("#web").val() + "/category/index/get-nodes", listeners: { 'checkchange': function(node, checked){ if(checked){ categoryManager.add(node.id); //node.getUI().addClass('complete'); }else{ categoryManager.remove(node.id); // node.getUI().removeClass('complete'); } } } }); dataUrl loads the following json code [{"text":"Code Snippet","id":"1","cls":"folder","checked":false,"children":[{"text":"PHP","id":"3","cls":"file","checked":false,"children":[]},{"text":"Javascript","id":"4","cls":"file","checked":false,"children":[]}]}] when I try to find a node by console.log( tree.getNodeByid(3) ), it shows that it is undefined. Do I have a problem with my code?

    Read the article

  • Is man-in-the-middle attack a security threat during SSH authentication using keys?

    - by JP19
    Hi, I am no expert in network security, so pardon if this question is not very smart :). I am automating logins to some machines using ssh. I am currently avoiding host-key warnings using StrictHostKeyChecking no. I naively understand that someone can impersonate as the server and I risk losing my password to him if that were the case. However, if I am using only public/private Key based authentication ( using PasswordAuthentication no ), can the intruder still cause harm? So basically, with ssh -o "StrictHostKeyChecking no" -o "PasswordAuthentication no" : 1) Can the intruder decipher my private key? 2) Are there any other security threats? regards, JP

    Read the article

  • CSS, fill all div width with text

    - by lolalola
    Hi, How to automatically change the space between the letters.I want the text to take up the entire width of the div. Text is not static. (Always changing text, can be 123" or "text text"...) <style type="text/css"> #menu{ width: 200px; background-color: #000; color: #336699; font-size: 16px; letter-spacing: 100%; } </style> <body> <div id="menu"> tekstas </div>

    Read the article

  • PHP OOP singleton doesn't return object

    - by Misiur
    Weird trouble. I've used singleton multiple times but this particular case just doesn't want to work. Dump says that instance is null. define('ROOT', "/"); define('INC', 'includes/'); define('CLS', 'classes/'); require_once(CLS.'Core/Core.class.php'); $core = Core::getInstance(); var_dump($core->instance); $core->settings(INC.'config.php'); $core->go(); Core class class Core { static $instance; public $db; public $created = false; private function __construct() { $this->created = true; } static function getInstance() { if(!self::$instance) { self::$instance = new Core(); } else { return self::$instance; } } public function settings($path = null) { ... } public function go() { ... } } Error code Fatal error: Call to a member function settings() on a non-object in path It's possibly some stupid typo, but I don't have any errors in my editor. Thanks for the fast responses as always.

    Read the article

  • error: no matching function for call to ‘BSTreeNode<int, int>::BSTreeNode(int, int, NULL, NULL)’ - what's wrong?

    - by Alexander Suraphel
    error: no matching function for call to ‘BSTreeNode::BSTreeNode(int, int, NULL, NULL)’ candidates are: BSTreeNode::BSTreeNode(KF, DT&, BSTreeNode*, BSTreeNode*) [with KF = int, DT = int] here is how I used it: BSTreeNode<int, int> newNode(5,9, NULL, NULL) ; I defined it as follows: BSTreeNode(KF sKey, DT &data, BSTreeNode *lt, BSTreeNode *rt):key(sKey),dataItem(data), left(lt), right(rt){} what's wrong with using my constructor this way? i've been pulling out my hair all night please help me ASAP!!

    Read the article

  • Javascript inherance and use of super: is this possible?

    - by Totty
    var Parent = function(value){ this.value = value; this.value1 = 3; this.hello = function(text){ alert(this.value1 + text); } } var Child = extends(Parent, function(value){ this.value1 = 1; this.hello = function(text){ this.super.hello(text); alert('Child' + this.value1 + this.value); } }) var child = new Child(2); child.hello('ola'); // this must output 2 alerts: // 1: "1ola" // 2: "Child1ola"

    Read the article

  • Problem setting row backgrounds in Android Listview

    - by zchtodd
    I have an application in which I'd like one row at a time to have a certain color. This seems to work about 95% of the time, but sometimes instead of having just one row with this color, it will allow multiple rows to have the color. Specifically, a row is set to have the "special" color when it is tapped. In rare instances, the last row tapped will retain the color despite a call to setBackgroundColor attempting to make it otherwise. private OnItemClickListener mDirectoryListener = new OnItemClickListener(){ public void onItemClick(AdapterView parent, View view, int pos, long id){ if (stdir.getStationCount() == pos) { stdir.moreStations(); return; } if (playingView != null) playingView.setBackgroundColor(Color.DKGRAY); view.setBackgroundColor(Color.MAGENTA); playingView = view; playStation(pos); } }; I have confirmed with print statements that the code setting the row to gray is always called. Can anyone imagine a reason why this code might intermittently fail? If there is a pattern or condition that causes it, I can't tell. I thought it might have something to do with the activity lifecycle setting the "playingView" variable back to null, but I can't reliably reproduce the problem by switching activities or locking the phone. private class DirectoryAdapter extends ArrayAdapter { private ArrayList<Station> items; public DirectoryAdapter(Context c, int resLayoutId, ArrayList<Station> stations){ super(c, resLayoutId, stations); this.items = stations; } public int getCount(){ return items.size() + 1; } public View getView(int position, View convertView, ViewGroup parent){ View v = convertView; LayoutInflater vi = (LayoutInflater)getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE); if (position == this.items.size()) { v = vi.inflate(R.layout.morerow, null); return v; } Station station = this.items.get(position); v = vi.inflate(R.layout.songrow, null); if (station.playing) v.setBackgroundColor(Color.MAGENTA); else if (station.visited) v.setBackgroundColor(Color.DKGRAY); else v.setBackgroundColor(Color.BLACK); TextView title = (TextView)v.findViewById(R.id.title); title.setText(station.name); return v; } };

    Read the article

  • Symfony: Routing 'secure' and 'login' actions to another application

    - by Darmen
    Hello, Suppose we have 3 apps - appMain, app1 and app2. Applications 1 and 2 are protected, they have is_secure: true and everything works fine with sfDoctrineGuard plugin. A behavior I want to achieve is when a user is not authenticated, current application to forward him to another one, say appMain with defined module and action. Is that possible? Or can someone tell me where to dig about security mechanisms in symfony?

    Read the article

  • How to call another class's method from my app delegate

    - by Jared
    I have an application that utilizes UILocalNotifications to pop-up UIAlertViews. When the notification fires, the user chooses to go into the app, and this method is called from my app delegate: - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {...} Where I can handle it and where I also prompt another alertview for more information. So when the app launches, it is displaying view A, and then the alertview pops up and prompts for input. This alertview, however, is originating from my app delegate. I need to be able to reload view A when the user hits Yes/No on the alertview. How can I do that from within my app delegate? Any help is appreciated!!

    Read the article

  • Blit Queue Optimization Algorithm

    - by martona
    I'm looking to implement a module that manages a blit queue. There's a single surface, and portions of this surface (bounded by rectangles) are copied to elsewhere within the surface: add_blt(rect src, point dst); There can be any number of operations posted, in order, to the queue. Eventually the user of the queue will stop posting blits, and ask for an optimal set of operations to actually perform on the surface. The task of the module is to ensure that no pixel is copied unnecessarily. This gets tricky because of overlaps of course. A blit could re-blit a previously copied pixel. Ideally blit operations would be subdivided in the optimization phase in such a way that every block goes to its final place with a single operation. It's tricky but not impossible to put this together. I'm just trying to not reinvent the wheel. I looked around on the 'net, and the only thing I found was the SDL_BlitPool Library which assumes that the source surface differs from the destination. It also does a lot of grunt work, seemingly unnecessarily: regions and similar building blocks are a given. I'm looking for something higher-level. Of course, I'm not going to look a gift horse in the mouth, and I also don't mind doing actual work... If someone can come forward with a basic idea that makes this problem seem less complex than it does right now, that'd be awesome too. EDIT: Thinking about aaronasterling's answer... could this work? Implement customized region handler code that can maintain metadata for every rectangle it contains. When the region handler splits up a rectangle, it will automatically associate the metadata of this rectangle with the resulting sub-rectangles. When the optimization run starts, create an empty region handled by the above customized code, call this the master region Iterate through the blt queue, and for every entry: Let srcrect be the source rectangle for the blt beng examined Get the intersection of srcrect and master region into temp region Remove temp region from master region, so master region no longer covers temp region Promote srcrect to a region (srcrgn) and subtract temp region from it Offset temp region and srcrgn with the vector of the current blt: their union will cover the destination area of the current blt Add to master region all rects in temp region, retaining the original source metadata (step one of adding the current blt to the master region) Add to master region all rects in srcrgn, adding the source information for the current blt (step two of adding the current blt to the master region) Optimize master region by checking if adjacent sub-rectangles that are merge candidates have the same metadata. Two sub-rectangles are merge candidates if (r1.x1 == r2.x1 && r1.x2 == r2.x2) | (r1.y1 == r2.y1 && r1.y2 == r2.y2). If yes, combine them. Enumerate master region's sub-rectangles. Every rectangle returned is an optimized blt operation destination. The associated metadata is the blt operation`s source.

    Read the article

  • What is the smallest amount of bits you can write twin-prime calculation?

    - by HH
    A succinct example in Python, its source. Explanation about the syntactic sugar here. s=p=1;exec"if s%p*s%~-~p:print`p`+','+`p+2`\ns*=p*p;p+=2\n"*999 The smallest amount of bits is defined by the smallest amount of 4pcs of things you can see with hexdump, it is not that precise measure but well-enough until an ambiguity. $ echo 's=p=1;exec"if s%p*s%~-~p:print`p`+','+`p+2`\ns*=p*p;p+=2\n"*999' > .test $ hexdump .test | wc 5 36 200 $ hexdump .test 0000000 3d73 3d70 3b31 7865 6365 6922 2066 2573 0000010 2a70 2573 2d7e 707e 703a 6972 746e 7060 0000020 2b60 2b2c 7060 322b 5c60 736e 3d2a 2a70 0000030 3b70 2b70 323d 6e5c 2a22 3939 0a39 000003e so in this case it is 31 because the initial parts are removed.

    Read the article

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