Search Results

Search found 1103 results on 45 pages for 'morgan arr allen'.

Page 14/45 | < Previous Page | 10 11 12 13 14 15 16 17 18 19 20 21  | Next Page >

  • Read an object from compressed file generated from ActionScript 3

    - by Last Chance
    I have made a simple game Map Editor and I want to save a array that contain map tile info to a file, as below: var arr:Array = [.....2d tile info in it...]; var ba:ByteArray = new ByteArray(); ba.writeObject(arr); ba.compress(); var file:File = new File(); file.save(ba); I had successfully saved a compressed object to a file. Now the problem is my server side need to read this file and decompress the array out from the file, then convert it to a Python list. Is that possible?

    Read the article

  • Android app, No error message but has stopped unexpectedly [migrated]

    - by user74722
    Does anyone know what is my problem. I do not have any compile error messages however when i run the app it crashes and stops unexpectedly. Here is my codes. Thank you in advance. ListView l ; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_final_project); String arr[]={"Red","Green","Blue","Yellow","Cyan"}; l=(ListView) findViewById(R.id.listView1); ArrayAdapter<String> adapter=new ArrayAdapter<String>(getApplicationContext(), android.R.layout.simple_list_item_1, arr); l.setAdapter(adapter); Button buttonOne = (Button) findViewById(R.id.button1); buttonOne.setOnClickListener(new OnClickListener(){ @Override public void onClick(View v){ setContentView(R.layout.layout_save); // setContentView(R.layout.activity_final_project); //startActivity(new Intent("com.example.finalproject.layout_save")); } }); }

    Read the article

  • Should I be using the command pattern? Seems like a lot of work...

    - by Fedor
    My Room class has a lot of methods I used before I decided to use the command pattern. Previously, I was invoking a lot of commands and now it seems I have to make a method in my roomParser class for every method. If I wanted to invoke say, setHotelCode I would have to create a method in roomParser that iterates through and invokes the method. Is this the way I should be using the command pattern? <?php interface Parseable { public function parse( $arr, $dept ); } class Room implements Parseable { protected $_adults; protected $_kids; protected $_startDate; protected $_endDate; protected $_hotelCode; protected $_sessionNs; protected $_minRate; protected $_maxRate; protected $_groupCode; protected $_rateCode; protected $_promoCode; protected $_confCode; protected $_currency = 'USD'; protected $_soapAction; protected $_soapHeaders; protected $_soapServer; protected $_responseXml; protected $_requestXml; public function __construct( $startdate,$enddate,$rooms=1,$adults=2,$kids=0 ) { $this->setNamespace(SESSION_NAME); $this->verifyDates( $startdate, $enddate ); $this->_rooms= $rooms; $this->_adults= $adults; $this->_kids= $kids; $this->setSoapAction(); $this->setRates(); } public function parse( $arr, $dept ) { $this->_price = $arr * $dept * rand(); return $this; } public function setNamespace( $namespace ) { $this->_sessionNs = $namespace; } private function verifyDates( $startdate, $enddate ) {} public function setSoapAction( $str= 'CheckAvailability' ) { $this->_soapAction = $str; } public function setRates( $rates='' ) { } public function setHotelCode($code ) { $this->_hotelCode = $code; } private function getSoapHeader() { return '<?xml version="1.0" encoding="utf-8"?> <soap:Header> </soap:Header>'; } private function getSoapFooter() { return '</soap:Envelope>'; } private function getSource() { return '<POS> <Source><RequestorId ID="" ID_Context="" /></Source> </POS>'; } function requestXml() { $this->_requestXml = $this->getSoapHeader(); $this->_requestXml .='<soap:Body></soap:Body>'; return $this->_requestXml; } private function setSoapHeaders ($contentLength) { $this->_soapHeaders = array('POST /url HTTP/1.1', 'Host: '.SOAP_HOST, 'Content-Type: text/xml; charset=utf-8', 'Content-Length: '.$contentLength); } } class RoomParser extends SplObjectStorage { public function attach( Parseable $obj ) { parent::attach( $obj ); } public function parseRooms( $arr, $dept ) { for ( $this->rewind(); $this->valid(); $this->next() ) { $ret = $this->current()->parse( $arr, $dept ); echo $ret->getPrice(), PHP_EOL; } } } $arrive = '12/28/2010'; $depart = '01/02/2011'; $rooms = new RoomParser( $arrive, $depart); $rooms->attach( new Room( '12/28/2010', '01/02/2011') ); $rooms->attach( new Room( '12/29/2010', '01/04/2011') ); echo $rooms->count(), ' Rooms', PHP_EOL; Edit: I'm thinking it may be easier if I made the RoomParser less generic by storing properties that all the objects will share. Though I'll probably have to make methods if I want to override for a certain object.

    Read the article

  • How can I create a custom OpenOffice / LibreOffice Writer table AutoFormat scheme?

    - by Merlyn Morgan-Graham
    None of the basic table AutoFormat schemes in LibreOffice Writer have both an alternation style defined and no sum column/row style defined. If they have alternation, they always seem to have sums. Because of this I'd like to define my own table scheme. What is the easiest way to accomplish this? A WYSIWYG isn't totally necessary. I am not scared of editing simple XML files as long as I have examples to work from, and if I don't have to edit base install files. If I can place them in a custom area or my user profile directory then that would be best. If there is a way to get the GUI Add functionality to properly recognize an alternation then that would also be helpful.

    Read the article

  • Nginx traffic is going to wrong upsteam when mixing named servers and default servers

    - by Morgan
    I have the below config file for nginx. The problem is all traffic is going to upstream clustera. How do I configure nginx to only send traffic for example.com to clustera and all the rest to clusterb? user www-data; worker_processes 1; error_log /var/log/nginx/error.log; pid /var/run/nginx.pid; events { worker_connections 1024; } http { include /etc/nginx/mime.types; log_format cache '\n*** $remote_addr [$time_local] ' '[$upstream_cache_status] $upstream_response_time ' '$host "$request" ($status) $body_bytes_sent ' '"$http_referer" "$http_user_agent" ' 'Cache-Control: $upstream_http_cache_control ' 'Expires: $upstream_http_expires ' ; access_log /var/log/nginx/access.log cache; sendfile on; keepalive_timeout 65; gzip on; gzip_vary on; gzip_comp_level 6; gzip_proxied any; gzip_disable "MSIE [1-6]\.(?!.*SV1)"; gzip_buffers 16 8k; include /etc/nginx/conf.d/*.conf; proxy_cache_key "$scheme$host$request_uri"; proxy_cache_path /var/cache/nginx levels=1:2 keys_zone=main:10m max_size=1g inactive=30m; upstream clustera { ip_hash; server a.example.com:80; } upstream clusterb { ip_hash; server b.example.com:80; } client_max_body_size 20m; client_body_buffer_size 128k; proxy_connect_timeout 300; proxy_send_timeout 300; proxy_read_timeout 300; # host for example.com should send traffic to clustera server { listen 80; server_name example.com; location ~*(png|jpeg|jpg|gif|ico|css|js)$ { proxy_pass http://clustera; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_cache main; proxy_cache_valid 200 5m; proxy_cache_valid 302 1m; } location / { proxy_pass http://clustera; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; } } # host for everyone else. traffic goes to clusterb server { listen 80; server_name _; if ( $http_user_agent ~* (spider|crawler|slurp) ) { return 503; } set $slow 0; if ( $http_user_agent ~* (bot) ) { set $slow 1; } if ( $slow ) { set $limit_rate 1k; } location ~*(png|jpeg|jpg|gif|ico|css|js)$ { proxy_pass http://clusterb; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_cache main; proxy_cache_valid 200 5m; proxy_cache_valid 302 1m; } location /images { proxy_pass http://clisterb; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_cache main; proxy_cache_valid 200 5m; proxy_cache_valid 302 1m; } location / { proxy_pass http://clusterb; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; } } }

    Read the article

  • 403.4 won't redirect in IE7

    - by Jeremy Morgan
    I have a secured folder that requires SSL. I have set it up in IIS(6) to require SSL. We don't want the visitors to be greeted with the "must be secure connection" error, so I have modified the 403.4 error page to contain the following: function redirectToHttps() { var httpURL = window.location.hostname+window.location.pathname; var httpsURL = "https://" + httpURL ; window.location = httpsURL ; } redirectToHttps(); And this solution works great for every browser, but IE7. On any other browser, if you type in http://www.mysite.com/securedfolder it will automatically redirect you to https://www.mysite.com/securedfolder with no message or anything (the intended action). But in Internet Explorer 7 ONLY it will bring up a page that says The website declined to show this webpage Most Likely Causes: This website requires you to log in This is something we don't want of course. I have verified that javascript is enabled, and the security settings have no effect, even when I set them to the lowest level I get the same error. I'm wondering, has anyone else seen this before?

    Read the article

  • Different file locations for http v https on IIS?

    - by Jeremy Morgan
    We have a server running IIS and have some folders running under https, but most are open. The problem I'm having is when someone is directed from a page in the secure section of the site, the relative link brings up https. For example: link to /pictures goes to http://www.mysite.com/pictures But if someone is on a secured part of the site https://www.mysite.com/shoppingcart And then clicks back to /pictures, they get https://www.mysite.com/pictures so the pictures directory is shown under https. My problem is, they get a 404 not found message when this happens. I could not find anything in the settings that would indicate that secured connections are pulling files from anywhere different than non-secured. If I type http or https on the main page of the site both come up fine. But if I try to add the https:// in a folder level, I get a 404. Any ideas why this might be happening?

    Read the article

  • How to implement Comet in database side?

    - by Morgan Cheng
    I have been searched for this question for a long time. How to implement Comet in database side? To support Comet, we'd better have a web server stack that supports asynchronous operation. So, Apache is not a option. There are some open source web server such as tornado can do asynchronous http handling. This is in web server level. In database level, how to make web server know that some event happens in database? There should be a asynchronous way to let web server know that something updated in database. Polling is not a option. Is there any example available?

    Read the article

  • Recovering files that do not appear in the Recycle Bin, but are in the $Recycle.bin folder on external drive

    - by Zach Morgan
    Problem: I have an NTFS external drive with a $Recycle.bin folder on the root (E:/$Recycle.bin/) that has about 70gb worth of data. For whatever reason, the folder is no longer a hidden system file and no Windows machine I have used the drive on will show the files in the actual Recycle Bin. What I Want To Do: I want to atleast view the recycle bin files from this external, and all of the help articles I have read just talk about deleting the folder all together. I plan on reformating the drive, but first I need to see if there are any important deleted files. What Didn't Work: Recuva - didn't see any of my files Resetting the external's Recycle Bin via command prompt and moving the old $Recycle.bin files into the new external $Recycle.bin folder (I didn't read this anywhere, just made it up on my own)

    Read the article

  • Where to find a list of bad passwords?

    - by Steve Morgan
    I need to implement a 'stop list' to prevent users selecting common passwords in a new online service. Can anyone point me to such a list online anywhere? Edited: Note that I'm only trying to eliminate the most common passwords, not an exhaustive dictionary. And, of course, this complements a reasonably strong password policy (length, use of non-alpha characters, etc.) Thanks.

    Read the article

  • Tunneling over HTTP

    - by Morgan
    Hello, I have a network at work that is locked behind a firewall and Internet connection is available only by using a proxy server. At work, I can connect to databases that are distributed across the network. However, at home, I cannot connect to the proxy server or the databases. How can this be done? I can access my workstation via LogMeIn, so I can install anything on it. I thought of installing some kind of tunneling mechanism in my workstation. Then, at home, I could connect to this mechanism, which would in turn do the required connections. So essentially, what I'd like to do can be represented by the following diagram: Home = Workstation = Database. For example, whenever I connect to, say, 10.140.0.1:1234 at home, this would be redirected to 10.140.0.1:1234 of my Workstation, because 10.140.0.1:1234 is only available through the corporate network. NOTE: I'm using Windows XP.

    Read the article

  • Newly added virtualhost not working, domain points to /var/www/

    - by Morgan
    I've had no problem with vhosts before, but for some reason this one isn't pointing to the right document root. The domain is pointing to the correct IP, apache sees no errors with the config file in sites-available, yet it just isn't pointing correctly. Here is the vhost config for the domain: <VirtualHost *80> ServerAdmin [email protected] ServerName mydomain.info ServerAlias www.mydomain.info DirectoryIndex index.html DocumentRoot /var/www/vhosts/mydomain.info/htdocs LogLevel warn ErrorLog /var/www/vhosts/mydomain.info/log/error.log CustomLog /var/www/vhosts/mydomain.info/log/access.log combined </VirtualHost> For the record, I am running Apache2 on Ubuntu 12.10

    Read the article

  • Setting up virtualbox for outside access

    - by Morgan Green
    I have a computer running a server that my subdomain on my shared hosting account points to. IE subdomain.mydomain.org goes to my home server. Now then; what I'm wanting to do is be able to access my VirtualBox servers through that subdomain and a different port. E.G Ubuntu Virtual Box Server 1 Username:Ubuntuhost1 Password:MyUbuntuHost1 Port:4000 Internal IP: 192.168.1.60 External IP: 24.29.138.45 Ubuntu Virtual Box Server 2 Username:UbuntuHost2 Password:MyUbuntuHost2 Port:4001 Internal IP: 192.168.1.61 External IP: 24.29.138.45 Now I want to be able to access RDP number 1 through Port 4000, but if I access Port 4001 it will connect to the server on port 4001; both using the same subdomain. The next issue is the fact that even though I know what the IP addresses are on the router for the virtualbox hosts through ifconfig it doesn't change the fact that they don't show up on the router. If anyone knows how to configure this to work please help me out because I've been racking my brain to the highest extent I can. Alright; here's an edit to clarify more; Sorry. My ports on the router are edited to forward Port 4000 on Internal IP 192.168.1.63 (My Ubuntu Internal IP address) Now when I go to my Router Home Page my VirtualBox Internal IP Address doesn't show on the attached device listings, so I set up port forwarding anyways to the VirtualBox Internal IP. My end goal is when I connect to mydomain.org and I connect through port 3389 it takes me to my host computers server, but if I put in mydomain.org and go through port 4000 it's going to redirect to my VirtualBox server; Is this even possible? Sorry; I'm trying to clarify the most I think I can I just don't know how else to explain my issue.

    Read the article

  • How do I easily elevate when running a .jar file?

    - by Merlyn Morgan-Graham
    When trying to run an installer Jar file, I am getting an error saying that write access is denied to create a directory under the Program Files folder. Right click - Run as Administrator is not available on Jar files (I assume because it is Java.exe that consumes them - they are not themselves treated as directly executable by the shell). What is the quickest and simplest way to run a .Jar file with elevation? I am evaluating this tool to recommend for our dev team, and they will manually install it on their boxes. I'd prefer an option that doesn't require them to type anything.

    Read the article

  • Unexpected media key behavior on new Acer Aspire

    - by Morgan May
    I'm having weird issues with the media keys (play/pause, previous, next, etc.) on a new Acer Aspire laptop. This is the first Acer I've owned and also my first Windows 7 computer, so I'm not sure whether the behavior is a result of some hidden Acer process that I haven't rooted out yet, or some Windows 7 option that I'm not aware of, or something else. I'm experiencing two issues that I suspect are related. Both problems are intermittent but happen more often than not. The media player I'm using is Winamp. I'm pretty sure I've had the same problem when using other media players, but when I tried to verify that before posting this, I only had the problems with Winamp. Because the problems are intermittent, I'm not sure if that's significant. 1) When I press the Play/Pause media key, in addition to playing or pausing the media player, it brings up a little menu in the center of the screen that lists my removable drives (CD/DVD, USB drives, etc.). To make the menu go away I have to either click away from it or hit Escape. Selecting a drive on the menu doesn't seem to do anything. 2) When I press the Previous or Next media keys, it skips 2+ tracks instead of just one (the exact number seems to vary). I've poked around all the control panel options that I can find, and looked through all the utilities that came with the computer with no luck. There's nothing that I can find in the (very slim) documentation, either. I have a hunch that the problem is caused by whatever utility manages global hotkeys, but I haven't found any way to configure that. Any guidance would be greatly appreciated. UPDATE: It looks like Winamp was the culprit. I did have the problem when using other media players, but when I uninstalled Winamp, the problem went away. I'd like to use Winamp, but I can survive with other players.

    Read the article

  • Getting console2 to work nicely with UAC

    - by Merlyn Morgan-Graham
    I would like to get console2 to work nicely with UAC Particular problems I would like to tackle: If I start non-elevated, have a way to elevate while running. It'd be especially nice if I could elevate individual tabs I would like to get different coloring for admin/non-admin, similar to: this link. Basically, if I can get the console to execute a command on startup (similar to the HKLM\Software\Microsoft\Command Processor\AutoRun registry value), that's all I need How do I get this working? Would I have to modify source code to get this to work, or can I use different tab settings/do hacks w/ shell executables? I am using Windows 7, although I would imagine any working solution would also work on Vista.

    Read the article

  • Why can't email clients create rules for moving dates like "yesterday"?

    - by Morgan
    I've never seen an email client that I could easily create a rule to do something like "Move messages from yesterday to a folder?" Is there some esoteric reason why this would be difficult? I know I can easily create rules around specific dates, but that isn't the same thing by a long shot; am I missing something? In Outlook 2010 I can create search folders that do sort of this type of thing, but you can't create rules around a search folder... seems like either I am missing something major, or this is terribly short-sided.

    Read the article

  • How do I correctly set up Application Request Routing in IIS7 to route SSL requests?

    - by Matthew Belk
    I have a 3-node web farm being managed by IIS7 and Application Request Routing. I have a folder hierarchy in my web app that needs to be secured via SSL. What is the best practice for getting ARR to correctly route these SSL requests? I have installed the same certificate on all web farm servers and the server running ARR. I have tried enabling and disabling the SSL Off-loading feature Thanks, Matthew

    Read the article

  • Which PHP version is required for str_split?

    - by SpawnCxy
    I relogin to my server in dreamhost and test some scripts.And I found I couldn't use str_split. Message of Undefined function was given.I checked the version in the server and its PHP Version is 5.2.12.And I just wonder which version is required?Thanks. Testcode: <?php $arr = str_split("lsdjflsdjflsdjflsdjfl"); print_r($arr); ?> Message: Fatal error: Call to undefined function: str_split() in /test.php on line 3

    Read the article

  • List<element> initialization fires "Process is terminated due to StackOverflowException"

    - by netmajor
    I have structs like below and when I do that initialization: ArrayList nodesMatrix = null; List<vertex> vertexMatrix = null; List<bool> odwiedzone = null; List<element> priorityQueue = null; vertexMatrix = new List<vertex>(nodesNr + 1); nodesMatrix = new ArrayList(nodesNr + 1); odwiedzone = new List<bool>(nodesNr + 1); priorityQueue = new List<element>(); arr.NodesMatrix = nodesMatrix; arr.VertexMatrix = vertexMatrix; arr.Odwiedzone = odwiedzone; arr.PriorityQueue = priorityQueue; //only here i have exception debuger fires Process is terminated due to StackOverflowException :/ Some idea why this collection fires this exception ? private struct arrays { ArrayList nodesMatrix; public ArrayList NodesMatrix { get { return nodesMatrix; } set { nodesMatrix = value; } } List<vertex> vertexMatrix; public List<vertex> VertexMatrix { get { return vertexMatrix; } set { vertexMatrix = value; } } List<bool> odwiedzone; public List<bool> Odwiedzone { get { return odwiedzone; } set { odwiedzone = value; } } public List<element> PriorityQueue { get { return PriorityQueue; } set { PriorityQueue = value; } } } public struct element : IComparable { public double priority { get { return priority; } set { priority = value; } } public int node { get { return node; } set { node = value; } } public element(double _prio, int _node) { priority = _prio; node = _node; } #region IComparable Members public int CompareTo(object obj) { element elem = (element)obj; return priority.CompareTo(elem.priority); } #endregion

    Read the article

  • Mix of two bit sequences

    - by Tomek Tarczynski
    Is there any clever way to mix two bit sequences in such way that bits from first sequence will be on odd places, and bits from second sequence will be on even places. Both sequences are no longer than 16b so output will fit into 32bit integer. Example: First sequence : 1 0 0 1 0 0 Second sequence : 1 1 1 0 1 1 Output : 1 1 0 1 0 1 1 0 0 1 0 1 I thought about making integer array of size 2^16 and then the output would be: arr[first] << 1 | arr[second]

    Read the article

  • UIIMageView, warning: check_safe_call: could not restore current frame

    - by lukya
    Hi, I am changing the image in UIImageView based on accelerometer input. The images are stored in an array. The application runs fine for a while and then crashes. warning: check_safe_call: could not restore current frame I am not using "UIImage ImageNamed" method when populating the array. The total size of all images is around 12 Mb. But individual images are very light (<100 kb) and i am using only one image at a time from the array. Just in case there are any autoreleases, I have allocated a NSAutoreleasePool in view did load and am draining it in the didReceiveMemoryWarning method (which does get called 2, 3 times before the app crashes?). Following is the code that creates images array: //create autorelease pool as we are creating many autoreleased objects NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; NSMutableArray *finalarr = [[NSMutableArray alloc] initWithCapacity:9]; NSLog(@"start loading"); for(int y = 0; y < 100; y+=10) { NSMutableArray *arr = [[NSMutableArray alloc] initWithCapacity:10]; for(int x = 0; x < 10; x++) { NSString *imageName = [[NSString alloc] initWithFormat:@"0%d",y + x]; UIImage *img = [[UIImage alloc] initWithContentsOfFile:[[NSBundle mainBundle] pathForResource:imageName ofType:@"png"]]; [arr addObject:img]; [imageName release]; [img release]; } [finalarr addObject:arr]; [arr release]; } NSLog(@"done loading"); // Override point for customization after app launch viewController.imagesArray = finalarr; [finalarr release]; //retain the array of images [viewController.imagesArray retain]; //release the aurtorelease pool to free memory taken up by objects enqued for release [pool release]; As the app runs smoothly for a while, which means array creation is definitely not the problem. After this the following method is called from [accelerometer didAccelerate] -(BOOL)setImageForX:(int)x andY:(int)y { [self.imageView setImage:(UIImage*)[(NSArray*)[self.imagesArray objectAtIndex:y] objectAtIndex:x]]; return TRUE; } So the only code being executed is the "UIImageView setImage". But no objects are being created here. Please let me know if the code seems to have any leaks or i am doing something wrong. Thanks, Swapnil

    Read the article

  • other way to add item do List<>

    - by netmajor
    In my other ask You can see code of my arr structure and PriorityQueue collection. I normally add items to this collection like that: arr.PriorityQueue.Add(new element((value(item, endPoint) + value(startPoint, item)),item)); I am curious that is other way to do this (add element(which is struct) object to List) ? In lambda way for example ? I just eager for knowledge :)

    Read the article

< Previous Page | 10 11 12 13 14 15 16 17 18 19 20 21  | Next Page >