Search Results

Search found 1685 results on 68 pages for 'no more guessing'.

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

  • Need help with creating complex UITableView items (like the Settings app).

    - by Craig
    I hoping to create a custom Settings view, similar to the Settings application, but with more control over the UI and access to some settings (i need to lock some of the settings). Obvously, there are a variety of UI elements mixed in each row of application's UITableView. For example, the 'Airplane Mode' setting shows a UISwitch, while the 'Wi-Fi' setting has a text value adjacent to the disclosure symbol (''). Further complicating matters, is the grouping of these settings. I have some general questions about the approach I should take: Seems like i need to save the name of the setting, its current value, its grouping, and the type of UI element(s) needed to modify its value. i would like to make use [NSUserDefault standardUserDefaults], but not have these settings appear in the Settings application. I'm guessing that I will need to create my own settings-persistence class. is it better to build each one of these complex UI-element combinations in code or to create a series of custom views based on the UITableViewCell and load the appropriate one? i'm guessing the latter. some of the setting require that i load another view to select its value. assuming that the application is based on the Utility pattern, should the SettingsView manage the navigation stack, rather than having the app delegate do so? Thanks for your time and comments. Craig Buchanan

    Read the article

  • Best Practice for Uploading Many (2000+) Images to A Server

    - by bob
    Hello, I have a general question about this. When you have a gallery, sometimes people need to upload 1000's of images at once. Most likely, it would be done through a .zip file. What is the best way to go about uploading this sort of thing to a server. Many times, server have timeouts etc. that need to be accounted for. I am wondering what kinds of things should I be looking out for and what is the best way to handle a large amount of images being uploaded. I'm guessing that you would allow a user to upload a zip file (assuming the timeout does not effect you), and this zip file is uploaded to a specific directory, lets assume in this case a directory is created for each user in the system. You would then unzip the directory on the server and scan the user's folder for any directories containing .jpg or .png or .gif files (etc.) and then import them into a table accordingly. I'm guessing labeled by folder name. What kind of server side troubles could I run into? I'm aware that there may be many issues. Even general ideas would be could so I can then research further. Thanks! Also, I would be programming in Ruby on Rails but I think this question applies accross any language.

    Read the article

  • Adobe AIR non-Administrator application installation/upgrade on Windows

    - by bzlm
    Is there any way to allow non-Administrator users to install, upgrade or uninstall an Adobe AIR application on Windows? I've made an Adobe AIR application and packaged it as a .air package using the standard AIR mechanism for creating deployment packages. If a normal or Power user tries to install this AIR application, the Application Event Log shows an error saying administrative rights are required. And even if the user elevates during installation, administrative rights are still required for an upgrade using the automated AIR upgrade system (since an upgrade is essentially, behind the scenes, an uninstallation of a .msi package followed by an installation of another .msi package). Is there any way around this? What I've tried so far is: Using the Group Policy editor, setting Windows Installer to elevate during installations. Doesn't work, since AIR attempts a "for all users" installation. Specifying My Documents as the installation directory. Doesn't work, since AIR attempts a "for all users" installation. Giving the user Modify access to the Program Files folder where the application would usually reside. Doesn't work, since this isn't a file permissions issue. Making the user a Power User. Doesn't work, since AIR attempts a "for all users" installation. I'm guessing that both installing and upgrading would work fine for a user if the AIR installer would attempt to make an "only for me" application installation instead of a "for all users" installation, and the user was a Power User, and possibly the application was installed to My Documents I'm also guessing that this problem doesn't exist on OSX and Linux, since they have more intuitive concepts for per-user application installations.

    Read the article

  • PostSharp when using DataContractSerializer?

    - by Dan Bryant
    I have an Aspect that implements INotifyPropertyChanged on a class. The aspect includes the following: [OnLocationSetValueAdvice, MethodPointcut("SelectProperties")] public void OnPropertySet(LocationInterceptionArgs args) { var currentValue = args.GetCurrentValue(); bool alreadyEqual = (currentValue == args.Value); // Call the setter args.ProceedSetValue(); // Invoke method OnPropertyChanged (ours, the base one, or the overridden one). if (!alreadyEqual) OnPropertyChangedMethod.Invoke(args.Location.Name); } This works fine when I instantiate the class normally, but I run into problems when I deserialize the class using a DataContractSerializer. This bypasses the constructor, which I'm guessing interferes with the way that PostSharp sets itself up. This ends up causing a NullReferenceException in an intercepted property setter, but before it has called the custom OnPropertySet, so I'm guessing it interferes with setting up the LocationInterceptionArgs. Has anyone else encountered this problem? Is there a way I can work around it? I did some more research and discovered I can fix the issue by doing this: [OnDeserializing] private void OnDeserializing(StreamingContext context) { AspectUtilities.InitializeCurrentAspects(); } I thought, okay, that's not too bad, so I tried to do this in my Aspect: private IEnumerable<MethodInfo> SelectDeserializing(Type type) { return type.GetMethods(BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.Public).Where( t => t.IsDefined(typeof (OnDeserializingAttribute), false)); } [OnMethodEntryAdvice, MethodPointcut("SelectDeserializing")] public void OnMethodEntry(MethodExecutionArgs args) { AspectUtilities.InitializeCurrentAspects(); } Unfortunately, even though it intercepts the method properly, it doesn't work. I'm thinking the call to InitializeCurrentAspects isn't getting transformed properly, since it's now inside the Aspect rather than directly inside the aspect-enhanced class. Is there a way I can cleanly automate this so that I don't have to worry about calling this on every class that I want to have the Aspect?

    Read the article

  • rs232 communication, general timing question

    - by Sunny Dee
    Hi, I have a piece of hardware which sends out a byte of data representing a voltage signal at a frequency of 100Hz over the serial port. I want to write a program that will read in the data so I can plot it. I know I need to open the serial port and open an inputstream. But this next part is confusing me and I'm having trouble understanding the process conceptually: I create a while loop that reads in the data from the inputstream 1 byte at a time. How do I get the while loop timing so that there is always a byte available to be read whenever it reaches the readbyte line? I'm guessing that I can't just put a sleep function inside the while loop to try and match it to the hardware sample rate. Is it just a matter of continuing reading the inputstream in the while loop, and if it's too fast then it won't do anything (since there's no new data), and if it's too slow then it will accumulate in the inputstream buffer? Like I said, i'm only trying to understand this conceptually so any guidance would be much appreciated! I'm guessing the idea is independent of which programming language I'm using, but if not, assume it is for use in Java. Thanks!

    Read the article

  • Downloading jQuery UI: Ok, so what part of this mess do I copy to the server?

    - by Martha
    From the "should be simple, but..." files: Trying to get started with jQuery UI. Went to the site, used their custom builder thingy to assemble the parts I need, made myself a custom theme using the Theme Roller, downloaded the zip file thus produced, unzipped it on my local drive. Ok, so I have 37 folders, 311 files, and a total of 2.4 MB. Ain't no way in hell all this is going on the server. What parts do I need to put there? 'css' 'custom-theme': jquery-ui-1.8.custom.css, 'images' subfolder with 12 .png images 'development-bundle' 'demos': demos.css, index.html, plus 18 subfolders, but I'm guessing "not needed" 'docs': 17 .html files, but again, I'm guessing "not needed" 'external': 4 .js files, one .css 'themes': 'base' and 'custom-theme' subfolders, each with 8 or 9 .css files and an 'images' subfolder with about a dozen images 'ui': 25 .js files, an 'i18n' subfolder with 53 .js files, and a 'minified' subfolder with 24 .js files 'js': jquery-1.4.2.min.js and jquery-ui-1.8.custom.min.js Also, the file structure. Our server is set up something like this: root admin (administrative tools) css forms (the gist of the site lives here) images include (asp code snippets that are used by multiple pages) js (just a few things right now, like an ancient wheezing spelling checker) As far as I can tell, the jQuery css files assume that (1) each theme is in its own folder, and (2) each folder has its own images subfolder. How can I convince it otherwise? i.e. put the necessary .js files in the 'js' folder, the .css files in the 'css' folder, and the images in the 'images' folder?

    Read the article

  • Processing command-line arguments in prefix notation in Python

    - by ejm
    I'm trying to parse a command-line in Python which looks like the following: $ ./command -o option1 arg1 -o option2 arg2 arg3 In other words, the command takes an unlimited number of arguments, and each argument may optionally be preceded with an -o option, which relates specifically to that argument. I think this is called a "prefix notation". In the Bourne shell I would do something like the following: while test -n "$1" do if test "$1" = '-o' then option="$2" shift 2 fi # Work with $1 (the argument) and $option (the option) # ... shift done Looking around at the Bash tutorials, etc. this seems to be the accepted idiom, so I'm guessing Bash is optimized to work with command-line arguments this way. Trying to implement this pattern in Python, my first guess was to use pop(), as this is basically a stack operation. But I'm guessing this won't work as well on Python because the list of arguments in sys.argv is in the wrong order and would have to be processed like a queue (i.e. pop from the left). I've read that lists are not optimized for use as queues in Python. So, my ideas are: convert argv to a collections.deque and use popleft(), reverse argv using reverse() and use pop(), or maybe just work with the int list indices themselves. Does anyone know of a better way to do this, otherwise which of my ideas would be best-practise in Python?

    Read the article

  • Declaration, allocation and assignment of an array of pointers to function pointers

    - by manneorama
    Hello Stack Overflow! This is my first post, so please be gentle. I've been playing around with C from time to time in the past. Now I've gotten to the point where I've started a real project (a 2D graphics engine using SDL, but that's irrelevant for the question), to be able to say that I have some real C experience. Yesterday, while working on the event system, I ran into a problem which I couldn't solve. There's this typedef, //the void parameter is really an SDL_Event*. //but that is irrelevant for this question. typedef void (*event_callback)(void); which specifies the signature of a function to be called on engine events. I want to be able to support multiple event_callbacks, so an array of these callbacks would be an idea, but do not want to limit the amount of callbacks, so I need some sort of dynamic allocation. This is where the problem arose. My first attempt went like this: //initial size of callback vector static const int initial_vecsize = 32; //our event callback vector static event_callback* vec = 0; //size static unsigned int vecsize = 0; void register_event_callback(event_callback func) { if (!vec) __engine_allocate_vec(vec); vec[vecsize++] = func; //error here! } static void __engine_allocate_vec(engine_callback* vec) { vec = (engine_callback*) malloc(sizeof(engine_callback*) * initial_vecsize); } First of all, I have omitted some error checking as well as the code that reallocates the callback vector when the number of callbacks exceed the vector size. However, when I run this code, the program crashes as described in the code. I'm guessing segmentation fault but I can't be sure since no output is given. I'm also guessing that the error comes from a somewhat flawed understanding on how to declare and allocate an array of pointers to function pointers. Please Stack Overflow, guide me.

    Read the article

  • JVM GC demote object to eden space?

    - by Kevin
    I'm guessing this isn't possible...but here goes. My understanding is that eden space is cheaper to collect than old gen space, especially when you start getting into very large heaps. Large heaps tend to come up with long running applications (server apps) and server apps a lot of the time want to use some kind of caches. Caches with some kind of eviction (LRU) tend to defeat some assumptions that GC makes (temporary objects die quickly). So cache evictions end up filling up old gen faster than you'd like and you end up with a more costly old gen collection. Now, it seems like this sort of thing could be avoided if java provided a way to mark a reference as about to die (delete keyword)? The difference between this and c++ is that the use is optional. And calling delete does not actually delete the object, but rather is a hint to the GC that it should demote the object back to Eden space (where it will be more easily collected). I'm guessing this feature doesn't exist, but, why not (is there a reason it's a bad idea)?

    Read the article

  • Fatal error with Custom Magento Module on one server but not the other

    - by Jack
    Hi, I am creating my own custom module in Magento and during testing on a Litespeed server (PHP v5.2.14) I am getting a Fatal Error: Call to a member function batch() on a non-object in ../../../BatchController.php on line 25 that was not appearing during testing on another linux server and a wamp server (PHP v5.2.11). This one has stumped me. I am guessing it has something to do with the server configuration rather than the code itself. But i am just guessing. I was hoping someone here could tell me. The only real major difference I could see, aside from the php versions and environment, is that the server that the error is on is using the Suhosin Patch. But would that be something that could cause this? The line in question is Mage::getModel('mymodule/mymodel')->batch(); which is enclosed in an IF statement. batch() is a public function located in my model file. If you need more code let me know. Thanks!

    Read the article

  • How can I close the output stream after a jsp has been included.

    - by stu
    I have a webpage that makes an ajax call to get some data. That data takes a long time to calculate, so what I did was the first ajax server call returns "loading..." and then the thread goes on to calculate the data and store it in a cache. meanwhile the client javascript checks back every few seconds with another ajax call to see if the cache has been loaded yet. Here's my problem, and it might not be a problem. After the initial ajax to the server call, I do a ...getServletContext().getRequestDispatcher(jsppath).include(request, response); then I use that thread to do the calculations. I don't mind tying up the webserver thread with this, but I want the browser to get the response and not wait for the server to close the socket. I can't tell if the server is closing the socket after the include, but I'm guessing it's not. So how can I forcibly close the stream after I've written out my response, before starting my long calculations? I tried o = response.getOutputStream(); o.close(); but I get an illegal state exception saying that the output stream has already been gotten (presumably by the jsp I'm including) So my qestions: 1) is the webserver closing the socket (I'm guessing not, because you could always include another jsp) 2) if it is as I assume not closing the socket, how do I do that?

    Read the article

  • Remote Desktop event ID 20499. No noticeable issues

    - by Marc05
    I get a warning event with ID 20499 for TerminalServices-RemoteConnectionManager.The error is: Remote Desktop Services has taken too long to load the user configuration from server \server.domain.home for user administrator. Yet, I don't see any issues (I'm guessing because that user is on the machine local). Why am I getting this warning? I'm on Windows Server 2012 R2 connecting from a Windows 8.1.

    Read the article

  • Batch rename folders?

    - by Margaret
    This is probably a super-simple already solved task, but: I have a series of folders containing eBooks in various formats. They have the folder name format: \Lastname, Firstname (n books)\ I want to rename each of the folders to be simply \Firstname Lastname\ which I'm guessing can be done with a batch file fairly easily, but it's been a very long time since I had to do string parsing so I have no recollection of how. Help? I'm using Windows 7.

    Read the article

  • Insufficient Permissions on UNC Path for Physical Path in IIS7

    - by Eric C
    I've got a multi-server setup where Server A is hosting the html files and Server B is running IIS 7.5. I've specified a UNC path for the Physical Path of the website on Server B. When I try to hit localhost I'm receiving the following error: Cannot read configuration file due to insufficient permissions I am able to browse and modify files in the UNC path on Server B. I'm guessing it has something to do with IIS_IUSRS of Server B not having permissions, but I'm unsure how to add them to the shared directory of Server A.

    Read the article

  • mod rewrite regex

    - by bbutle01
    The plan is to take domain.com/chat2/roomnumber and redirect to domain.com/chat2/index.php?room_id=roomnumber. Here's my code that's NOT workin: RewriteEngine on RewriteRule ^/chat2/([a-z0-9_-]+)/$ /index.php?room_id=$1 [NC,L] RewriteRule ^/chat2/([a-z0-9_-]+)$ /index.php?room_id=$1 [NC,L] I get sent to the 404 page. I'm guessing the problem is my placement of the ^ but I'm not certain.

    Read the article

  • ZigBee Maximum Bandwidth

    - by Kris
    What is the maximum rated bandwidth for ZigBee? I can't seem to find this information anywhere, not even on the ZigBee Alliance website at http://www.zigbee.org/ I did find some information elsewhere, but it dated back to 2004, so I'm guessing it's different now that it was 5 years ago. Thanks!

    Read the article

  • How to only allow particular programs to modify certain files?

    - by Mehrdad
    I want to make certain directories on my drives read-only except to particular programs who will have full permissions. For example, the Microsoft Word might be allowed to modify the files in my Documents folder, but other programs (such as the Command Prompt) would not be allowed to. I'm guessing this requires a file system filter driver of some sort, but I don't know which programs have this capability. Is there any (free) program that can do this for me?

    Read the article

  • Removing English - United States Language from Firefox Issue...

    - by Paul
    Win7 Home Prem 32bit Firefox 3.6.2 I noticed whilst typing a hotmail email in Firefox that the default language seems to be English/United States. As i am from the UK i thought i would add in the English/United Kingdom dictionary Addon which i have done. I have set this as the default Language. Is there anyway to remove the English/United States Dictionary? It is not an Addon so i'm guessing it's the built in Firefox default language and may be unremovable?

    Read the article

  • Good Free Ubuntu Server VMWare Image Needed

    - by Yaakov Ellis
    Can anyone recommend a good, free Ubuntu Server VMWare Image (or Virtual Appliance, as they call them)? I have looked on the VMWare VAM and there are literally hundreds to choose from. I am looking for something that can with very minimal effort serve as a development platform for LAMP applications (so it should have all of those installed, plus things like PhpMyAdmin). Bonus points if there is some way to create new Virtual Hosts (for developing and testing new sites) on Apache without having to go digging around conf files and guessing on the sytax.

    Read the article

  • Difference between adding MIME types in IIS via Websites vs Local Computer?

    - by Alex Key
    What is the difference between adding MIME types in these 2 different situations? When in IIS 6 manager... Right click on the computer name (local computer) properties mime types Right click on the "Web sites" folder properties http headers mime types I'm guessing that perhaps option 1 adds MIME types for FTP also? However if that were true i'd expect to be able to add MIME types specifically in the properties of FTP (and not just websites). thanks for your help.

    Read the article

  • Is WAP still in use?

    - by pek
    I apologize if this question sounds too generic, but I am researching WAP (Wireless Application Protocol) and I am having a hard time finding recent news. Do cell phones still use WAP or is it replaced by TCP/IP? I am guessing that since WiFi is supported in new cell phones, WAP isn't used anymore. Or did I misunderstand what is WAP? Is any aspect of WAP used today? I supposed there is still Push Mail and MMS.

    Read the article

  • "tasksel: aptitude failed (100)" installing LAMP on Ubuntu (vagrant)

    - by John Mee
    vagrant@precise64:~$ sudo tasksel install lamp-server tasksel: aptitude failed (100) I'm hoping to get a LAMP server from a clean install of ubuntu. All the googles suggest tasksel, which going into a pretty ascii gui, downloads stuff, then dies with this message. I'm guessing I should try doing it via apt-get of the individual packages but seems a fair chance somebody else is going to search for this error message and want the right answer.

    Read the article

  • How to debug a website while running IIS 7?

    - by chobo2
    Hi I am running iis7 on my windows machine for testing purposes. Now I need to have access to the debugger so when something happens I can walk through it. Yet when I put debug lines on my site nothing happens. So I am guessing I need more stuff setup to make debugging to work. Everything is on the same machine. I have iis 7 on the same machine setup and I have Visual studios setup on my machine.

    Read the article

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